:root {
  color-scheme: light;
  --ink: #171719;
  --muted: #54545a;
  --blue: #092aa6;
  --blue-dark: #051e7a;
  --blue-tint: #eef3ff;
  --canvas: #f1f2f3;
  --line: #e5e5e8;
  --content: 80rem;
  --inset: clamp(1rem, 2.5vw, 2rem);
  --section-gap: clamp(2.75rem, 7vw, 6.5rem);
  --card-gap: clamp(.6rem, 1.35vw, 1.25rem);
  --radius: .5rem;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 1rem/1.5 Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, input { -webkit-tap-highlight-color: transparent; }
:where(a, button, input):focus-visible { outline: 2px solid #2255e5; outline-offset: 3px; }
img { display: block; width: 100%; }
section[id] { scroll-margin-top: 1rem; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}
.wrap { width: min(90%, var(--content)); margin-inline: auto; }

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #e2e9f1;
}
.hero-header {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  padding-block: max(.6rem, env(safe-area-inset-top)) 1.25rem;
  background: linear-gradient(180deg, #0005, #0003 62%, transparent);
  color: #fff;
  pointer-events: none;
}
.hero-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.hero-brand, .hero-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: auto;
}
.hero-brand {
  gap: .55rem;
  font-size: 1.05rem;
}
.hero-brand-mark { width: 1.5rem; height: 1.5rem; flex: none; }
.hero-nav { display: flex; gap: clamp(.8rem, 2.5vw, 2.4rem); font-size: .875rem; }
.hero-nav a:hover { text-decoration: underline; text-underline-offset: .35em; }
.hero-header a:focus-visible, .map-scroll:focus-visible { outline-color: #fff; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.5rem;
  padding: .45rem 1.15rem;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.pill.outline { color: var(--blue); background: #fff; }
.pill.outline:hover { background: var(--blue-tint); }

.map-stage {
  position: absolute;
  inset: 0;
  container-type: size;
  --fallback-ratio: calc(16 / 9);
}
.map-fallback, #factory-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-fallback { object-fit: cover; }
#factory-canvas { display: block; opacity: 0; transition: opacity .45s; }
.scene-ready #factory-canvas { opacity: 1; }
.scene-ready .map-fallback { visibility: hidden; }
.map-scroll {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid #ffffff55;
  border-radius: 100px;
  background: #091525e8;
  color: #fff;
  font-size: .8125rem;
  white-space: nowrap;
  box-shadow: 0 .25rem 1rem #183b7220;
}
.map-scroll:hover { background: #091525; }
.map-scroll .icon { transform: rotate(90deg); }
.scene-sound {
  position: absolute;
  z-index: 1;
  right: clamp(.65rem, 3vw, 2rem);
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #091525e8;
  color: #fff;
}
.scene-sound:hover { background: #091525; }
.scene-sound .icon { width: 1.25rem; height: 1.25rem; }
.scene-sound .sound-waves, .scene-sound.is-audible .sound-slash { display: none; }
.scene-sound.is-audible .sound-waves { display: initial; }
.map-preview:not([hidden]) ~ .scene-sound { visibility: hidden; }
.hero-header, .map-scroll, .map-marker { transition: opacity .45s ease; }
.scene-entering :is(.hero-header, .map-scroll, .map-marker) {
  opacity: 0;
  visibility: hidden;
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-header, .map-scroll, .map-marker { transition: none; }
}
.map-preview:not([hidden]) ~ .map-scroll { visibility: hidden; }
.map-hover-card {
  position: absolute;
  z-index: 2;
  width: min(18rem, calc(100% - 1.5rem));
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  border: 1px solid #dbe5f5;
  border-radius: .85rem;
  box-shadow: 0 .8rem 2.5rem #17366436;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(.55rem) scale(.98);
  transition: opacity .22s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility .28s;
}
.map-hover-card.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.map-hover-card > img { display: block; width: 100%; height: 6.75rem; object-fit: cover; }
.map-hover-copy { padding: .85rem 1rem 1rem; }
.map-hover-copy h3 { font-size: 1rem; line-height: 1.35; }
.map-hover-category { color: var(--blue); font-size: .73rem; margin-bottom: .3rem; }
.map-hover-description { color: var(--muted); font-size: .8rem; margin: .35rem 0 .7rem; }
.map-hover-copy .pill { min-height: 2.1rem; font-size: .78rem; }
@media (prefers-reduced-motion: reduce) {
  .map-hover-card { transition: none; }
}
.map-marker {
  --fallback-width: max(100cqw, 100cqh * var(--fallback-ratio));
  --fallback-height: max(100cqh, 100cqw / var(--fallback-ratio));
  --x: clamp(1.4rem, 50% + var(--fallback-x) * var(--fallback-width), 100% - 1.4rem);
  --y: clamp(1.4rem, 50% + var(--fallback-y) * var(--fallback-height), 100% - 1.4rem);
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--blue-dark);
}
.marker-lean { --fallback-x: -.0758; --fallback-y: -.2315; }
.marker-maintenance { --fallback-x: .1799; --fallback-y: -.0999; }
.marker-quality { --fallback-x: -.2455; --fallback-y: -.0988; }
.marker-safety { --fallback-x: .1506; --fallback-y: .2331; }
.marker-training { --fallback-x: -.0046; --fallback-y: .0233; }
@media (max-aspect-ratio: 4/5) {
  .map-stage { --fallback-ratio: calc(780 / 1688); }
  .marker-lean { --fallback-x: -.0378; --fallback-y: -.2946; }
  .marker-maintenance { --fallback-x: .2366; --fallback-y: -.1439; }
  .marker-quality { --fallback-x: -.203; --fallback-y: 0; }
  .marker-safety { --fallback-x: -.2599; --fallback-y: .3011; }
  .marker-training { --fallback-x: .1105; --fallback-y: .1475; }
}
.map-marker::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border: .32rem solid #092aa6;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 .22rem #ffffff60;
}
.map-marker span {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  left: calc(50% + 1.05rem);
  padding: .22rem .52rem;
  border-radius: 2rem;
  background: #fff;
  box-shadow: 0 .15rem .6rem #152c6352;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.map-marker:hover, .map-marker:focus-visible, .map-marker[aria-expanded="true"] { z-index: 1; }
.map-marker:hover::before, .map-marker[aria-expanded="true"]::before {
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 .36rem #cde5ffdb, 0 0 1.2rem .26rem #367cff;
}
.map-marker:hover span, .map-marker:focus-visible span { opacity: 1; }
.map-marker[aria-expanded="true"] span { opacity: 1; color: #fff; background: var(--blue); }
.map-preview:not([hidden]) { display: grid; }
.map-preview {
  position: absolute;
  z-index: 2;
  left: clamp(1rem, 4vw, 4rem);
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  width: min(38rem, calc(100% - 2rem));
  background: #fffffff5;
  box-shadow: 0 .5rem 2rem #19365526;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: .9rem 3.4rem .9rem 1.15rem;
  border-top: 2px solid var(--blue);
}
.map-preview h3 { font-size: 1rem; }
.map-preview p { margin-top: .2rem; color: var(--muted); font-size: .83rem; }
.map-close { position: absolute; top: .7rem; right: .65rem; }

.dashboard {
  display: grid;
  gap: var(--section-gap);
  padding-block: clamp(2.5rem, 6vw, 5.5rem) var(--section-gap);
}
.section { min-width: 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: clamp(.75rem, 2vw, 1.5rem);
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.05vw, 2.85rem);
  line-height: 1.15;
  font-weight: 700;
}
.section-head h2 small {
  font-size: .6em;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 400;
}
.more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  min-height: 2.75rem;
  padding: .35rem .2rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
  white-space: nowrap;
}
.more:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }

.courses > .section-head, #teachers > .section-head {
  flex-direction: column;
  gap: .9rem;
  text-align: center;
}
.course-grid, .teacher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-gap);
}
.card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}
.course {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  border: 0;
  text-align: left;
}
.course:hover { box-shadow: 0 .45rem 1.3rem #15151716; }
.course > img { aspect-ratio: 1.7; object-fit: cover; }
.course-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .8rem;
  padding: var(--inset);
}
.course-copy > strong { font-size: clamp(.95rem, 1.55vw, 1.26rem); line-height: 1.35; }
.course-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .5rem;
  color: var(--muted);
  font-size: .75rem;
  white-space: nowrap;
}
.course-meta > span:first-child .icon { margin-inline-end: .22rem; }
.play {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.65rem;
  height: 1.65rem;
  margin-inline-start: auto;
  border-radius: 50%;
  background: #ededee;
  color: var(--ink);
}
.course:hover .play { background: var(--ink); color: #fff; }
.play .icon { width: .9rem; height: .9rem; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap); }
.pair .section-head h2 { font-size: clamp(1.25rem, 2.1vw, 1.9rem); }
.features { row-gap: clamp(2rem, 5vw, 4.25rem); }
.feature { display: grid; grid-template-rows: auto 1fr; }
.feature--showcase { grid-column: 1 / -1; }
.feature--showcase .section-head h2 { font-size: clamp(1.5rem, 3.05vw, 2.85rem); }
.feature-card { display: grid; grid-template-rows: auto 1fr; }
.feature--showcase .feature-card {
  grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr);
  grid-template-rows: auto;
}
.feature-art { position: relative; }
.feature-art img { height: 100%; aspect-ratio: 2.15; object-fit: cover; }
.feature--showcase .feature-art img { aspect-ratio: 1.9; }
.badge {
  position: absolute;
  top: .8rem;
  left: .8rem;
  padding: .28rem .55rem;
  color: #fff;
  background: #161616d9;
  border-radius: .2rem;
  font-size: .72rem;
  white-space: nowrap;
}
.feature-copy {
  align-self: center;
  padding: clamp(1.25rem, 3.6vw, 3.6rem);
}
.feature-copy h3 { font-size: clamp(1.15rem, 2.2vw, 1.85rem); line-height: 1.25; }
.feature--showcase .feature-copy h3 { font-size: clamp(1.4rem, 3vw, 2.7rem); }
.feature-copy p {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-top: .65rem;
  color: var(--muted);
  font-size: clamp(.82rem, 1.4vw, .98rem);
}
.feature-copy .feature-date { color: var(--ink); }
.feature-copy .pill { margin-top: 1.2rem; }
.dashboard .pill, .map-open {
  border-color: var(--ink);
  border-radius: .22rem;
  background: var(--ink);
}
.dashboard .pill:hover, .map-open:hover { background: #3a3a3e; }
.dashboard .pill.outline { background: #fff; color: var(--ink); }
.dashboard .pill.outline:hover { background: #f1f1f2; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.tags span {
  padding: .25rem .55rem;
  background: #f0f0f2;
  color: var(--ink);
  font-size: .75rem;
  white-space: nowrap;
}

.teacher { text-align: center; }
.teacher img { aspect-ratio: 1.18; object-fit: cover; object-position: center 12%; }
.teacher > div { padding: var(--inset); }
.teacher h3 { font-size: 1.15rem; }
.teacher p { color: var(--muted); font-size: .84rem; margin-top: .4rem; }

.feed-card {
  display: grid;
  grid-template-columns: 36% minmax(0, 1fr);
}
.feed-art { position: relative; }
.feed-art img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.feed-card ul { align-self: center; padding: .65rem 1rem; list-style: none; }
.feed-card li {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  min-height: 2.45rem;
  padding-block: .55rem;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.feed-card li:last-child { border-bottom: 0; }
.feed-card button { border: 0; padding: 0; background: transparent; font-weight: 600; text-align: left; }
.feed-card button:hover { text-decoration: underline; }
.feed-card time { margin-inline-start: auto; color: var(--muted); font-size: .75rem; white-space: nowrap; }

.ranking { padding: .75rem clamp(1.1rem, 2.6vw, 2.25rem) 1.25rem; list-style: none; }
.ranking li {
  display: grid;
  grid-template-columns: 1.3rem 1.75rem 2.25rem 3rem minmax(.75rem, 1fr) 4rem;
  gap: clamp(.3rem, .8vw, .85rem);
  align-items: center;
  min-height: 3.1rem;
  font-size: .82rem;
}
.ranking img { width: 1.65rem; height: 1.65rem; object-fit: cover; border-radius: 50%; }
.rank { display: grid; place-items: center; color: var(--muted); }
.rank .icon { grid-area: 1 / 1; font-size: 1.3rem; }
.rank b { grid-area: 1 / 1; z-index: 1; }
.rank-1 { color: #212123; }
.rank-2 { color: #545457; }
.rank-3 { color: #6b6b70; }
.rank:has(svg) b { color: white; font-size: .62rem; margin-top: .14rem; }
.dept { color: var(--muted); }
.meter { display: block; width: 100%; height: .4rem; }
.meter-track { fill: #ebedf2; }
.meter-value { fill: #313f59; }
.ranking li:first-child .meter-value { fill: var(--blue); }
.score { text-align: end; white-space: nowrap; }
.score b { color: var(--ink); }

dialog {
  width: min(92vw, 33rem);
  max-height: 85dvh;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1rem 3rem #14274738;
}
dialog::backdrop { background: #0c1e42a0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.dialog-head h2 { font-size: 1.25rem; }
.dialog-close { width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; color: var(--blue); background: var(--blue-tint); font-size: 1.35rem; }
#dialog-body { font-size: .95rem; }
#dialog-body input { width: 100%; padding: .65rem .8rem; border: 1px solid #aab9d2; font: inherit; }
#dialog-body .ranking { padding: 0; }
.dialog-list { list-style: none; padding: 0; }
.dialog-list li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.dialog-list button { border: 0; padding: 0; background: none; text-align: left; }
.dialog-list button:hover { color: var(--blue); text-decoration: underline; }

@media (max-width: 760px) {
  :root { --inset: 1rem; }
  .wrap { width: min(92%, 36rem); }
  .hero-header { padding-block: max(.2rem, env(safe-area-inset-top)) .75rem; }
  .hero-header-inner { flex-direction: column; align-items: stretch; gap: 0; }
  .hero-brand { align-self: center; font-size: .95rem; }
  .hero-brand-mark { width: 1.25rem; height: 1.25rem; }
  .hero-nav { justify-content: space-between; gap: .25rem; font-size: .75rem; }
  .hero-nav a { justify-content: center; flex: 1; }
  .map-preview { grid-template-columns: minmax(0, 1fr); padding: .85rem 3rem .9rem .85rem; gap: .6rem; }
  .map-open { justify-self: start; }
  .pair { grid-template-columns: 1fr; row-gap: 1.75rem; }
  .feed-card { grid-template-columns: 1fr; }
  .feed-art { aspect-ratio: 2.6; }
  .course-grid, .teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-copy, .teacher > div { padding: .75rem; }
  .course-meta { font-size: .69rem; }
  .play { width: 1.35rem; height: 1.35rem; }
  .play .icon { width: .78rem; height: .78rem; }
  .feature--showcase .feature-card { grid-template-columns: 1fr; }
  .feature-copy .pill { margin-top: .9rem; }
  .teacher p { font-size: .75rem; }
}
@media (max-width: 380px) {
  .section-head h2 small { display: block; margin-top: .2rem; }
  .course-copy { padding: .65rem; }
  .course-meta { font-size: .64rem; }
  .ranking { padding-inline: .65rem; }
  .ranking li { gap: .25rem; font-size: .75rem; }
}
