@import url("./tokens.css");
/* 01 基础与可访问性 */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  font-size: 14px;
  line-height: 1.7;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 40px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -1px;
}
h2 {
  font-size: 25px;
  line-height: 1.4;
}
h3 {
  font-size: 17px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  transition:
    background var(--duration),
    color var(--duration),
    box-shadow var(--duration),
    transform var(--duration);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
button:not(:disabled):hover {
  filter: brightness(0.96);
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--paper);
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
/* 02 共享组件 */
.primary,
.secondary,
.run-button,
.apply-button,
.small-primary,
.record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.primary,
.run-button {
  background: var(--green);
  color: white;
}
.primary:hover,
.run-button:not(:disabled):hover {
  background: #163c2f;
}
.secondary,
.small-primary {
  background: var(--paper);
  border: 1px solid var(--line);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--green);
  min-height: 40px;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.arrow {
  font-size: 21px;
  font-weight: 400;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
}
.tag,
.eyebrow,
.section-index,
.rail-label {
  font-size: 11px;
  letter-spacing: 1.3px;
  font-weight: 600;
  color: var(--green);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow:before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
}
.pill {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 12px;
  background: var(--paper);
}
.segment {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: #e9e9e0;
  border-radius: 12px;
}
.segment button {
  padding: 10px 20px;
  border-radius: 8px;
  min-height: 44px;
  white-space: nowrap;
}
.segment .selected {
  background: var(--paper);
  box-shadow: 0 2px 6px #203d3510;
  font-weight: 600;
}
/* 03 导航 */
.header {
  min-height: 72px;
  padding: 0 max(28px, 4vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  border-radius: 16px 16px 16px 4px;
  background: var(--green);
  color: #f7f2dc;
  font-family: var(--font-editorial);
  font-size: 26px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 2.4px;
  font-weight: 500;
  color: var(--muted);
  margin-top: -3px;
}
.header nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--body);
  white-space: nowrap;
}
.header nav a.active {
  background: var(--soft);
  color: var(--green);
  font-weight: 650;
}
.header-end {
  display: flex;
  gap: 14px;
  align-items: center;
}
.prototype {
  display: none;
}
.account-entry {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-end .text-link {
  white-space: nowrap;
}
/* 04 首页：编辑式封面与学习入口 */
.page {
  max-width: 1440px;
  margin: auto;
  padding: 40px max(28px, 4vw) 36px;
}
#main:focus { outline: none; }
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  min-height: 440px;
  padding: 12px 0 36px;
}
.hero h1 {
  font-family: var(--font-editorial);
  font-size: clamp(38px, 4.1vw, 60px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  margin: 22px 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--green);
  background: linear-gradient(transparent 80%, #d9dfc7 80%);
}
.hero-copy > p {
  color: var(--body);
  font-size: 15px;
  line-height: 2;
  max-width: 420px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
}
.hero-actions .primary {
  min-height: 50px;
  padding: 12px 26px;
}
.hero-facts {
  display: flex;
  gap: 22px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 12px;
}
.hero-facts span:before {
  content: "✓";
  margin-right: 7px;
  color: var(--green);
}
.hero-visual {
  height: 430px;
  background: #e6e9dc;
  border: 1px solid #d8ddcc;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.hero-visual:before {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid #c5cdb9;
  border-radius: 50%;
  left: calc(50% - 155px);
  top: 45px;
  box-shadow:
    0 0 0 38px #dce1d233,
    0 0 0 76px #dce1d244;
}
.hero-visual > svg {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 18px 0;
}
.visual-label {
  position: absolute;
  top: 24px;
  left: 26px;
  font-size: 10px;
  letter-spacing: 1.8px;
  z-index: 1;
}
.visual-foot {
  position: absolute;
  bottom: 20px;
  left: 26px;
  right: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #cbd2c0;
  padding-top: 12px;
  font-size: 12px;
  color: var(--body);
}
.formula {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 25px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin: 28px 0 22px;
}
.section-head h2 {
  margin-top: 6px;
}
.section-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 7px;
}
.section-index {
  color: var(--muted);
  font-size: 10px;
}
.paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.path-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  position: relative;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-height: 180px;
}
.path-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #a7b5a4;
}
.path-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--soft);
  flex-shrink: 0;
}
.path-icon svg {
  width: 36px;
  height: 36px;
}
.path-card > div:nth-child(2) {
  width: calc(100% - 72px);
}
.path-card p {
  color: var(--body);
  font-size: 13px;
  margin: 5px 0;
}
.path-card small {
  color: var(--muted);
  font-size: 12px;
}
.path-card > .arrow {
  position: absolute;
  right: 20px;
  top: 18px;
  color: var(--muted);
}
.path-card:nth-child(2) .path-icon {
  background: var(--orange-soft);
  color: var(--orange);
}
.path-card:nth-child(3) {
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}
.path-card:nth-child(3) .path-icon {
  background: #ffffff16;
  color: #dce6c9;
}
.path-card:nth-child(3) p,
.path-card:nth-child(3) small,
.path-card:nth-child(3) > .arrow {
  color: #d5dfd2;
}
.feature-row {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.experiment-feature {
  display: flex;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.mini-scene {
  width: 85px;
  height: 85px;
  border-radius: 16px;
  background: #e9dfcf;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mini-scene svg {
  width: 60px;
  height: 60px;
  color: #8a704d;
}
.experiment-feature h3 {
  margin: 5px 0;
}
.experiment-feature p {
  font-size: 12px;
  color: var(--body);
}
.experiment-feature .text-link {
  margin-left: auto;
  white-space: nowrap;
}
.method-note {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  display: flex;
  gap: 20px;
  align-items: center;
}
.method-number {
  font-size: 42px;
  color: var(--orange);
  font-family: Georgia, serif;
}
.method-note p {
  font-size: 13px;
  color: var(--body);
}
.site-registration {
  flex: 0 0 auto;
  padding: 4px 12px max(4px, env(safe-area-inset-bottom));
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 24px;
}
.site-registration a { display: inline-block; color: inherit; text-underline-offset: 3px; }
.site-registration a:hover, .site-registration a:focus-visible { color: var(--green); text-decoration: underline; }
.home-footer {
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}
/* 05 课程地图 */
.course-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 10px 0 28px;
}
.course-top h1 {
  font-family: var(--font-editorial);
  font-weight: 500;
  font-size: 40px;
  margin: 14px 0;
}
.course-top p {
  color: var(--body);
}
.course-intro {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 18px 0 24px;
  color: var(--muted);
  font-size: 12px;
}
.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}
.course-list {
  display: grid;
  gap: 12px;
}
.course-card {
  display: flex;
  gap: 22px;
  align-items: center;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  width: 100%;
}
.course-card:hover {
  border-color: #a1b29e;
}
.course-card.chosen {
  border-color: var(--green);
  box-shadow: inset 4px 0 var(--green);
  background: #edf0e7;
}
.course-num {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--soft);
  font:
    22px Georgia,
    serif;
  color: var(--green);
}
.course-info {
  flex: 1;
  min-width: 0;
}
.course-info h3 {
  font-size: 16px;
}
.course-info p {
  font-size: 13px;
  color: var(--body);
  margin-top: 6px;
}
.course-card > .arrow {
  color: var(--muted);
}
.course-aside {
  position: sticky;
  top: 24px;
  align-self: start;
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--green);
  color: var(--paper);
}
.course-aside .tag,
.course-aside p,
.course-aside ol {
  color: #d7e1d1;
}
.course-aside h2 {
  font-family: var(--font-editorial);
  font-weight: 500;
  font-size: 26px;
  margin: 18px 0;
}
.course-aside p {
  font-size: 13px;
}
.course-aside ol {
  padding-left: 20px;
  font-size: 13px;
  line-height: 2.5;
}
.course-aside hr {
  border: 0;
  border-top: 1px solid #ffffff26;
  margin: 24px 0;
}
.course-aside .primary {
  background: #e5eacb;
  color: var(--green);
  width: 100%;
  margin-top: 24px;
}
.course-aside .muted {
  font-size: 12px;
}
/* 06 实验工作台：步骤 / 画布与证据 / 条件 */
.lab-page {
  max-width: 1800px;
  margin: auto;
  padding: 24px 28px 40px;
}
.lab-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.breadcrumbs {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.lab-heading h1 {
  font-size: 28px;
  margin-top: 7px;
}
.lab-heading-right {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--body);
  font-size: 12px;
}
.lab-grid {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: start;
}
.steps-rail {
  padding: 16px 0;
}
.rail-label {
  font-size: 10px;
  margin-bottom: 22px;
  color: var(--muted);
}
.step-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--body);
}
.step-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 1px solid #c7d0c0;
  border-radius: 50%;
  font-size: 11px;
}
.step-button.current {
  background: var(--soft);
  font-weight: 600;
  color: var(--green);
}
.step-button.current .step-num {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.step-detail {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}
.step-detail h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.step-detail p {
  font-size: 13px;
  color: var(--body);
  line-height: 1.9;
}
.prediction {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 16px;
}
.prediction button {
  min-height: 40px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-size: 12px;
}
.prediction .selected {
  border-color: var(--green);
  background: var(--soft);
}
.small-primary {
  width: 100%;
  font-size: 12px;
  margin-top: 16px;
  padding: 10px 8px;
}
.step-feedback {
  margin-top: 14px;
  color: var(--green) !important;
}
.lab-center {
  min-width: 0;
}
.stage-card,
.data-card,
.parameters {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-size: 12px;
}
.stage-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
.stage-tools button {
  font-size: 12px;
  min-height: 32px;
  color: var(--body);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #8b9d83;
  border-radius: 50%;
  margin-right: 7px;
}
.status-dot.live {
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
}
.force-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--body);
  font-size: 12px;
  min-height: 32px;
}
.force-toggle input {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}
.stage-viewport {
  height: 320px;
  position: relative;
  overflow: hidden;
  background: #eeeee3;
  margin: 0 12px;
  border-radius: 10px;
}
.stage-caption {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11px;
  color: var(--body);
  z-index: 1;
  pointer-events: none;
}
.stage-caption span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}
#scene {
  width: 100%;
  height: 100%;
  touch-action: none;
}
#scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.transport {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}
.run-button {
  min-width: 110px;
  padding: 10px 16px;
}
.reset-button {
  min-height: 44px;
  font-size: 12px;
  padding: 8px;
}
.transport-time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  white-space: nowrap;
}
.transport-time small {
  font-size: 11px;
  color: var(--muted);
  margin-right: 8px;
}
.speed-select {
  padding: 8px;
  background: var(--bg);
  color: var(--body);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  font-size: 12px;
}
.readings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.reading {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.reading-label {
  color: var(--muted);
  font-size: 12px;
}
.reading-value {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.reading-value small {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 7px;
}
.data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
}
.data-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
}
.data-tabs button {
  position: relative;
  white-space: nowrap;
  padding: 15px 0;
  font-size: 12px;
  min-height: 46px;
  color: var(--muted);
}
.data-tabs button.selected {
  color: var(--green);
  font-weight: 600;
}
.data-tabs button.selected:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
}
.count {
  font-size: 10px;
  padding: 1px 5px;
  background: var(--soft);
  border-radius: 5px;
}
.data-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 6px 0 6px auto;
}
.record-button {
  background: var(--soft);
  color: var(--green);
  border: 1px solid #ced8c5;
  font-size: 12px;
  min-height: 36px;
  padding: 6px 12px;
  white-space: nowrap;
}
.export-button {
  font-size: 12px;
  min-height: 36px;
  white-space: nowrap;
}
.plot-area {
  height: 185px;
  padding: 12px 16px 4px;
  position: relative;
}
.plot-area svg {
  width: 100%;
  height: 100%;
}
.plot-legend {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 11px;
  color: var(--green);
}
.plot-legend:before {
  content: "—";
  margin-right: 5px;
}
.parameters {
  padding: 22px;
}
.panel-title {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.panel-title h2 {
  font-size: 17px;
}
.panel-title span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.parameter {
  margin-top: 23px;
}
.parameter label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.unit-input {
  display: flex;
  gap: 3px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px;
}
.unit-input input {
  width: 40px;
  border: 0;
  background: transparent;
  text-align: right;
  color: var(--ink);
  font-size: 14px;
  appearance: textfield;
}
.unit-input input::-webkit-inner-spin-button {
  appearance: none;
}
.unit-input span {
  font-size: 11px;
  color: var(--muted);
}
input[type="range"] {
  width: 100%;
  height: 18px;
  accent-color: var(--green);
  margin: 14px 0 2px;
  cursor: pointer;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.param-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 20px 0 14px;
}
.apply-button {
  width: 100%;
  background: var(--soft);
  color: var(--green);
  border: 1px solid #cbd5c2;
  font-size: 12px;
}
.model-note {
  padding: 18px 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.model-note summary {
  cursor: pointer;
  color: var(--body);
}
.model-note p {
  margin-top: 12px;
}
.record-scroll {
  max-height: 250px;
  min-height: 180px;
  overflow: auto;
}
.records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.records-table th,
.records-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.records-table th {
  font-weight: 500;
  background: var(--bg);
  color: var(--body);
  position: sticky;
  top: 0;
}
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 13px;
}
.note-area {
  padding: 18px;
}
.note-area label {
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}
.note-area textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  font-size: 13px;
}
.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.note-footer button {
  padding: 8px 14px;
  min-height: 40px;
  background: var(--soft);
  border-radius: 8px;
  color: var(--green);
}
/* 07 弹窗、账号与反馈 */
dialog {
  width: min(540px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 120px #203d3533;
}
dialog::backdrop {
  background: #152d2566;
  backdrop-filter: blur(6px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.dialog-heading h2 {
  font-family: var(--font-editorial);
  font-size: 28px;
  font-weight: 500;
}
dialog p,
dialog ol {
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--body);
}
.account-form {
  display: grid;
  gap: 16px;
}
.account-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
}
.account-form input {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  min-width: 0;
}
.auth-error {
  color: #a43825 !important;
  margin: 0 !important;
}
.auth-switch,
.logout {
  margin-top: 18px;
}
.membership-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
}
.membership-plans section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}
.membership-plans section:last-child {
  background: var(--green);
  color: var(--paper);
}
.membership-plans section:last-child p {
  color: var(--soft);
}
.membership-plans p {
  margin: 12px 0 0;
}
.membership-page {
  padding-bottom: 80px;
}
#pricing-root {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-areas: "intro selection" "notice selection" "benefits selection" "checkout checkout";
  gap: 24px 48px;
  align-items: start;
}
#pricing-root > .membership-heading {
  grid-area: intro;
  padding: 0;
}
#pricing-root > .purchase-notice {
  grid-area: notice;
  margin: 0;
}
#pricing-root > .plan-layout {
  display: contents;
}
#pricing-root .plan-selection {
  grid-area: selection;
  padding-top: 0;
}
#pricing-root .plan-benefits {
  grid-area: benefits;
}
#pricing-root > .checkout-panel {
  grid-area: checkout;
  margin: 0;
}
#pricing-root > .access-card {
  grid-column: 1 / -1;
}
.environment-banner {
  background: var(--orange-soft);
  color: var(--ink);
  padding: 8px 20px;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}
.membership-heading {
  max-width: 800px;
  padding: 24px 0 32px;
}
.membership-heading h1,
.learning-welcome h1 {
  font: 500 clamp(32px, 3.8vw, 48px) / 1.4 var(--font-editorial);
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.membership-heading p,
.learning-welcome p {
  color: var(--body);
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 24px;
}
.purchase-notice {
  border-left: 3px solid var(--orange);
  background: var(--orange-soft);
  padding: 14px 20px;
  margin: 0 0 28px;
  line-height: 1.8;
  font-size: 14px;
}
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
}
.plan-benefits {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.plan-benefits h2 {
  font: 500 32px/1.5 var(--font-editorial);
  margin: 14px 0 24px;
}
.plan-benefits ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.plan-benefits li {
  padding: 8px 0 8px 10px;
}
.plan-benefits li span {
  display: block;
  color: var(--body);
  margin-top: 4px;
}
.plan-benefits p,
.plan-benefits li,
.plan-selection p {
  color: var(--body);
  font-size: 14px;
  line-height: 1.9;
}
.plan-selection {
  min-width: 0;
  padding-top: 24px;
}
.plan-selection > h2 {
  font-size: 22px;
}
.plan-price {
  font-size: 28px !important;
  font-variant-numeric: tabular-nums;
}
.plan-selection .membership-plans button {
  margin-top: 24px;
  width: 100%;
}
.plan-selection .membership-plans section:last-child button {
  background: var(--paper);
  color: var(--green);
}
.checkout-panel:not(:empty),
.access-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
}
.access-card {
  max-width: 760px;
  margin: 40px auto;
}
.access-card h1,
.checkout-panel h2 {
  font: 500 28px/1.5 var(--font-editorial);
  margin: 16px 0;
}
.access-card p,
.checkout-panel p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--body);
  margin: 12px 0;
}
.access-card > .text-link {
  display: inline-block;
  margin-top: 24px;
}
.purchase-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.8;
  margin: 24px 0;
}
.purchase-consent input {
  margin-top: 6px;
  accent-color: var(--green);
}
.order-reference {
  overflow-wrap: anywhere;
}
.learning-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 64px;
  align-items: center;
  padding: 24px 0 48px;
}
.membership-pass {
  background: var(--green);
  color: var(--paper);
  padding: 32px;
  border-radius: var(--radius-lg);
}
.membership-pass h2 {
  font: 500 26px/1.5 var(--font-editorial);
  margin: 20px 0 16px;
}
.membership-pass p,
.membership-pass .tag,
.membership-pass .text-link {
  color: var(--soft);
}
.learning-course-list {
  border-top: 1px solid var(--line);
}
.learning-course {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.learning-course h3 {
  margin: 8px 0;
  font-size: 20px;
}
.learning-course p {
  font-size: 14px;
  color: var(--body);
  line-height: 1.8;
}
.course-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.course-progress progress {
  width: 100px;
  height: 6px;
  accent-color: var(--green);
  border: 0;
}
.course-progress progress::-webkit-progress-bar {
  background: var(--line);
  border-radius: var(--radius-sm);
}
.course-progress progress::-webkit-progress-value {
  background: var(--green);
  border-radius: var(--radius-sm);
}
.orders-section {
  margin-top: 48px;
}
.order-list,
.account-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 8px 24px;
}
.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  font-size: 14px;
}
.order-row + .order-row {
  border-top: 1px solid var(--line);
}
.order-row small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.account-empty {
  padding: 24px;
  font-size: 14px;
}
.account-empty p {
  margin-bottom: 12px;
  color: var(--body);
}
.learning-sync {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.sync-actions {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.restore {
  margin-top: 12px;
}
.identity {
  font-size: 20px;
  font-weight: 600;
}
.dialog-kicker {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 22px;
  font-size: 13px;
  z-index: 50;
  transition:
    opacity var(--duration),
    transform var(--duration);
  max-width: 90vw;
}
#toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
/* 08 响应式。仅在这里覆盖布局，不在文件末尾追加补丁。 */
@media (min-width: 1101px) and (max-height: 800px) {
  .header {
    min-height: 72px;
  }
  .lab-page {
    padding-top: 18px;
  }
  .lab-heading {
    margin-bottom: 18px;
  }
  .stage-viewport {
    height: 240px;
  }
  .parameters {
    padding: 18px;
  }
  .parameter {
    margin-top: 17px;
  }
  .param-note {
    margin-top: 16px;
  }
  .reading {
    padding: 10px 14px;
  }
  .reading-value {
    font-size: 25px;
  }
}
@media (max-width: 1100px) {
  .header {
    padding: 16px 24px;
    gap: 14px;
  }
  .header nav {
    gap: 0;
  }
  .header nav a {
    padding: 10px 12px;
  }
  .header-end {
    gap: 10px;
  }
  .header-end #help {
    display: none;
  }
  .hero {
    gap: 28px;
  }
  .hero-visual {
    height: 380px;
  }
  .path-card {
    padding: 22px;
  }
  .path-card > div:nth-child(2) {
    width: 100%;
  }
  .feature-row {
    grid-template-columns: 1fr;
  }
  .method-note {
    display: none;
  }
  .lab-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .steps-rail {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0;
  }
  .rail-label {
    grid-column: 1/-1;
    margin: 0;
  }
  .step-button {
    margin: 0;
  }
  .step-detail {
    grid-column: 1/-1;
    margin: 0 0 8px;
    padding: 16px;
    background: var(--soft);
    border: 0;
    border-radius: 12px;
  }
  .step-detail h3 {
    margin: 0 0 5px;
  }
  .prediction {
    display: flex;
  }
  .prediction button {
    min-width: 70px;
  }
  .small-primary {
    width: auto;
  }
  .lab-heading-right .pill {
    display: none;
  }
  .transport-time small {
    display: none;
  }
  .course-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
  }
}
@media (max-width: 850px) {
  #pricing-root {
    display: block;
  }
  #pricing-root > .plan-layout {
    display: grid;
  }
  #pricing-root .plan-selection,
  #pricing-root .plan-benefits {
    grid-area: auto;
  }
  #pricing-root > .purchase-notice {
    margin: 24px 0;
  }
  #pricing-root > .checkout-panel:not(:empty) {
    margin-top: 24px;
  }
  .plan-layout {
    gap: 24px;
    grid-template-columns: 1fr;
  }
  .plan-benefits {
    order: 2;
  }
  .learning-welcome {
    gap: 24px;
    grid-template-columns: 1fr 1fr;
  }
  .membership-pass {
    padding: 24px;
  }
  .header {
    flex-wrap: wrap;
  }
  .header nav {
    order: 3;
    width: 100%;
    justify-content: center;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .header nav a {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
  .header-end {
    margin-left: auto;
  }
  .page {
    padding: 28px 24px;
  }
  .hero {
    min-height: 0;
    padding: 12px 0 24px;
    gap: 24px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero-visual {
    height: 350px;
  }
  .hero-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .hero-copy > p {
    font-size: 14px;
  }
  .wide {
    display: none;
  }
  .hero-facts {
    gap: 10px;
    font-size: 11px;
    flex-wrap: wrap;
  }
  .paths {
    gap: 12px;
  }
  .path-card {
    padding: 18px;
  }
  .path-card h3 {
    font-size: 15px;
  }
  .course-top {
    align-items: start;
    flex-direction: column;
  }
  .course-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .course-aside {
    position: static;
  }
  .course-intro {
    flex-direction: column;
    gap: 5px;
  }
  .lab-page {
    padding: 20px;
  }
  .lab-heading-right > span {
    display: none;
  }
  .lab-grid {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .parameters {
    padding: 16px;
  }
  .parameter label {
    font-size: 12px;
  }
  .stage-tools {
    gap: 8px;
  }
  .stage-tools button {
    font-size: 11px;
  }
  .stage-head {
    padding: 10px 12px;
  }
  .force-toggle {
    font-size: 11px;
  }
  .stage-viewport {
    height: 270px;
  }
  .transport {
    gap: 5px;
    flex-wrap: wrap;
    padding: 10px;
  }
  .run-button {
    min-width: 100px;
    font-size: 12px;
    padding: 8px 10px;
  }
  .readings {
    gap: 8px;
  }
  .reading {
    padding: 10px 8px;
  }
  .reading-label {
    font-size: 11px;
  }
  .reading-value {
    font-size: 23px;
  }
  .reading-value small {
    font-size: 10px;
    margin-left: 3px;
  }
  .data-tabs {
    gap: 14px;
  }
  .data-actions {
    margin-left: auto;
  }
}
@media (max-width: 600px) {
  .membership-heading {
    padding-top: 12px;
  }
  .learning-welcome {
    grid-template-columns: 1fr;
    padding-top: 12px;
  }
  .learning-course {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
  }
  .learning-course > a {
    grid-column: 2;
    justify-self: start;
  }
  .learning-course h3 {
    font-size: 18px;
  }
  .checkout-panel:not(:empty),
  .access-card {
    padding: 24px;
  }
  .order-row {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .order-row > span:last-child {
    grid-column: 1 / -1;
  }
  .header {
    padding: 14px 18px;
    gap: 12px;
  }
  .brand {
    font-size: 17px;
    gap: 9px;
  }
  .brand-mark {
    width: 34px;
    height: 38px;
    font-size: 23px;
  }
  .brand small {
    font-size: 7px;
  }
  .header-end {
    gap: 8px;
  }
  .header-end .text-link {
    font-size: 12px;
  }
  .account-entry {
    font-size: 12px;
    padding: 8px 10px;
    max-width: 118px;
  }
  .header nav a {
    padding: 9px 6px;
    font-size: 12px;
  }
  .page {
    padding: 24px 20px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero h1 {
    font-size: clamp(32px, 9.5vw, 38px);
    margin: 20px 0;
  }
  .hero-copy > p {
    max-width: 100%;
  }
  .hero-actions {
    gap: 18px;
  }
  .hero-facts {
    gap: 18px;
    margin-top: 18px;
  }
  .hero-visual {
    height: 330px;
  }
  .paths {
    grid-template-columns: 1fr;
  }
  .path-card {
    min-height: 130px;
    flex-wrap: nowrap;
    padding: 22px;
    gap: 18px;
  }
  .path-card > div:nth-child(2) {
    width: calc(100% - 70px);
  }
  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .section-head h2 {
    font-size: 24px;
  }
  .experiment-feature {
    flex-wrap: wrap;
    gap: 14px;
  }
  .experiment-feature > div:nth-child(2) {
    flex: 1;
    min-width: 180px;
  }
  .experiment-feature .text-link {
    margin-left: 0;
  }
  .home-footer {
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
  }
  .course-top h1 {
    font-size: 32px;
  }
  .course-card {
    padding: 18px 14px;
    gap: 14px;
  }
  .course-num {
    min-width: 38px;
    height: 38px;
    font-size: 19px;
  }
  .course-info h3 {
    font-size: 15px;
  }
  .course-info p {
    font-size: 12px;
  }
  .lab-page {
    padding: 18px 14px 32px;
  }
  .lab-heading {
    align-items: start;
    gap: 10px;
  }
  .lab-heading h1 {
    font-size: 25px;
  }
  .lab-heading-right .text-link {
    font-size: 11px;
  }
  .breadcrumbs {
    font-size: 10px;
    gap: 6px;
  }
  .lab-grid {
    display: flex;
    flex-direction: column;
  }
  .steps-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    order: 0;
  }
  .lab-grid > aside:last-child {
    width: 100%;
    order: 1;
  }
  .lab-center {
    width: 100%;
    order: 2;
  }
  .step-detail {
    margin: 0;
  }
  .parameters {
    padding: 20px;
  }
  .panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .panel-title span {
    margin: 0;
  }
  .parameter {
    margin-top: 16px;
  }
  .parameter label {
    font-size: 13px;
  }
  .param-note {
    margin: 16px 0 12px;
  }
  .model-note {
    padding: 12px 4px;
  }
  .stage-viewport {
    height: 290px;
  }
  .transport-time small {
    display: none;
  }
  .transport {
    gap: 8px;
  }
  .readings {
    gap: 8px;
  }
  .reading {
    padding: 12px 9px;
  }
  .reading-value {
    font-size: 25px;
  }
  .data-tabs {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .data-actions {
    margin: 7px 0 10px auto;
  }
  .plot-area {
    height: 180px;
  }
  .note-footer {
    align-items: start;
  }
  .membership-plans {
    gap: 10px;
  }
  .membership-plans section {
    padding: 16px;
  }
  dialog {
    padding: 24px;
  }
  .dialog-heading h2 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Honor HTML visibility even on components with explicit display styles. */
[hidden] { display: none !important; }
