@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url(assets/fonts/manrope-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url(assets/fonts/manrope-greek.woff2) format("woff2");
  unicode-range:
    U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url(assets/fonts/manrope-latin.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
:root {
  --type-hero: clamp(2.25rem, 4.2vw, 3.5rem);
  --type-h2: 2rem;
  --type-h3: 1.375rem;
  --type-body: 1rem;
  --type-small: 0.875rem;
  --type-label: 0.75rem;
  font-size: 16px;

  font-family:
    Manrope,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
  --bg: #101114;
  --surface: #181a1f;
  --raised: #1e2025;
  --text: #e7e9ed;
  --muted: #a0a4ae;
  --line: #303238;
  --accent: #efa76d;
  --accent-ink: #24180f;
  --cool: #95b5bf;
  --green: #a4c5b5;
  --visual-material: #222125;
  --header: rgba(16, 17, 20, 0.96);
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #eeede8;
  --raised: #e6e4de;
  --text: #24252a;
  --muted: #63656b;
  --line: #d4d2cb;
  --accent: #99481c;
  --accent-ink: #fffaf5;
  --cool: #386473;
  --green: #38634e;
  --visual-material: #e8e2d9;
  --header: rgba(246, 245, 241, 0.96);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 16px;
}
button:disabled {
  cursor: default;
  opacity: 0.75;
}
button:hover:not(:disabled) {
  border-color: var(--muted);
}
button[hidden],
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
p {
  color: var(--muted);
  line-height: 1.5;
}
svg {
  display: block;
}
small {
  color: var(--muted);
  line-height: 1.6;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0;
}
legend {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: var(--type-small);
}
.container {
  width: min(1280px, calc(100% - 96px));
  margin-inline: auto;
}
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(1440px, calc(100% - 80px));
  margin: auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--type-h3);
  font-weight: 700;
  letter-spacing: -1px;
}
.brand-mark {
  font-size: var(--type-h2);
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.brand-name {
  white-space: nowrap;
}
.brand-author {
  font-size: var(--type-small);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 4px;
}
.desktop-nav {
  display: flex;
  gap: 30px;
  font-size: var(--type-small);
  color: var(--muted);
}
.desktop-nav a:hover,
.text-link:hover,
.footer-top:hover {
  color: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.grade {
  font-size: var(--type-label);
  letter-spacing: 1.5px;
  color: var(--muted);
}
.icon-button {
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
}
.header-test {
  border-bottom: 1px solid var(--accent);
  font-size: var(--type-small);
  padding: 10px 0;
}
.header-test span {
  color: var(--accent);
  margin-left: 12px;
}
.menu-toggle {
  display: none;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 16px;
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  padding-top: 52px;
  padding-bottom: 48px;
}
.hero {
  position: relative;
  isolation: isolate;
}
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 55% 58%,
      rgba(201, 134, 80, 0.1),
      transparent 48%
    ),
    repeating-radial-gradient(
      ellipse at 55% 58%,
      transparent 0 28px,
      rgba(201, 134, 80, 0.055) 29px 30px,
      transparent 31px 60px
    );
  mask-image: radial-gradient(ellipse, #000 20%, transparent 72%);
}
.eyebrow {
  font-size: var(--type-label);
  letter-spacing: 2px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.eyebrow-separator {
  padding-inline: 6px;
  opacity: 0.5;
}
h1 {
  font-size: var(--type-hero);
  font-weight: 400;
  letter-spacing: -2.8px;
  line-height: 1.13;
  margin: 28px 0 24px;
}
h1 > span {
  color: var(--accent);
}
.hero-description {
  font-size: var(--type-body);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px 20px;
  font-size: var(--type-small);
}
.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
}
.button.primary:hover {
  filter: brightness(1.08);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--type-small);
  min-height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 42px;
  font-size: var(--type-label);
  color: var(--muted);
}
.hero-meta strong {
  font-weight: 400;
  font-size: var(--type-body);
  color: var(--text);
  margin-right: 6px;
}
.hero-meta i {
  width: 1px;
  height: 16px;
  background: var(--line);
}
.thermal-visual {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  min-width: 0;
  background-image: radial-gradient(var(--line) 0.7px, transparent 0.7px);
  background-size: 20px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px 16px;
  color: var(--muted);
}
.visual-top {
  display: flex;
  justify-content: space-between;
  font-size: var(--type-label);
  letter-spacing: 1.5px;
  gap: 12px;
}
.visual-top > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.thermal-svg {
  width: 100%;
  height: auto;
  flex: 1;
  overflow: hidden;
}
.thermal-visual {
  --hero-play-state: paused;
}
.thermal-visual.is-animating {
  --hero-play-state: running;
}
.thermal-display {
  border: 0;
  padding: 0;
  background: transparent;
  display: block;
  width: 100%;
  min-width: 0;
  flex: 1;
  color: inherit;
  border-radius: 8px;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.thermal-display .thermal-svg {
  height: 100%;
  max-height: 410px;
}
.hero-copy {
  min-width: 0;
  position: relative;
  isolation: isolate;
  --hero-play-state: paused;
}
.hero-copy.is-animating {
  --hero-play-state: running;
}
.text-heat-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
  overflow: hidden;
}
.thermal-rotor,
.thermal-orbit {
  transform-origin: 280px 202px;
  animation: thermometer-spin 24s linear infinite;
}
.thermal-orbit {
  animation-duration: 36s;
  animation-direction: reverse;
}
#hero-particles > g {
  animation: particle-vibrate 2.4s ease-in-out infinite alternate;
}
.heat-flow {
  animation: energy-flow 6s linear infinite;
}
.heat-wave {
  transform-origin: 280px 205px;
  animation: heat-trace 6s linear infinite;
  opacity: 0;
}
.heat-wave:nth-child(2) {
  animation-delay: -2s;
}
.heat-wave:nth-child(3) {
  animation-delay: -4s;
}
.thermal-rotor,
.thermal-orbit,
#hero-particles > g,
.heat-flow,
.heat-wave {
  animation-play-state: var(--hero-play-state);
}
@keyframes thermometer-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes particle-vibrate {
  from {
    transform: translate(-1px, -1px);
  }
  to {
    transform: translate(1px, 1px);
  }
}
@keyframes energy-flow {
  to {
    stroke-dashoffset: -120;
  }
}
@keyframes heat-trace {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  18% {
    opacity: 0.5;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
.visual-note {
  font-size: var(--type-label);
  text-align: center;
  margin-top: 4px;
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .thermal-rotor,
  :root:not([data-motion="full"]) .thermal-orbit,
  :root:not([data-motion="full"]) #hero-particles > g,
  :root:not([data-motion="full"]) .heat-flow,
  :root:not([data-motion="full"]) .heat-wave {
    animation: none;
  }
  :root:not([data-motion="full"]) .heat-wave {
    opacity: 0.18;
  }
}
.temperature-challenge {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  width: 100%;
}
.temperature-challenge button {
  font-size: var(--type-label);
  color: var(--accent);
}
.temperature-challenge p {
  font-size: var(--type-label);
  margin-top: 12px;
}
.result-badge {
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: var(--type-h2);
  margin-bottom: 20px;
  animation: badge-arrive 0.5s ease-out both;
}
@keyframes badge-arrive {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-60deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
.visual-bottom {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  font-size: var(--type-label);
}
.thermal-scale {
  height: 3px;
  width: 100px;
  background: linear-gradient(90deg, #efa76d, #95b5bf);
}
.visual-caption {
  text-align: center;
  font-size: var(--type-label);
  margin-top: 12px;
}
.route-strip {
  display: flex;
  align-items: center;
  gap: 32px;
  border-block: 1px solid var(--line);
  padding-block: 24px;
}
.route-label {
  font-size: var(--type-label);
  letter-spacing: 2px;
  color: var(--muted);
  margin-right: 16px;
}
.route-strip a {
  font-size: var(--type-small);
}
.route-strip a span {
  font-size: var(--type-label);
  color: var(--accent);
  margin-right: 12px;
}
.route-arrow {
  color: var(--muted);
  font-size: var(--type-small);
}
.route-end {
  margin-left: auto;
  font-size: var(--type-label);
  color: var(--muted);
}
.route-end span {
  color: var(--accent);
  margin-left: 16px;
}
.section {
  padding-block: 48px;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.section-heading h2,
h2 {
  font-size: var(--type-h2);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -1.2px;
}
.section-heading h2 {
  margin-top: 16px;
}
.section-heading > p {
  font-size: var(--type-small);
  padding-bottom: 3px;
}
.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.concept {
  padding: 28px 28px 24px;
}
.concept + .concept {
  border-left: 1px solid var(--line);
}
.concept-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: var(--type-h3);
  margin-bottom: 28px;
  color: var(--green);
}
.warm {
  color: var(--accent);
}
.cool {
  color: var(--cool);
}
.micro-label {
  font-size: var(--type-label);
  color: var(--muted);
  letter-spacing: 1.5px;
  line-height: 1.5;
}
.concept h3 {
  font-size: var(--type-h3);
  font-weight: 400;
  letter-spacing: -0.5px;
  margin: 10px 0 14px;
}
.concept p {
  font-size: var(--type-small);
}
.example {
  display: block;
  font-size: var(--type-label);
  color: var(--muted);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
.theory-detail {
  border-bottom: 1px solid var(--line);
  margin-top: 16px;
}
.theory-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 20px 0;
  font-size: var(--type-small);
  list-style: none;
}
.theory-detail summary::-webkit-details-marker {
  display: none;
}
.theory-detail summary span {
  font-size: var(--type-h3);
  color: var(--accent);
}
.theory-detail[open] summary span {
  transform: rotate(45deg);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 24px;
}
.detail-grid p {
  font-size: var(--type-small);
}
.detail-grid strong {
  color: var(--text);
  font-weight: 400;
}
.section#formulas {
  padding-top: 0;
}
.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.formula-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 24px;
}
.equation {
  font-family:
    Manrope,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 400;
  font-size: var(--type-h2);
  letter-spacing: -1px;
  min-height: 84px;
  padding-top: 20px;
  color: var(--accent);
}
.equation sub {
  font-size: var(--type-body);
  letter-spacing: 0;
}
.equation > span {
  font-size: var(--type-label);
  letter-spacing: 0;
  white-space: nowrap;
}
.formula-card h3 {
  font-size: var(--type-body);
  font-weight: 400;
  margin: 12px 0;
}
.formula-card p {
  font-size: var(--type-small);
}
.formula-card small {
  font-size: var(--type-label);
  display: block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.lab-section {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.lab-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 32px;
  margin-bottom: 24px;
}
.lab-tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 16px 0;
  font-size: var(--type-label);
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.lab-tabs button span {
  font-size: var(--type-small);
}
.lab-tabs button[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.lab-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.lab-panel > .lab-controls {
  padding: 40px;
}
.lab-controls h3,
.particle-panel h3,
.process-panel h3 {
  font-size: var(--type-h2);
  letter-spacing: -1px;
  line-height: 1.25;
  font-weight: 400;
  margin: 14px 0;
}
.lab-controls > p,
.particle-panel p,
.process-panel p {
  font-size: var(--type-small);
}
.range-block {
  margin-top: 24px;
}
.range-title {
  font-size: var(--type-label);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cool .status-dot {
  background: var(--cool);
}
.range-block label {
  display: flex;
  justify-content: space-between;
  font-size: var(--type-label);
  color: var(--muted);
  margin-top: 12px;
}
.range-block output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 8px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.cool input[type="range"] {
  accent-color: var(--cool);
}
.mix-result {
  border-left: 1px solid var(--line);
  text-align: center;
  padding: 36px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  background-image: radial-gradient(var(--line) 0.65px, transparent 0.65px);
  background-size: 20px 20px;
}
.vessel {
  height: 190px;
  width: 155px;
  border: 1px solid var(--muted);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  position: relative;
  margin: 36px auto 20px;
  background: var(--bg);
}
.vessel:before {
  content: "";
  position: absolute;
  top: -3px;
  left: -10px;
  right: -10px;
  height: 2px;
  background: var(--muted);
}
.water {
  height: 55%;
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  background: color-mix(in srgb, var(--cool) 35%, transparent);
  border-radius: 0 0 14px 14px;
  border-top: 2px solid var(--cool);
  display: grid;
  place-items: center;
  transition:
    background 0.25s,
    border-color 0.25s;
}
.water-label {
  color: var(--text);
  font-size: var(--type-h3);
  font-weight: 400;
  opacity: 0.8;
}
.vessel-ticks {
  position: absolute;
  right: 12px;
  top: 16px;
  bottom: 16px;
  width: 18px;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 19px,
    var(--muted) 19px,
    var(--muted) 20px
  );
  z-index: 1;
  opacity: 0.6;
}
.vessel-mark {
  position: absolute;
  left: 14px;
  top: 20px;
  font-size: var(--type-label);
  letter-spacing: 1px;
  color: var(--muted);
}
.result-temperature {
  font-size: 64px;
  letter-spacing: -3px;
  font-weight: 400;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.result-temperature > span:last-child {
  font-size: var(--type-h3);
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 10px;
}
.mix-result > p {
  font-size: var(--type-label);
  margin-top: 8px;
}
.mix-equation {
  font-family: Manrope, sans-serif;
  font-size: var(--type-small);
  margin: 24px 0 12px;
  color: var(--muted);
}
.mix-result small {
  font-size: var(--type-label);
}
.particle-panel,
.process-panel {
  padding: 36px;
  gap: 40px;
}
.material-options,
.source-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.material-options button,
.source-options button {
  font-size: var(--type-label);
}
.material-options [aria-pressed="true"],
.source-options [aria-pressed="true"],
.quiz-levels [aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--raised);
}
.canvas-wrap {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  height: 240px;
}
.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.canvas-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: var(--type-label);
  letter-spacing: 1px;
  color: var(--muted);
  pointer-events: none;
}
.particle-result {
  align-self: center;
  min-width: 0;
}
.particle-result p {
  margin-top: 16px;
  min-height: 48px;
}
.particle-result small {
  font-size: var(--type-label);
}
.process-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 8px;
}
.process-card h4 {
  font-size: var(--type-h3);
  font-weight: 400;
  line-height: 1.4;
  min-height: 70px;
  margin-top: 20px;
}
.process-answers {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.process-answers button {
  font-size: var(--type-label);
  flex: 1;
}
.process-card p {
  margin-top: 16px;
}
.correct-feedback {
  color: var(--green) !important;
}
.incorrect-feedback {
  color: var(--accent) !important;
}
.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.fact {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  min-height: 225px;
}
.fact-number {
  font-size: var(--type-label);
  letter-spacing: 1.5px;
  color: var(--muted);
}
.fact h3 {
  font-size: var(--type-h3);
  font-weight: 400;
  letter-spacing: -0.8px;
  margin: 20px 0 12px;
}
.fact p {
  font-size: var(--type-small);
  max-width: 80%;
}
.fact-symbol {
  position: absolute;
  right: 28px;
  bottom: 28px;
  font-size: 56px;
  line-height: 1;
  font-weight: 400;
  opacity: 0.5;
}
.quiz-section {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  border-top: 1px solid var(--line);
}
.quiz-intro h2 {
  font-size: var(--type-h2);
  margin: 24px 0;
}
.quiz-intro p {
  font-size: var(--type-small);
}
.quiz-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.quiz-levels button {
  font-size: var(--type-label);
  padding: 10px 12px;
}
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  min-width: 0;
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.quiz-top > span:last-child {
  font-size: var(--type-label);
  color: var(--muted);
}
.progress-track {
  height: 2px;
  background: var(--line);
  margin: 20px 0 28px;
}
.progress-track span {
  display: block;
  height: 100%;
  width: 33.33%;
  background: var(--accent);
}
.quiz-question {
  font-size: var(--type-h3);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
}
.quiz-options {
  display: grid;
  gap: 8px;
}
.quiz-options button {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 12px 16px;
  font-size: var(--type-small);
  background: var(--bg);
  line-height: 1.5;
}
.option-letter {
  font-family: Manrope, sans-serif;
  font-size: var(--type-label);
  color: var(--muted);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  flex-shrink: 0;
}
.quiz-options button.correct {
  border-color: var(--green);
  color: var(--green);
}
.quiz-options button.incorrect {
  border-color: var(--accent);
  color: var(--accent);
}
.quiz-options button:disabled {
  opacity: 1;
}
.quiz-options button:disabled:not(.correct):not(.incorrect) {
  opacity: 0.55;
}
#quiz-feedback {
  font-size: var(--type-label);
  margin-top: 16px;
  min-height: 20px;
}
#quiz-next {
  margin-top: 16px;
}
.quiz-score {
  font-size: 64px;
  color: var(--accent);
  font-weight: 400;
  margin-bottom: 16px;
}
.quiz-complete p {
  font-size: var(--type-small);
  margin-bottom: 24px;
}
.footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 32px;
  flex-wrap: wrap;
}
.footer .brand {
  font-size: var(--type-h3);
}
.footer .brand-author {
  display: block;
  font-size: var(--type-label);
  margin: 4px 0 0;
}
.footer p {
  font-size: var(--type-label);
}
.footer p span {
  display: block;
  font-size: var(--type-label);
}
.footer-top {
  margin-left: auto;
  font-size: var(--type-label);
}
dialog {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: calc(100dvh - 32px);
}
dialog::backdrop {
  background: #0009;
}
.menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--type-label);
  color: var(--muted);
  letter-spacing: 1px;
}
dialog nav {
  display: grid;
  margin: 24px 0;
}
dialog nav a {
  font-size: var(--type-h3);
  font-weight: 400;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
dialog nav a span {
  font-size: var(--type-label);
  color: var(--accent);
}
dialog > p {
  font-size: var(--type-label);
}
body.menu-open {
  overflow: hidden;
}
.noscript {
  padding: 24px;
  text-align: center;
  font-size: var(--type-small);
}
@media (min-width: 1600px) {
  .hero {
    padding-block: 100px;
  }
  .thermal-visual {
    min-height: 500px;
  }
}
@media (max-width: 1100px) {
  .container {
    width: calc(100% - 64px);
  }
  .header-inner {
    width: calc(100% - 48px);
  }
  .desktop-nav {
    gap: 18px;
  }
  .header-actions {
    gap: 12px;
  }
  .grade {
    display: none;
  }
  .hero-actions {
    gap: 16px;
  }
  .hero-meta {
    gap: 16px;
    font-size: var(--type-label);
  }
  .hero {
    gap: 24px;
    padding-top: 56px;
  }
  .route-strip {
    gap: 20px;
  }
  .route-end {
    display: none;
  }
  .concept {
    padding: 24px;
  }
  .formula-card {
    padding: 24px 20px;
  }
  .equation {
    font-size: var(--type-h2);
  }
  .lab-panel > .lab-controls {
    padding: 32px;
  }
  .quiz-section {
    gap: 40px;
  }
  .quiz-levels {
    gap: 6px;
  }
  .quiz-levels button {
    font-size: var(--type-label);
  }
  .particle-panel,
  .process-panel {
    gap: 24px;
    padding: 28px;
  }
}
@media (max-width: 950px) {
  .desktop-nav,
  .header-test {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .header-inner {
    gap: 12px;
  }
  .brand {
    gap: 8px;
  }
  .brand-author {
    display: block;
    font-size: var(--type-label);
    line-height: 1.4;
    margin: 2px 0 0;
  }
  .brand-name {
    line-height: 1.1;
  }
  .brand-mark {
    font-size: var(--type-h2);
  }
}
@media (max-width: 767px) {
  :root {
    scroll-padding-top: 84px;
  }
  .container {
    width: calc(100% - 40px);
  }
  .header-inner {
    min-height: 68px;
    width: calc(100% - 40px);
  }
  .desktop-nav,
  .header-test {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .header-actions {
    gap: 8px;
  }
  .brand {
    font-size: var(--type-h3);
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 36px;
    gap: 24px;
  }
  .eyebrow {
    font-size: var(--type-label);
    letter-spacing: 1.5px;
  }
  h1 {
    font-size: var(--type-hero);
    letter-spacing: -2px;
    margin: 24px 0 20px;
  }
  .hero-description {
    font-size: var(--type-body);
  }
  .hero-actions {
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 24px;
  }
  .hero-meta {
    margin-top: 28px;
    gap: 16px;
    font-size: var(--type-label);
  }
  .hero-meta strong {
    font-size: var(--type-small);
  }
  .thermal-visual {
    padding: 16px;
    max-height: none;
    min-height: 285px;
  }
  .thermal-svg {
    max-height: 290px;
  }
  .visual-caption {
    margin-top: 10px;
  }
  .visual-top {
    font-size: var(--type-label);
    letter-spacing: 1px;
  }
  .route-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-block: 20px;
  }
  .route-label {
    grid-column: 1/-1;
    margin: 0;
    font-size: var(--type-label);
  }
  .route-arrow {
    display: none;
  }
  .route-strip a {
    font-size: var(--type-label);
    white-space: nowrap;
  }
  .route-strip a span {
    margin-right: 6px;
    font-size: var(--type-label);
  }
  .section {
    padding-block: 44px;
  }
  .section-heading {
    display: block;
    margin-bottom: 24px;
  }
  .section-heading h2 {
    font-size: var(--type-h2);
    letter-spacing: -1px;
    margin-top: 12px;
  }
  .section-heading > p {
    font-size: var(--type-label);
    margin-top: 12px;
  }
  .section-heading > p br {
    display: none;
  }
  .concept-grid {
    grid-template-columns: 1fr;
  }
  .concept + .concept {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .concept {
    padding: 24px;
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 16px;
  }
  .concept-icon {
    grid-column: 1;
    grid-row: 1/3;
    margin: 0;
  }
  .concept .micro-label,
  .concept h3 {
    grid-column: 2;
  }
  .concept h3 {
    font-size: var(--type-h3);
    margin: 8px 0 16px;
  }
  .concept p,
  .concept .example {
    grid-column: 1/-1;
  }
  .concept p {
    font-size: var(--type-small);
  }
  .example {
    margin-top: 16px;
    padding-top: 12px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .formula-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .formula-card {
    padding: 24px;
  }
  .equation {
    font-size: var(--type-h2);
    min-height: 72px;
  }
  .formula-card small {
    margin-top: 16px;
  }
  .lab-tabs {
    gap: 0;
    justify-content: space-between;
    margin-bottom: 20px;
  }
  .lab-tabs button {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 4px;
    font-size: var(--type-label);
  }
  .lab-tabs button span {
    font-size: var(--type-label);
  }
  .lab-panel {
    grid-template-columns: 1fr;
  }
  .lab-panel > .lab-controls {
    padding: 24px;
  }
  .lab-controls h3 {
    font-size: var(--type-h2);
  }
  .range-block {
    margin-top: 20px;
  }
  .mix-result {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px;
  }
  .vessel {
    height: 150px;
    width: 125px;
    margin: 24px auto 16px;
  }
  .result-temperature {
    font-size: 52px;
  }
  .mix-equation {
    margin-top: 20px;
  }
  .particle-panel,
  .process-panel {
    padding: 24px;
    gap: 24px;
  }
  .particle-panel h3,
  .process-panel h3 {
    font-size: var(--type-h3);
  }
  .canvas-wrap {
    height: 200px;
  }
  .source-options button {
    flex: 1;
  }
  .process-card {
    padding: 20px;
  }
  .process-answers {
    flex-direction: column;
  }
  .process-card h4 {
    font-size: var(--type-h3);
  }
  .facts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .fact {
    padding: 24px;
    min-height: 215px;
  }
  .fact h3 {
    font-size: var(--type-h3);
  }
  .fact p {
    max-width: 85%;
    font-size: var(--type-small);
  }
  .fact-symbol {
    font-size: var(--type-h2);
    right: 18px;
    bottom: 20px;
  }
  .quiz-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .quiz-intro h2 {
    font-size: var(--type-h2);
    margin: 20px 0;
  }
  .quiz-levels button {
    font-size: var(--type-label);
  }
  .quiz-card {
    padding: 24px;
  }
  .quiz-question {
    font-size: var(--type-h3);
  }
  .quiz-options button {
    font-size: var(--type-label);
  }
  .footer {
    gap: 20px;
    padding-block: 24px;
  }
  .footer p {
    font-size: var(--type-label);
  }
  .footer-top {
    margin-left: 0;
  }
  .theory-detail summary {
    font-size: var(--type-small);
  }
  .button {
    font-size: var(--type-small);
    gap: 20px;
  }
}
@media (max-width: 359px) {
  .container,
  .header-inner {
    width: calc(100% - 32px);
  }
  h1 {
    font-size: var(--type-h2);
    letter-spacing: -1.7px;
  }
  .hero-meta {
    gap: 10px;
    font-size: var(--type-label);
  }
  .hero-meta strong {
    font-size: var(--type-label);
    margin-right: 3px;
  }
  .hero-actions {
    gap: 8px 20px;
  }
  .lab-tabs button span {
    font-size: var(--type-label);
  }
  .quiz-levels button {
    font-size: var(--type-label);
    padding: 10px;
  }
  .quiz-card {
    padding: 20px;
  }
  .equation {
    font-size: var(--type-h2);
  }
  .fact p {
    max-width: 90%;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) {
    scroll-behavior: auto;
  }
  :root:not([data-motion="full"]) *,
  :root:not([data-motion="full"]) *:before,
  :root:not([data-motion="full"]) *:after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .header,
  dialog,
  .hero-actions,
  .route-strip,
  .lab-tabs,
  .quiz-levels,
  .footer-top {
    display: none !important;
  }
  :root {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --text: #000;
    --muted: #444;
    --line: #aaa;
    --accent: #7a3919;
  }
  .container {
    width: 100%;
  }
  .section,
  .hero {
    padding-block: 24px;
  }
  .thermal-visual {
    max-height: 320px;
  }
  .concept,
  .formula-card,
  .fact,
  .quiz-card {
    break-inside: avoid;
  }
}

/* Native transforms: a gentle invitation before the first spin. */
.play-section .section-heading,
.learn-section .section-heading,
.experiments-section .section-heading {
  display: block;
  max-width: 740px;
  margin-inline: auto;
  text-align: center;
}
.play-section .section-heading p,
.learn-section .section-heading p,
.experiments-section .section-heading p {
  max-width: 540px;
  margin: 20px auto 0;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  max-width: 1100px;
  margin-inline: auto;
}
.wheel-panel {
  padding: 36px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.wheel-stage {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: 0 auto 28px;
}
.thermal-wheel {
  position: absolute;
  inset: 0;
}
.wheel-stage.scene-active .thermal-wheel:not(.has-spun) .wheel-art {
  animation: wheel-invitation 6s ease-in-out infinite alternate;
}
@keyframes wheel-invitation {
  from {
    transform: rotate(-4deg);
  }
  to {
    transform: rotate(4deg);
  }
}
.wheel-stage:is(:hover, :focus-within, :active)
  .thermal-wheel:not(.has-spun)
  .wheel-art {
  animation-duration: 1.8s;
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"])
    .wheel-stage.scene-active
    .thermal-wheel:not(.has-spun)
    .wheel-art {
    animation: none;
  }
}
.wheel-art {
  display: block;
  width: 100%;
  height: 100%;
}
.wheel-rim {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 2;
}
.wheel-sector {
  stroke: var(--line);
  stroke-width: 1;
}
.sector-0 {
  fill: var(--surface);
}
.sector-1 {
  fill: var(--raised);
}
.wheel-icon {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ink-warm {
  stroke: var(--accent);
}
.ink-cool {
  stroke: var(--cool);
}
.wheel-number {
  font-size: var(--type-body);
  fill: var(--accent);
  letter-spacing: 0.08em;
}
.wheel-word {
  font-size: var(--type-body);
  fill: var(--text);
}
.wheel-hub-ring {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 2;
}
.wheel-pointer {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  z-index: 2;
  width: 16px;
  height: 24px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.wheel-center {
  position: absolute;
  inset: 35%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--type-small);
  font-weight: 700;
  border: 1px solid var(--accent);
  transition:
    background-color 0.2s,
    scale 0.2s;
}
.wheel-center:hover:not(:disabled) {
  scale: 1.05;
  border-color: var(--accent);
}
.wheel-center:active:not(:disabled) {
  scale: 0.96;
}
.wheel-spin-mark {
  font-size: var(--type-h3);
  line-height: 1;
}
#wheel-topic {
  min-height: 2.6em;
  display: grid;
  place-items: center;
  line-height: 1.5;
}
#wheel-score {
  font-size: var(--type-small);
  color: var(--muted);
  margin-top: 16px;
}
.play-question {
  padding: 36px;
  min-width: 0;
}
.play-question .quiz-question {
  margin-top: 24px;
}
.play-question p {
  color: var(--muted);
}
.topic-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 24px;
  padding-left: 22px;
  margin-top: 28px;
  font-size: var(--type-small);
  color: var(--text);
}
.topic-list li {
  min-width: 0;
  overflow-wrap: anywhere;
}
#wheel-feedback {
  margin-top: 24px;
  line-height: 1.55;
}
#wheel-feedback.correct-feedback {
  color: var(--green);
}
#wheel-feedback.incorrect-feedback {
  color: var(--accent);
}
.lesson-list {
  border-top: 1px solid var(--line);
}
.mini-lesson {
  border-bottom: 1px solid var(--line);
}
.mini-lesson summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 0;
  cursor: pointer;
}
.mini-lesson summary::-webkit-details-marker {
  display: none;
}
.mini-lesson summary h3 {
  flex: 1;
  font-size: var(--type-h3);
  font-weight: 400;
  margin: 0;
}
.lesson-number {
  font-size: var(--type-label);
  letter-spacing: 0.08em;
  color: var(--accent);
}
.mini-lesson[open] summary > :last-child {
  transform: rotate(45deg);
}
.lesson-body {
  padding: 0 32px 24px 38px;
  max-width: 850px;
  line-height: 1.55;
  color: var(--muted);
}
.lesson-task {
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  margin-top: 16px;
}
.lesson-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: var(--type-small);
  max-width: 800px;
  line-height: 1.55;
}
@media (max-width: 700px) {
  .play-layout {
    grid-template-columns: 1fr;
  }
  .wheel-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 24px;
  }
  .wheel-stage {
    width: min(100%, 320px);
  }
  .play-question {
    padding: 24px;
  }
  .topic-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .mini-lesson summary {
    gap: 14px;
  }
  .lesson-body {
    padding-left: 26px;
    padding-right: 0;
  }
}

.lesson-list {
  max-width: 1000px;
  margin-inline: auto;
}
.experiment-intro {
  max-width: 690px;
  margin: -12px auto 36px;
  text-align: center;
  color: var(--muted);
  line-height: 1.55;
}
.experiment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.experiment-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  scroll-margin-top: 110px;
}
.experiment-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.experiment-tag {
  color: var(--muted);
  font-size: var(--type-label);
  text-align: right;
}
.experiment-card h3 {
  font-size: var(--type-h3);
  font-weight: 400;
  line-height: 1.3;
  margin: 20px 0 0;
  min-height: 2.6em;
}
.experiment-figure {
  margin: 20px 0;
}
.experiment-art {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
  border-radius: 12px;
}
.experiment-figure figcaption {
  min-height: 4.5em;
  color: var(--muted);
  font-size: var(--type-label);
  line-height: 1.45;
  margin-top: 12px;
}
.experiment-predict {
  font-size: var(--type-body);
  line-height: 1.45;
  min-height: 2.9em;
}
.experiment-guide summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  min-height: 48px;
  list-style: none;
  border-top: 1px solid var(--line);
  color: var(--accent);
  cursor: pointer;
  font-size: var(--type-small);
}
.experiment-guide summary::-webkit-details-marker {
  display: none;
}
.experiment-guide[open] summary span {
  transform: rotate(45deg);
}
.experiment-steps {
  color: var(--muted);
  font-size: var(--type-small);
  line-height: 1.55;
}
.experiment-steps h4 {
  color: var(--text);
  font-size: var(--type-small);
  font-weight: 700;
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.experiment-steps ol {
  padding-left: 20px;
}
.experiment-steps li + li {
  margin-top: 8px;
}
.experiment-safety {
  margin-top: 20px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}
.experiment-source {
  margin-top: 20px;
  font-size: var(--type-label);
}
.experiment-source a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.experiments-section .lesson-note,
.learn-section .lesson-note {
  margin-inline: auto;
  text-align: center;
}
@media (max-width: 1050px) {
  .experiment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .wheel-panel {
    padding: 28px 20px 20px;
  }
  .play-layout {
    border-radius: 16px;
  }
  .experiment-grid {
    grid-template-columns: 1fr;
  }
  .experiment-card {
    padding: 22px;
  }
  .experiment-predict {
    min-height: 0;
  }
  .experiment-card h3 {
    min-height: 0;
  }
  .experiment-figure figcaption {
    min-height: 0;
  }
  .experiment-intro {
    text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .wheel-center {
    transition: none;
  }
}
@media print {
  .experiment-grid {
    display: block;
  }
  .experiment-card {
    break-inside: avoid;
    margin-bottom: 16px;
  }
}

#hero-title {
  font-size: var(--type-hero);
  letter-spacing: -2px;
  line-height: 1.08;
}
#hero-title > span {
  display: block;
  color: var(--accent);
  margin-top: 4px;
}
.conduction-extra {
  margin-top: 28px;
  border-block: 1px solid var(--line);
}
.conduction-extra summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}
.conduction-extra summary::-webkit-details-marker {
  display: none;
}
.conduction-extra > div {
  max-width: 820px;
  padding-bottom: 24px;
}
.conduction-extra p + p {
  margin-top: 16px;
}
.conduction-extra[open] summary span {
  transform: rotate(45deg);
}
.puzzle-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.puzzle-poster {
  background: var(--surface);
  padding: 36px;
  border-right: 1px solid var(--line);
}
.puzzle-poster h3 {
  font-size: var(--type-h3);
  line-height: 1.25;
  font-weight: 400;
  margin-top: 20px;
}
.puzzle-poster svg {
  width: 100%;
  max-width: 340px;
  margin: 12px auto;
}
.puzzle-poster .text-link {
  margin-top: 20px;
}
.puzzle-case {
  padding: 36px;
  min-width: 0;
}
.puzzle-case .quiz-question {
  margin-top: 0;
}
#puzzle-feedback {
  margin-top: 24px;
  line-height: 1.55;
}
.puzzle-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
#puzzle-score {
  color: var(--muted);
  font-size: var(--type-small);
}
@media (max-width: 700px) {
  .puzzle-layout {
    grid-template-columns: 1fr;
  }
  .puzzle-poster {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 24px;
  }
  .puzzle-case {
    padding: 24px;
  }
}

.browser-upgrade {
  display: none;
}
.browser-outdated body {
  margin: 0;
  background: #f5f6f2;
  color: #152d4b;
  font-family: Arial, sans-serif;
}
.browser-outdated body > * {
  display: none !important;
}
.browser-outdated body > .browser-upgrade {
  display: block !important;
  padding: 32px 20px;
}
.upgrade-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px;
  background: #fff;
  border: 2px solid #dce6e9;
  border-radius: 24px;
  text-align: center;
}
.upgrade-kicker {
  color: #346c7b;
  font-size: var(--type-label);
  font-weight: bold;
  letter-spacing: 1px;
}
.upgrade-runner {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 16px auto;
}
.upgrade-card h2 {
  font-size: var(--type-h2);
  line-height: 1.15;
  margin-bottom: 16px;
  font-weight: bold;
  letter-spacing: -0.5px;
}
.upgrade-card p {
  color: #425b6c;
  line-height: 1.5;
}
.upgrade-links {
  margin: 24px 0;
  text-align: left;
}
.upgrade-links a {
  display: block;
  padding: 14px 16px;
  margin: 8px 0;
  border: 1px solid #b6cbd0;
  border-radius: 12px;
  color: #152d4b;
  text-decoration: none;
  font-weight: bold;
}
.upgrade-links a:hover,
.upgrade-links a:focus {
  background: #eaf8fa;
  outline: 2px solid #2999ae;
  outline-offset: 2px;
}
.upgrade-note {
  font-size: var(--type-small);
}
.runner-body {
  animation: upgrade-bounce 0.4s ease-in-out 12 alternate;
  transform-origin: 150px 100px;
}
.runner-leg,
.runner-arm {
  animation: upgrade-stride 0.4s ease-in-out 12 alternate;
  transform-origin: 143px 96px;
}
.runner-other {
  animation-direction: alternate-reverse;
}
@keyframes upgrade-bounce {
  to {
    transform: translateY(-4px) rotate(3deg);
  }
}
@keyframes upgrade-stride {
  to {
    transform: rotate(-18deg);
  }
}
@media (max-width: 480px) {
  .upgrade-card {
    padding: 20px 16px;
  }
  .upgrade-card h2 {
    font-size: var(--type-h2);
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .runner-body,
  :root:not([data-motion="full"]) .runner-leg,
  :root:not([data-motion="full"]) .runner-arm {
    animation: none;
  }
}

/* Shared type hierarchy: content uses one face and scale on every platform. */
h1,
#hero-title {
  font-size: var(--type-hero);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
h2,
.section-heading h2,
.quiz-intro h2 {
  font-size: var(--type-h2);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h3,
.concept h3,
.formula-card h3,
.fact h3,
.lab-controls h3,
.process-card h3,
.quiz-question,
.mini-lesson summary h3,
.experiment-card h3,
.puzzle-poster h3 {
  font-size: var(--type-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
p,
.hero-description,
.concept p,
.formula-card p,
.fact p,
.quiz-intro p,
.lab-description,
.process-card p,
.experiment-question,
.experiment-caption,
.lesson-body,
.experiment-body,
.experiment-steps {
  font-size: var(--type-body);
  line-height: 1.5;
}
button,
.button,
.quiz-options button,
.quiz-levels button {
  font-size: var(--type-small);
  min-height: 48px;
}
.visual-caption,
.visual-note,
.experiment-source,
.experiment-safety,
.lesson-task,
.lesson-note,
.section-heading > p {
  font-size: var(--type-small);
  line-height: 1.5;
}
.eyebrow,
.micro-label,
.visual-top,
.route-label {
  font-size: var(--type-label);
  line-height: 1.4;
  letter-spacing: 0.1em;
}
@media (max-width: 767px) {
  :root {
    --type-h2: 1.75rem;
    --type-h3: 1.25rem;
  }
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}
.progress-track span {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cool));
}
#wheel-score,
#puzzle-score {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--type-small);
  line-height: 1.25;
}

:root {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.header .brand,
.brand-name {
  min-width: 0;
}
.header .brand {
  flex-shrink: 1;
}
.brand-author {
  white-space: normal;
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
p,
.eyebrow,
.visual-top {
  overflow-wrap: anywhere;
}
.hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.hero-meta {
  flex-wrap: wrap;
}
@media (max-width: 767px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .header-inner .brand,
  .header-actions {
    flex-shrink: 0;
  }
  .header-actions {
    margin-left: auto;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-actions {
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 12px;
  }
  .hero-actions .button {
    gap: 8px;
    padding: 10px 12px;
  }
  .hero-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-height: 2.25rem;
  }
  .hero-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.5;
    min-height: 2.25rem;
  }
  .hero-meta i {
    display: none;
  }
  .route-strip a {
    white-space: normal;
  }
}
@media (max-width: 399px) {
  .hero-actions {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }
}
.water {
  overflow: hidden;
  --water-speed: 3.48s;
  --water-intensity: 0.52;
}
.water-label {
  position: relative;
  z-index: 2;
}
.water-surface {
  position: absolute;
  left: -10%;
  top: -5px;
  width: 120%;
  height: 12px;
  border-radius: 50%;
  background: var(--water-color, var(--cool));
  opacity: 0.25;
  animation: water-sway var(--water-speed) ease-in-out infinite alternate;
}
.water-particles {
  position: absolute;
  inset: 15px 12px 12px;
  opacity: var(--water-intensity);
}
.water-particles i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid var(--water-color, var(--cool));
  background: var(--water-color, var(--cool));
  border-radius: 50%;
  opacity: 0.5;
  animation: water-agitation var(--water-speed) ease-in-out infinite alternate;
}
.water-particles i:nth-child(1) {
  left: 12%;
  top: 28%;
  animation-delay: -1s;
}
.water-particles i:nth-child(2) {
  left: 34%;
  top: 68%;
  animation-delay: -2s;
}
.water-particles i:nth-child(3) {
  left: 54%;
  top: 18%;
  animation-delay: -0.5s;
}
.water-particles i:nth-child(4) {
  left: 76%;
  top: 52%;
  animation-delay: -1.5s;
}
.water-particles i:nth-child(5) {
  left: 16%;
  top: 82%;
  animation-delay: -2.5s;
}
.water-particles i:nth-child(6) {
  left: 68%;
  top: 84%;
  animation-delay: -3s;
}
.mix-result {
  --mix-play-state: paused;
}
.mix-result.is-animating {
  --mix-play-state: running;
}
.water-surface,
.water-particles i {
  animation-play-state: var(--mix-play-state);
}
@keyframes water-sway {
  to {
    transform: translateY(3px) rotate(2deg);
  }
}
@keyframes water-agitation {
  from {
    transform: translate(calc(var(--water-travel) * -1), var(--water-travel));
  }
  to {
    transform: translate(var(--water-travel), calc(var(--water-travel) * -1));
  }
}
.mix-scale {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 310px;
  width: 100%;
  margin: 8px auto 12px;
  font-size: var(--type-small);
  color: var(--muted);
}
.mix-scale-track {
  flex: 1;
  height: 8px;
  position: relative;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cool), var(--accent));
}
#mix-scale-marker {
  position: absolute;
  left: 40%;
  top: -4px;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--text);
  transform: translateX(-50%);
  transition: left 0.2s;
}
.mix-result .mix-motion-note {
  font-size: var(--type-small);
  margin-bottom: 12px;
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .water-surface,
  :root:not([data-motion="full"]) .water-particles i {
    animation: none;
  }
  :root:not([data-motion="full"]) #mix-scale-marker {
    transition: none;
  }
}

#mix-vessel {
  display: block;
  padding: 0;
  color: var(--text);
  cursor: default;
}
.vessel-mark {
  max-width: 100px;
  font-size: var(--type-label);
  letter-spacing: 0.5px;
}
.scene-active .ink-warm {
  animation: energy-cue 2.4s ease-in-out infinite;
}
#ice-race .scene-active > g > g:first-of-type path {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: ice-soften 4.8s ease-in-out infinite;
}
#ice-race .scene-active > g > path.ink-cool {
  transform-box: fill-box;
  transform-origin: center;
  animation: melt-spread 4.8s ease-in-out infinite;
}
#cup-detective .scene-active > g > path.ink-cool {
  transform-box: fill-box;
  transform-origin: center top;
  animation: drop-form 4.8s ease-in-out infinite;
}
#sun-stylist .scene-active circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunshine 2.4s ease-in-out infinite;
}
#palm-power .scene-active > g > g path {
  animation: palm-slide 1.2s ease-in-out infinite;
}
#palm-power .scene-active > g > g:nth-of-type(2) path {
  animation-direction: reverse;
}
#water-escape .scene-active .ink-warm {
  animation: evaporation-cue 2.4s ease-in-out infinite;
}
@keyframes energy-cue {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
@keyframes ice-soften {
  0% {
    transform: scale(1);
  }
  85% {
    transform: scale(0.82, 0.7);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes melt-spread {
  0% {
    transform: scaleX(0.65);
  }
  85% {
    transform: scaleX(1.15);
  }
  100% {
    transform: scaleX(1);
  }
}
@keyframes drop-form {
  0% {
    transform: scale(0.4);
    opacity: 0.25;
  }
  85%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes sunshine {
  50% {
    transform: scale(1.12);
    opacity: 0.65;
  }
}
@keyframes palm-slide {
  50% {
    transform: translateX(6px);
  }
}
@keyframes evaporation-cue {
  50% {
    transform: translateY(-4px);
    opacity: 0.4;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .scene-active * {
    animation: none !important;
  }
}

.brand-name {
  white-space: normal;
}
.brand-author {
  display: block;
  line-height: 1.4;
  margin: 2px 0 0;
}
.header-actions {
  flex-shrink: 0;
}

.lab-tabs {
  flex-wrap: wrap;
}
.lab-tabs button {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  .route-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .route-strip a {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .concept-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .concept {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .concept > * {
    min-width: 0;
  }
  .lab-tabs button {
    flex: 1 1 7rem;
  }
}

.puzzle-art.scene-active .ice-metal {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: ice-soften 4.8s ease-in-out infinite;
}
.puzzle-art.scene-active .melt-puddle {
  transform-box: fill-box;
  transform-origin: center;
  animation: melt-spread 4.8s ease-in-out infinite;
}

.concept-icon.scene-active {
  animation: energy-cue 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .concept-icon.scene-active {
    animation: none;
  }
}
.experiment-prediction,
.experiment-observation {
  display: grid;
  gap: 8px;
  margin-block: 20px 12px;
  font-size: var(--type-small);
  color: var(--text);
}
.experiment-steps select {
  max-width: 100%;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.experiment-progress {
  min-height: 2.8em;
  font-size: var(--type-small);
  color: var(--accent);
}
.experiment-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.45;
}
.experiment-step input {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.experiment-step:has(input:disabled) {
  opacity: 0.7;
  cursor: default;
}
.experiment-step:has(input:checked) span {
  color: var(--muted);
}
.experiment-explanation {
  border-block: 1px solid var(--line);
  margin-top: 20px;
}
.experiment-explanation summary {
  font-size: var(--type-small);
}
.experiment-explanation p {
  padding-block: 12px;
}

.experiment-animation-note {
  color: var(--muted);
  font-size: var(--type-small);
  margin-bottom: 24px;
}
.experiment-card:is(:hover, :focus-within, :active) .scene-active .ink-warm,
.puzzle-poster:is(:hover, :focus-within, :active) .scene-active .ink-warm {
  animation-duration: 1.2s;
}
.concept:is(:hover, :focus-within, :active) .concept-icon.scene-active {
  animation-duration: 1.2s;
}

.experiment-step span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.experiment-card,
.experiment-prediction,
.experiment-observation {
  min-width: 0;
}
.experiment-prediction,
.experiment-observation {
  grid-template-columns: minmax(0, 1fr);
  overflow-wrap: anywhere;
}
.micro-label,
summary {
  overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  .experiment-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.experiment-steps select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-word {
  color: var(--text);
}
.brand-is {
  color: var(--cool);
}
.brand-easy {
  color: var(--accent);
}
.header-inner,
.desktop-nav {
  gap: 16px;
}
#theme-toggle {
  border: 0;
  box-shadow: none;
}
.thermal-display,
#mix-vessel {
  cursor: default;
}
.button {
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  gap: 12px;
  padding: 10px 14px;
  flex-shrink: 0;
  overflow-wrap: anywhere;
}

.simulation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.simulation-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.simulation-card h3 {
  margin: 16px 0;
}
.boiling-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
}
.simulation-controls,
.simulation-visual,
.simulation-select,
.simulation-input {
  min-width: 0;
}
.simulation-select,
.simulation-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-block: 20px;
  color: var(--text);
  font-size: var(--type-small);
  overflow-wrap: anywhere;
}
.simulation-input > span {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
}
.simulation-input output {
  color: var(--accent);
  font-weight: 600;
}
.simulation-select select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}
.simulation-status {
  margin-block: 20px;
  color: var(--accent);
}
.simulation-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-block: 20px;
  border-block: 1px solid var(--line);
}
.simulation-metrics p {
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
}
.simulation-metrics strong,
.simulation-result {
  color: var(--text);
  font-size: var(--type-h3);
  font-weight: 600;
}
.simulation-metrics span,
.simulation-caption {
  font-size: var(--type-small);
  line-height: 1.5;
}
.simulation-result {
  margin-top: 20px;
}
.simulation-explanation {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.simulation-explanation summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-block: 16px;
  color: var(--accent);
  cursor: pointer;
}
.simulation-explanation p {
  padding-bottom: 16px;
}
.simulation-visual {
  --scene-play-state: paused;
  --flow-speed: 3s;
  --boil-speed: 2s;
  margin-top: 24px;
  overflow-wrap: anywhere;
}
.simulation-visual.scene-active,
.boiling-card.scene-active .boiling-visual {
  --scene-play-state: running;
}
.boiling-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 0;
}
.large-vessel {
  width: 210px;
  max-width: calc(100% - 20px);
  height: 260px;
  flex-shrink: 0;
  margin: 28px auto 8px;
}
.large-vessel .water {
  height: 65%;
  box-shadow: inset 0 -20px 45px
    color-mix(in srgb, var(--water-color, var(--cool)) 20%, transparent);
}
.large-vessel .vessel-mark {
  max-width: calc(100% - 28px);
  overflow-wrap: anywhere;
}
.simulation-visual .water-surface,
.simulation-visual .water-particles i {
  animation-play-state: var(--scene-play-state);
}
.boil-bubbles {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.is-boiling .boil-bubbles {
  display: block;
}
.boil-bubbles i {
  position: absolute;
  bottom: 4%;
  width: 12px;
  height: 12px;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--text));
  border-radius: 50%;
  background: color-mix(
    in srgb,
    var(--water-color, var(--accent)) 35%,
    transparent
  );
  opacity: 0;
  animation: boil-rise var(--boil-speed) linear infinite;
  animation-play-state: var(--scene-play-state);
}
.boil-bubbles i:nth-child(1) {
  left: 10%;
}
.boil-bubbles i:nth-child(2) {
  left: 24%;
  animation-delay: calc(var(--boil-speed) * -0.65);
}
.boil-bubbles i:nth-child(3) {
  left: 39%;
  animation-delay: calc(var(--boil-speed) * -0.3);
  width: 8px;
  height: 8px;
}
.boil-bubbles i:nth-child(4) {
  left: 53%;
  animation-delay: calc(var(--boil-speed) * -0.8);
}
.boil-bubbles i:nth-child(5) {
  left: 68%;
  animation-delay: calc(var(--boil-speed) * -0.15);
  width: 16px;
  height: 16px;
}
.boil-bubbles i:nth-child(6) {
  left: 83%;
  animation-delay: calc(var(--boil-speed) * -0.5);
}
.boil-bubbles i:nth-child(7) {
  left: 31%;
  animation-delay: calc(var(--boil-speed) * -0.95);
  width: 18px;
  height: 18px;
}
.boil-bubbles i:nth-child(8) {
  left: 74%;
  animation-delay: calc(var(--boil-speed) * -0.4);
  width: 8px;
  height: 8px;
}
.boil-bubbles i:nth-child(9) {
  left: 17%;
  animation-delay: calc(var(--boil-speed) * -0.72);
  width: 6px;
  height: 6px;
}
.boil-bubbles i:nth-child(10) {
  left: 46%;
  animation-delay: calc(var(--boil-speed) * -0.08);
  width: 10px;
  height: 10px;
}
.boil-bubbles i:nth-child(11) {
  left: 61%;
  animation-delay: calc(var(--boil-speed) * -0.57);
  width: 8px;
  height: 8px;
}
.boil-bubbles i:nth-child(12) {
  left: 89%;
  animation-delay: calc(var(--boil-speed) * -0.88);
  width: 10px;
  height: 10px;
}
.is-boiling .large-vessel,
.large-vessel.is-boiling {
  animation: boil-shake 0.32s ease-in-out infinite alternate;
  animation-play-state: var(--scene-play-state);
}
.boil-heater {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 150px;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 8px;
  border-bottom: 2px solid var(--accent);
}
.boil-heater i {
  width: 6px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
}
.simulation-art-button {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}
.simulation-art-button svg {
  width: 100%;
  height: auto;
}
.barrier-flow,
.capacity-energy-flow {
  animation: simulation-flow var(--flow-speed) linear infinite;
  animation-play-state: var(--scene-play-state);
}
.capacity-energy-flow {
  display: none;
}
.capacity-visual.has-energy .capacity-energy-flow {
  display: inline;
}
.simulation-card:is(:hover, :focus-within, :active) .barrier-flow,
.simulation-card:is(:hover, :focus-within, :active) .capacity-energy-flow {
  animation-duration: calc(var(--flow-speed) * 0.75);
}
.simulation-card:is(:hover, :focus-within, :active) .boil-bubbles i {
  animation-duration: calc(var(--boil-speed) * 0.75);
}
.capacity-scale {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: var(--type-small);
}
@keyframes boil-rise {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.6;
  }
  100% {
    transform: translate(5px, calc(var(--bubble-rise, 140px) * -1)) scale(1.2);
    opacity: 0;
  }
}
@keyframes boil-shake {
  from {
    transform: translateX(-0.9px) rotate(-0.25deg);
  }
  to {
    transform: translateX(0.9px) rotate(0.25deg);
  }
}
@keyframes simulation-flow {
  to {
    stroke-dashoffset: -180;
  }
}
@media (min-width: 951px) and (max-width: 1100px) {
  .header-test {
    display: none;
  }
}
@media (max-width: 767px) {
  .simulation-grid,
  .boiling-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .simulation-card {
    padding: 22px;
  }
  .boiling-card {
    gap: 24px;
  }
  .simulation-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .simulation-visual *,
  :root:not([data-motion="full"]) .simulation-visual::before,
  :root:not([data-motion="full"]) .simulation-visual::after {
    animation: none !important;
    transition: none !important;
  }
  :root:not([data-motion="full"]) .is-boiling .boil-bubbles {
    display: none;
  }
}

.is-boiling .water-surface {
  height: 16px;
  opacity: 0.5;
  animation: boil-surface var(--boil-speed) ease-in-out infinite alternate;
  animation-play-state: var(--scene-play-state);
}
.boil-froth {
  display: none;
  position: absolute;
  inset: 0 0 auto;
  height: 14px;
  opacity: 0.65;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 55%, var(--text) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 35%, var(--text) 0 3px, transparent 4px),
    radial-gradient(circle at 42% 65%, var(--text) 0 2px, transparent 3px),
    radial-gradient(circle at 59% 40%, var(--text) 0 3px, transparent 4px),
    radial-gradient(circle at 75% 60%, var(--text) 0 2px, transparent 3px),
    radial-gradient(circle at 91% 35%, var(--text) 0 3px, transparent 4px);
  animation: boil-surface var(--boil-speed) ease-in-out infinite
    alternate-reverse;
  animation-play-state: var(--scene-play-state);
}
.is-boiling .boil-froth {
  display: block;
}
@keyframes boil-surface {
  from {
    transform: translate(-3px, -1px) rotate(-1deg);
  }
  to {
    transform: translate(4px, 3px) rotate(1deg);
  }
}

.brand-physics {
  color: var(--text);
}
.brand-initial {
  font-size: 1.12em;
}
.brand-wrap {
  position: relative;
  min-width: 0;
  flex-shrink: 1;
}
.brand-wrap:is(:hover, :focus-within)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}
#brand-mascot {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100dvh - 120px);
  overflow: auto;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 40px #0003;
  z-index: 30;
  font-size: var(--type-small);
  overflow-wrap: anywhere;
}
.brand-wrap:hover #brand-mascot,
.brand-wrap:focus-within #brand-mascot,
.brand-wrap[data-expanded="true"] #brand-mascot,
.brand-wrap.is-expanded #brand-mascot,
.brand[aria-expanded="true"] + #brand-mascot {
  display: grid;
}
#brand-mascot img {
  display: block;
  width: 112px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
#brand-mascot p {
  font-size: var(--type-small);
  line-height: 1.5;
}
#menu-toggle,
#menu-close {
  border: 0;
  box-shadow: none;
  color: var(--cool);
}
#menu-toggle:hover,
#menu-close:hover {
  color: var(--accent);
  background: var(--surface);
}
#mobile-menu {
  border: 0;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 24px 80px #0005;
}
#mobile-menu nav {
  gap: 4px;
  margin-block: 20px;
}
#mobile-menu nav a {
  position: relative;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  font-size: var(--type-body);
  line-height: 1.4;
  gap: 12px;
  overflow-wrap: anywhere;
  transition:
    background-color 0.18s,
    color 0.18s;
}
#mobile-menu nav a:hover,
#mobile-menu nav a:focus-visible,
#mobile-menu nav a:active {
  background: var(--surface);
  color: var(--accent);
}
#mobile-menu nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleY(0.4);
  transition:
    opacity 0.18s,
    transform 0.18s;
}
#mobile-menu nav a:is(:hover, :focus-visible, :active)::before {
  opacity: 1;
  transform: scaleY(1);
}
.menu-symbol,
.menu-index {
  flex-shrink: 0;
  color: var(--cool);
}
.menu-symbol {
  width: 24px;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1;
}
#mobile-menu nav a .menu-topic {
  min-width: 0;
  flex: 1;
  color: inherit;
  font-size: inherit;
}
@media (max-width: 767px) {
  .header .brand {
    font-size: 1.125rem;
  }
  #brand-mascot {
    grid-template-columns: minmax(0, 1fr);
  }
  #brand-mascot img {
    width: 96px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .is-boiling .water-surface,
  :root:not([data-motion="full"]) .boil-froth {
    animation: none !important;
  }
  :root:not([data-motion="full"]) .is-boiling .boil-froth {
    display: none;
  }
  :root:not([data-motion="full"]) #mobile-menu nav a,
  :root:not([data-motion="full"]) #mobile-menu nav a::before {
    transition: none;
  }
}

.brand-wrap[data-dismissed="true"] #brand-mascot {
  display: none;
}
.creators {
  padding-block: var(--section-space, 64px);
}
.creator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-block: 24px;
}
.creator-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.creator-grid h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.creator-grid p {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.5;
  flex-grow: 1;
}
.creator-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
}
.creators .button {
  margin-top: 8px;
}
.telegram-miniapp body {
  padding-top: max(
    env(safe-area-inset-top, 0px),
    var(--telegram-safe-top, 0px)
  );
  padding-left: max(
    env(safe-area-inset-left, 0px),
    var(--telegram-safe-left, 0px)
  );
  padding-right: max(
    env(safe-area-inset-right, 0px),
    var(--telegram-safe-right, 0px)
  );
  padding-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--telegram-safe-bottom, 0px)
  );
}
.telegram-miniapp .header {
  top: max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px));
}
.telegram-miniapp {
  scroll-padding-top: calc(92px + var(--telegram-safe-top, 0px));
}
@media (max-width: 767px) {
  .creator-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .creator-grid article {
    padding: 20px;
  }
}

.telegram-miniapp #mobile-menu {
  top: max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px));
  bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--telegram-safe-bottom, 0px)
  );
  max-height: calc(
    100dvh - max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)) -
      max(env(safe-area-inset-bottom, 0px), var(--telegram-safe-bottom, 0px)) -
      32px
  );
}

.session-fallback {
  display: inline-block;
  min-height: 48px;
  padding-block: 12px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Reused native symbols keep guided steps light and the text labels complete. */
.experiment-icon-library {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
}
.experiment-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-right: 8px;
  vertical-align: -0.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--cool);
  flex-shrink: 0;
}
.experiment-steps h4 .experiment-icon,
.experiment-takeaway > .experiment-icon {
  margin-right: 0;
}
.experiment-steps p {
  line-height: 1.5;
}
.experiment-takeaway {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.experiment-takeaway > .experiment-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}
.experiment-explanation .experiment-takeaway p {
  padding: 0;
}
.experiment-takeaway strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}
.experiment-intro {
  margin-bottom: 16px;
  line-height: 1.5;
}
.experiment-animation-note {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
  line-height: 1.45;
}
@media (min-width: 768px) {
  .simulation-card:not(.boiling-card) > h3 {
    min-height: 2.6em;
  }
  .simulation-card:not(.boiling-card) > h3 + p {
    min-height: 3em;
  }
}
@media (max-width: 767px) {
  button,
  .button,
  .quiz-levels button,
  .quiz-options button {
    min-height: 44px;
    padding: 8px 12px;
    gap: 8px;
  }
  .experiment-card,
  .simulation-card {
    padding: 20px;
  }
  .experiment-card h3 {
    min-height: 0;
  }
  .experiment-figure figcaption,
  .experiment-predict {
    min-height: 0;
  }
  .experiment-figure {
    margin-block: 16px;
  }
  .experiment-guide summary,
  .simulation-explanation summary {
    min-height: 44px;
    padding-block: 12px;
  }
  .experiment-intro,
  .experiment-animation-note {
    text-align: left;
  }
}

/* Cabinet and ranking share the page's type scale and controls. */
.account-header {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
}
.account-header:hover {
  color: var(--accent);
}
.rank-mode-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 20px;
  font-size: var(--type-small);
}
.rank-mode-bar label,
.account-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.rank-mode-bar input,
.account-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.rank-mode-bar span {
  color: var(--muted);
  flex: 1;
}
.rank-mode-bar a {
  color: var(--accent);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.account-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 28px;
}
.account-card h3 {
  margin: 16px 0 12px;
  font-size: var(--type-h3);
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.account-card p {
  margin-block: 12px;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block: 20px 12px;
}
.account-actions .button {
  min-height: 44px;
}
.account-note {
  color: var(--muted);
  font-size: var(--type-small);
  line-height: 1.45;
}
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 20px;
}
.account-stats dt {
  color: var(--muted);
  font-size: var(--type-small);
}
.account-stats dd {
  font-size: 1.5rem;
  margin: 4px 0 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.leaderboard {
  padding-left: 24px;
  margin-block: 20px;
}
.leaderboard li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.leaderboard li span {
  display: inline-block;
  width: 65%;
  overflow-wrap: anywhere;
  vertical-align: top;
  padding-right: 8px;
}
.leaderboard li strong {
  font-size: var(--type-small);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.account-dialog {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  width: min(480px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}
.account-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.account-dialog-head h2 {
  font-size: var(--type-h3);
  letter-spacing: -0.4px;
}
.account-dialog form {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.account-dialog label {
  font-size: var(--type-small);
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-dialog label:not(.account-consent) {
  display: grid;
  gap: 8px;
}
.account-dialog input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 44px;
  font: inherit;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
}
.account-dialog button[type="submit"] {
  justify-self: start;
}
#account-form-status:not(:empty),
#account-status:not(:empty) {
  font-size: var(--type-small);
  color: var(--accent);
}
@media (max-width: 767px) {
  .account-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-card {
    padding: 20px;
  }
  .account-dialog {
    padding: 20px;
  }
  .rank-mode-bar {
    align-items: flex-start;
    gap: 8px 12px;
  }
  .rank-mode-bar span {
    flex-basis: 100%;
  }
}
#account-admin {
  margin-block: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
#account-admin summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 10px;
}
#account-article-form {
  display: grid;
  gap: 14px;
  margin-block: 16px;
}
#account-article-form label {
  display: grid;
  gap: 8px;
  font-size: var(--type-small);
  min-width: 0;
  overflow-wrap: anywhere;
}
#account-article-form input,
#account-article-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--bg);
  font: inherit;
  font-size: 1rem;
}
#account-article-form textarea {
  resize: vertical;
  font-size: 1rem;
}
#account-article-form button {
  justify-self: start;
}

.motion-preference {
  flex-basis: 100%;
  max-width: 420px;
}
.motion-preference label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--type-small);
}
.motion-preference input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.motion-preference p {
  font-size: var(--type-small);
  color: var(--muted);
  margin-top: 6px;
}
