/* Signature chrome adapted from the Webex lab kit. Bright multicolour is the default. */

html[data-theme="vivid"] {
  --cc-bg: #1a1033;
  --cc-surface: #3b0764;
  --cc-surface-2: #4c1d95;
  --cc-ink: #faf5ff;
  --cc-muted: #e9d5ff;
  --cc-line: rgba(255, 255, 255, 0.28);
  --cc-accent-1: #22d3ee;
  --cc-accent-2: #fb7185;
  --cc-accent-3: #c4b5fd;
  --cc-accent-4: #fbbf24;
  --cc-link: #fde68a;
  --cc-danger: #fecdd3;
  --cc-ok: #6ee7b7;
  --cc-focus: #fde68a;
  --cc-shadow: 0 16px 40px rgba(46, 16, 101, 0.45);
  color-scheme: dark;
}

html[data-ink="cyan"] { --cc-ink: #083344; }
html[data-ink="amber"] { --cc-ink: #451a03; }
html[data-ink="violet"] { --cc-ink: #2e1065; }
html[data-ink="ink"] { --cc-ink: #24143a; }
html[data-theme="vivid"][data-ink="ink"] { --cc-ink: #faf5ff; }
html[data-theme="vivid"][data-ink="cyan"] { --cc-ink: #ecfeff; }
html[data-theme="vivid"][data-ink="amber"] { --cc-ink: #fffbeb; }
html[data-theme="vivid"][data-ink="violet"] { --cc-ink: #f5f3ff; }
html[data-theme="dark"][data-ink="cyan"] { --cc-ink: #d7fbff; }
html[data-theme="dark"][data-ink="amber"] { --cc-ink: #ffe7b8; }
html[data-theme="dark"][data-ink="violet"] { --cc-ink: #f3e8ff; }
html[data-theme="dark"][data-ink="ink"] { --cc-ink: #e8f4f6; }
html[data-theme="dusk"][data-ink="ink"] { --cc-ink: #f7f1ff; }

.lab-bar,
.phone-bar { display: none !important; }

.topbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 12px;
  z-index: 30;
  min-height: 58px;
  margin: 12px 16px 0;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  color: #faf5ff;
  background:
    linear-gradient(#2e1065, #2e1065) padding-box,
    linear-gradient(120deg, #22d3ee, #a78bfa, #f472b6) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35), 0 12px 36px rgba(124, 58, 237, 0.45), 0 0 28px rgba(244, 114, 182, 0.35);
  backdrop-filter: blur(16px);
}
.stage > .top { display: none !important; }
.bar-search {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.bar-search input {
  width: 11rem;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #1e1b4b;
  color: #faf5ff;
  font: inherit;
}
.bar-search button, .topbar .icon-btn {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: #fde68a;
  color: #1e1b4b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.header-menu {
  flex: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--cc-surface), var(--cc-surface)) padding-box,
    linear-gradient(120deg, var(--cc-accent-1), var(--cc-accent-3), var(--cc-accent-2)) border-box;
  color: var(--cc-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.topbar .brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}
.topbar .brand .mark,
.rail .brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: none;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.65);
}
.lab-logo { width: 40px; height: 40px; display: block; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; color: #faf5ff; }
.brand-name b { font-size: 1rem; }
.brand-name small { font-size: 0.72rem; font-weight: 700; color: #fde68a; }
.banner-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  min-width: 0;
  flex: 1;
  scrollbar-width: thin;
  padding: 2px 20px 2px 4px;
  scroll-padding-inline: 16px;
  scroll-snap-type: x proximity;
}
.banner-scroll::after {
  content: "";
  flex: none;
  width: 8px;
  height: 1px;
}
.banner-scroll a,
.banner-scroll button {
  flex: none;
  scroll-snap-align: start;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #4c1d95;
  color: #faf5ff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.banner-scroll a[aria-current="page"] {
  border-color: var(--cc-accent-3);
  box-shadow: 0 0 12px color-mix(in srgb, var(--cc-accent-3) 45%, transparent);
}
.glow-ico { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--cc-accent-1) 80%, transparent)); }

h1, .hero-glass h1 { scroll-margin-top: 72px; }
main { min-height: 100svh; }
.hero-glass {
  max-height: none;
  overflow: visible;
  width: min(420px, calc(100% - 24px));
}
.hero-glass h1 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
.hero-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.hero-controls button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--cc-line);
  background: var(--cc-surface);
  color: var(--cc-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.phone-menu {
  inset: 0 auto 0 0;
  width: min(440px, 100%);
  transform: none;
  border-right: 1px solid var(--cc-line);
  box-shadow: 18px 0 50px rgba(36, 20, 58, 0.28);
  animation: drawer-in 0.28s ease;
}
.phone-menu .menu-item {
  min-height: 64px;
  padding: 8px 10px;
  border-radius: 16px;
}
@keyframes drawer-in { from { transform: translateX(-105%); } to { transform: none; } }
html[data-motion="reduce"] .phone-menu { animation: none; }

.disclaimer-box {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--cc-surface), var(--cc-surface)) padding-box,
    linear-gradient(120deg, var(--cc-accent-1), var(--cc-accent-3), var(--cc-accent-2)) border-box;
  box-shadow: 0 0 18px color-mix(in srgb, var(--cc-accent-3) 28%, transparent);
  color: var(--cc-ink);
  font-weight: 650;
}
.labs-line { margin: 8px 0 6px; font-weight: 800; letter-spacing: 0.02em; }
.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px;
  border-radius: 18px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--cc-bg), var(--cc-bg)) padding-box,
    linear-gradient(120deg, #22d3ee, #a78bfa, #f472b6) border-box;
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.45);
}
.brand-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--cc-ink);
  text-decoration: none;
  font-weight: 800;
  background: var(--cc-surface);
}
.glasses-monkey, .linktree-mark { width: 36px; height: 36px; display: block; }
.glasses-monkey { filter: drop-shadow(0 0 8px #22d3ee); }
.linktree-mark { filter: drop-shadow(0 0 8px #f472b6); }
.lab-foot { position: relative; z-index: 2; padding-bottom: 24px; }
.room-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.room-tools a, .room-tools button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  color: #1b1340;
}
.dl-html { background: #a5f3fc; }
.dl-pdf { background: #fbcfe8; }
.dl-png { background: #ddd6fe; }
.dl-svg { background: #bbf7d0; }
.eco-panel {
  margin-top: 16px;
  padding: 12px;
  border-radius: 16px;
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-line);
}
.sources-block {
  margin-top: 28px;
  padding: 16px 18px;
  border: 2px solid var(--cc-accent-1);
  border-radius: 16px;
  background: color-mix(in srgb, var(--cc-surface) 88%, #000 12%);
}
.sources-block h2 { margin: 0 0 8px; }
.sources-block .source-list { margin: 0; padding-left: 1.2rem; }
.sources-block li { margin: 6px 0; }
.read-now {
  background: color-mix(in srgb, var(--cc-accent-2) 35%, transparent);
  border-radius: 4px;
}
.is-reading { outline: 2px solid var(--cc-accent-3); outline-offset: 4px; }

.mascot-dock {
  width: 168px;
  height: 200px;
  right: 16px;
  left: auto;
  top: auto;
  bottom: 20px;
  z-index: 16;
  filter: drop-shadow(0 0 12px #22d3ee) drop-shadow(0 0 18px #c084fc);
  touch-action: none;
}
.mascot-dock svg { width: 168px; height: 200px; overflow: visible; }
.mascot-dock .arm { transform-origin: 110px 160px; }
.mascot-dock .tail { transform-origin: 170px 150px; }
.mascot-dock.is-greet {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 70;
}
.poke {
  position: fixed;
  z-index: 17;
  right: 120px;
  width: min(260px, calc(100vw - 140px));
  padding: 10px;
  border-radius: 16px;
  background: var(--cc-surface);
  border: 2px solid var(--cc-accent-3);
  box-shadow: 0 0 16px color-mix(in srgb, var(--cc-accent-3) 40%, transparent);
}
.listen-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.listen-bar button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--cc-line);
  background: var(--cc-surface);
  color: var(--cc-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tour-layer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.tour-layer[hidden] { display: none !important; }
.tour-spot {
  position: fixed;
  z-index: 81;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 3px #fde047, 0 0 18px #c4b5fd, 0 0 28px rgba(34, 211, 238, 0.85);
}
.tour-card {
  position: fixed;
  z-index: 82;
  pointer-events: auto;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  height: auto;
  max-height: none;
  overflow: visible;
  padding: 16px;
  border-radius: 22px;
  color: #1b1340;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, #22d3ee, #a78bfa, #f472b6) border-box;
  border: 3px solid transparent;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.28), 0 0 28px rgba(167, 139, 250, 0.75), 0 18px 40px rgba(15, 23, 42, 0.28);
}
.tour-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 800; color: #5b21b6; }
.tour-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
}
.tour-card h2 { margin: 0 0 6px; font-size: 1.2rem; line-height: 1.2; color: #1b1340; }
.tour-text { margin: 0 0 10px; color: #1b1340; }
.tour-dots { display: flex; gap: 6px; margin: 0 0 12px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: #ddd6fe; }
.tour-dots span.is-on { background: #7c3aed; box-shadow: 0 0 8px #a78bfa; }
.tour-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tour-actions button {
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #ede9fe;
  color: #3b0764;
}
.tour-actions button[data-tour-next] {
  margin-left: auto;
  background: linear-gradient(120deg, #7c3aed, #db2777);
  color: #fff;
}

.quick-bar { display: none; }
@media (max-width: 800px) {
  html, body { overflow-x: clip; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .stage, main, article, .lesson-block { min-width: 0; max-width: 100%; }
  .live-diagram, svg, img, table, pre { max-width: 100%; height: auto; }
  .rail, .top { display: none; }
  .quick-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 28;
    justify-content: space-around;
    gap: 2px;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--cc-bg) 94%, transparent);
    border-top: 1px solid var(--cc-line);
  }
  .quick-bar a, .quick-bar button {
    flex: 1;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--cc-ink);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
  }
  .topbar .brand-name small { display: none; }
  .bar-search { display: none; }
  .topbar { margin: 8px; top: 8px; border-radius: 22px; }
  body[data-view="home"] .hero-stage {
    height: auto;
    min-height: 220px;
    overflow: visible;
  }
  .hero-sheet, .hero-glass, .hero-counters {
    position: static;
    width: auto;
    max-width: none;
    max-height: none;
    transform: none;
    overflow: visible;
    background: color-mix(in srgb, var(--cc-surface) 88%, transparent);
  }
  .hero-glass h1 { font-size: 1.45rem; line-height: 1.2; margin: 4px 0; }
  main, .lab-foot { padding-bottom: calc(var(--bottom-h, 64px) + 140px); }
  .mascot-dock { width: 112px; height: 136px; top: auto; bottom: calc(var(--bottom-h, 64px) + 12px); }
  .mascot-dock svg { width: 112px; height: 136px; }
  .mascot-dock.is-greet { top: 46%; bottom: auto; width: 120px; height: 150px; }
  .dock-stack { left: 8px; right: 88px; width: auto; bottom: calc(var(--bottom-h, 64px) + 8px); }
}
@media (min-width: 801px) {
  .shell { margin-top: 0; }
  main { padding-right: 200px; }
}

.hero-stage {
  height: auto;
  min-height: 0;
  margin: 16px;
  padding: 22px 22px 18px;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(105deg, #2e1065 0%, #5b21b6 48%, #9f1239 100%);
  box-shadow: 0 18px 48px rgba(46, 16, 101, 0.45);
}
.hero-stage canvas,
.hero-fallback,
.hero-stage::after { display: none !important; }
.hero-sheet, .hero-glass, .hero-counters {
  position: static;
  width: auto;
  max-width: none;
  max-height: none;
  transform: none;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.hero-glass h1 {
  margin: 4px 0 8px;
  color: #faf5ff;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
  text-shadow: none;
}
.hero-glass .chip, .hero-lead { color: #faf5ff; }
.contact-path {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 8px;
  padding: 0;
  list-style: none;
}
.contact-path li {
  min-height: 84px;
  padding: 12px 8px;
  border-radius: 16px;
  color: #faf5ff;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}
.contact-path b, .contact-path small { display: block; font-size: 15px; }
.contact-path small { margin-top: 4px; font-weight: 700; color: #fef3c7; }
.contact-path li:nth-child(1) { background: #155e75; }
.contact-path li:nth-child(2) { background: #5b21b6; }
.contact-path li:nth-child(3) { background: #9f1239; }
.contact-path li:nth-child(4) { background: #9a3412; }
.contact-path li:nth-child(5) { background: #065f46; }
.contact-path li:nth-child(6) { background: #1e3a8a; }
html[data-motion="full"] .contact-path li {
  animation: path-pulse 3.6s ease-in-out infinite;
  animation-delay: calc(var(--step) * 0.4s);
}
@keyframes path-pulse {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); box-shadow: 0 0 18px rgba(253, 230, 138, 0.85); }
}
html[data-theme="vivid"] .card.holo { color: #ffffff; }
html[data-theme="vivid"] .card.accent-1 { background: #4c1d95; }
html[data-theme="vivid"] .card.accent-2 { background: #9f1239; }
html[data-theme="vivid"] .card.accent-3 { background: #115e59; }
html[data-theme="vivid"] .card.accent-4 { background: #1e3a8a; }
html[data-theme="vivid"] .card h2,
html[data-theme="vivid"] .card h3,
html[data-theme="vivid"] .card p,
html[data-theme="vivid"] .card .chip,
html[data-theme="vivid"] .card .studied { color: #ffffff; }
html[data-theme="vivid"] .card h2,
html[data-theme="vivid"] .card h3 {
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.holo::before { z-index: 0; }
.card.holo > * { position: relative; z-index: 1; }
html[data-theme="vivid"] .card .chip {
  background: rgba(0, 0, 0, 0.35);
  border-color: transparent;
}
html[data-theme="vivid"] .disclaimer-box,
html[data-theme="vivid"] .lesson-block,
html[data-theme="vivid"] .callout {
  background: #3b0764;
  color: #faf5ff;
}
@media (max-width: 800px) {
  .contact-path { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .contact-path li { min-height: 64px; padding: 8px 6px; }
  .hero-glass h1 { font-size: 1.7rem; }
  .hero-lead { margin: 0 0 4px; font-size: 15px; }
  .banner-scroll { display: none; }
  #open-settings { margin-left: auto; }
}
.contact-path li { position: relative; }
@media (min-width: 801px) {
  .contact-path li:not(:last-child)::after {
    content: "›";
    position: absolute;
    z-index: 1;
    right: 0;
    top: 50%;
    color: #fde68a;
    font-size: 22px;
    line-height: 1;
    transform: translate(58%, -50%);
    text-shadow: 0 0 8px #2e1065;
  }
}
@media (min-width: 900px) {
  body.onboard-open main { padding-right: 400px; }
}
@media (max-width: 899px) {
  .tour-card {
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px 16px 14px;
    top: auto !important;
    bottom: var(--tour-bottom, calc(var(--bottom-h, 64px) + 16px)) !important;
  }
  body.onboard-open .hero-controls,
  body.onboard-open .hero-counters { display: none; }
  body.onboard-open .fold-label { margin-top: 220px; }
}
