/* =========================================================
   德令哈 · 光热科普馆
   Design system + layout + components
   ========================================================= */

:root {
  --bg: #06110f;
  --bg-deep: #040d0c;
  --bg-soft: #081714;
  --panel: rgba(255, 255, 255, 0.042);
  --panel-strong: rgba(255, 255, 255, 0.065);
  --line: rgba(236, 208, 152, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);
  --sand: #f1e6cd;
  --sand-dim: #c8bda5;
  --text: #f4efe4;
  --muted: #a3a89b;
  --muted-2: #7f8b80;
  --gold: #f6b64a;
  --gold-2: #ffd58a;
  --gold-deep: #d98f2f;
  --ember: #e07a3f;
  --teal: #59c3b3;
  --teal-soft: #8fe0d0;
  --danger: #e0705a;
  --ok: #4fbf9a;

  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;

  --max: 1200px;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(246, 182, 74, 0.08), transparent 60%),
    radial-gradient(800px 600px at 0% 40%, rgba(89, 195, 179, 0.05), transparent 60%),
    var(--bg);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--gold); color: #171006; }

/* script-specific font stacks */
[lang="bo"], .lang-bo {
  font-family: "Microsoft Himalaya", "Noto Serif Tibetan", "Kailasa", "Songti SC", serif;
  line-height: 2;
}
[lang="ug"], .lang-ug {
  font-family: "Microsoft Uighur", "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", serif;
  line-height: 2.1;
}
[lang="ko"], .lang-ko {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", var(--sans);
}

/* Tibetan renders smaller than Latin at the same size — compensate */
.hero-terms .term-script[lang="bo"] { font-size: 21px; line-height: 1.25; opacity: 0.85; }
.hero-terms .term-script[lang="ug"] { font-size: 14px; line-height: 1.7; }
.lang-sentence[lang="bo"] { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 2.15; }
.lang-native-name[lang="bo"] { font-size: clamp(1.6rem, 2.9vw, 2.15rem); line-height: 1.7; }
.lang-tab-native[lang="bo"] { font-size: 25px; line-height: 1.7; }
.term-native[lang="bo"] { font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 2; }

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #191106;
  font-size: 13px;
  font-weight: 700;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 18px; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 80;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--ember), var(--gold), var(--teal));
  box-shadow: 0 0 12px rgba(246, 182, 74, 0.5);
}

.wrap {
  width: min(var(--max), 100% - 56px);
  margin-inline: auto;
}

/* ========================= NAV ========================= */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
.nav.scrolled {
  background: rgba(4, 14, 13, 0.82);
  border-bottom-color: rgba(246, 182, 74, 0.12);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.nav-inner {
  width: min(1320px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(246, 182, 74, 0.34);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 20%, rgba(246, 182, 74, 0.16), transparent 70%);
}
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark.small { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14.5px; letter-spacing: 0.03em; font-weight: 700; }
.brand-text small {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: var(--muted-2);
  margin-top: 3px;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  position: relative;
  font-size: 13.5px;
  color: var(--sand-dim);
  letter-spacing: 0.02em;
  padding: 6px 0;
  transition: color 0.25s ease;
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--gold-2); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(246, 182, 74, 0.28);
  border-radius: 999px;
  background: rgba(246, 182, 74, 0.06);
  font-size: 11.5px;
  color: var(--sand);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.lang-pill:hover { background: rgba(246, 182, 74, 0.13); border-color: rgba(246, 182, 74, 0.5); }
.lang-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(89, 195, 179, 0.16);
}
.lang-pill-native { font-size: 12px; color: var(--gold-2); }

/* ========================= HERO ========================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 148px 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-scene {
  position: absolute;
  inset: -2%;
  z-index: -2;
}
.hero-scene svg { width: 100%; height: 100%; object-fit: cover; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 14, 13, 0.95) 0%, rgba(4, 14, 13, 0.86) 26%, rgba(4, 14, 13, 0.42) 56%, rgba(4, 14, 13, 0.18) 78%, rgba(4, 14, 13, 0.5) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(6, 17, 15, 0.55) 10%, transparent 34%);
}

.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 730px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.hero-eyebrow { color: var(--sand-dim); letter-spacing: 0.16em; font-size: 11px; }
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(246, 182, 74, 0.55);
  animation: pulse 2.6s ease-out infinite;
}

.hero h1 {
  font-size: clamp(2.9rem, 6.6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 22px;
}
.hl, .hl-alt {
  background: linear-gradient(100deg, #ffe9bd 0%, #f6b64a 52%, #e07a3f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hl-alt {
  background: linear-gradient(100deg, #d8fff6, #8fe0d0 48%, #4aa79b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 610px;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.85;
  color: #c3c2b4;
  margin-bottom: 30px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(135deg, #ffd58a, #f6b64a 60%, #eaa03a);
  color: #1c1305;
  box-shadow: 0 10px 30px -12px rgba(246, 182, 74, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(246, 182, 74, 0.8); }
.btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  border-color: rgba(236, 208, 152, 0.26);
  color: var(--sand);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: rgba(236, 208, 152, 0.55); background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  gap: 42px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(236, 208, 152, 0.16);
  max-width: 560px;
}
.hero-stats strong {
  display: block;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  font-weight: 750;
  color: var(--sand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero-stats em {
  font-style: normal;
  font-size: 0.55em;
  color: var(--gold);
  margin-left: 4px;
  letter-spacing: 0;
}
.hero-stats span { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }

.hero-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  margin-top: 26px;
  font-size: 12.5px;
}
.hero-terms-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  border: 1px solid var(--line-soft);
  padding: 4px 8px;
  border-radius: 4px;
}
.term-script { color: #cfc3a6; opacity: 0.72; line-height: 1.6; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--muted-2);
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, rgba(246, 182, 74, 0.8), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}

/* ========================= SECTION BASICS ========================= */

.section {
  position: relative;
  padding: 108px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  scroll-margin-top: 90px;
}

.section-head { max-width: 790px; margin-bottom: 46px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.section-sub { font-size: 15.5px; line-height: 1.85; color: var(--muted); max-width: 680px; margin: 0; }

/* ========================= FACTS ========================= */

.facts {
  background:
    radial-gradient(1000px 520px at 92% 4%, rgba(246, 182, 74, 0.055), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, #071512 45%, #071512 100%);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.fact {
  position: relative;
  padding: 26px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, background 0.35s ease;
}
.fact::after {
  content: "";
  position: absolute;
  top: -50px; right: -50px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 182, 74, 0.13), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.fact:hover { transform: translateY(-4px); border-color: rgba(246, 182, 74, 0.4); }
.fact:hover::after { opacity: 1; }

.fact-num {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--sand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.fact-num em {
  font-style: normal;
  font-size: 0.42em;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-left: 5px;
  white-space: nowrap;
}
.fact h3 { font-size: 14px; font-weight: 650; color: #e6dcc6; margin-bottom: 6px; }
.fact p:last-child { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted-2); }

.fact-story {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  margin-top: 58px;
  align-items: start;
}

.story-copy h3 { font-size: 24px; margin-bottom: 16px; }
.story-copy p { font-size: 15px; line-height: 1.9; color: var(--muted); }
.story-quote {
  margin-top: 26px;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: var(--sand) !important;
  font-size: 16.5px !important;
  line-height: 1.8 !important;
}

.tech-panel {
  padding: 28px;
  border: 1px solid rgba(246, 182, 74, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(246, 182, 74, 0.1), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
}
.panel-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin: 0 0 14px;
}
.tech-panel h3 { font-size: 18px; margin-bottom: 18px; }
.tech-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.09);
  font-size: 13.5px;
  color: #d6cdb9;
}
.tech-list li span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gold);
  opacity: 0.85;
}
.tech-list .tech-more { color: var(--muted); }
.tech-note { margin: 18px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--muted-2); }

/* ========================= PRINCIPLE ========================= */

.principle {
  background:
    radial-gradient(1100px 600px at 78% 0%, rgba(246, 182, 74, 0.07), transparent 60%),
    radial-gradient(700px 500px at 0% 80%, rgba(89, 195, 179, 0.045), transparent 65%),
    var(--bg);
}

.principle-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: start;
}

.diagram-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(500px 300px at 70% 10%, rgba(246, 182, 74, 0.07), transparent 70%),
    rgba(255, 255, 255, 0.022);
}
.diagram-top { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 8px; }
.diagram-title { font-size: 12px; color: var(--sand-dim); letter-spacing: 0.04em; }
.diagram-badge {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 9px;
}
.diagram { width: 100%; height: auto; }
.diagram-scroll { min-width: 0; }
.diagram-hint { display: none; margin: 8px 0 0; text-align: center; font-size: 10.5px; color: var(--muted-2); }
.nb { white-space: nowrap; }

.diagram text { font-family: var(--sans); }
.zone-label text { font-size: 10.5px; fill: #94a89a; letter-spacing: 0.12em; }
.part { opacity: 0.44; transition: opacity 0.5s ease, filter 0.5s ease; }
.part.is-active { opacity: 1; filter: drop-shadow(0 0 12px rgba(246, 182, 74, 0.18)); }
.part-name { font-size: 12.5px; fill: #f0e6d0; font-weight: 600; }
.part-name.sm { font-size: 10.5px; }
.part-sub { font-size: 9.5px; fill: #93a596; letter-spacing: 0.02em; }
.part-sub.sm { font-size: 8.5px; }
.pipe { fill: none; stroke: #98a48f; stroke-width: 1.8; stroke-dasharray: 5 5; transition: stroke 0.4s ease; }
.pipe.hot { stroke: #b57a52; }
.pipe.cold { stroke: #4f8f85; }
.pipe.steam { stroke: #9a9384; }
.part.is-active .pipe { stroke: #ffcf7d; animation: dashFlow 9s linear infinite; }
.part.is-active .pipe.cold { stroke: #8fe0d0; }
.pipe-label { font-size: 9px; fill: #98a598; letter-spacing: 0.05em; }
.diagram-foot { font-size: 10px; fill: #7f8d80; letter-spacing: 0.04em; }
.turbine-blades { transform-origin: 600px 182px; }
.part.is-active .turbine-blades { animation: turbine 6s linear infinite; transform-box: fill-box; transform-origin: center; }

.diagram-legend {
  display: flex;
  gap: 18px;
  padding: 10px 6px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  color: var(--muted-2);
}
.diagram-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-gold { background: var(--gold); }
.dot-red { background: var(--ember); }
.dot-teal { background: var(--teal); }

.steps { min-width: 0; }
.step-tabs { display: flex; flex-direction: column; gap: 6px; }
.step-tab {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 15px 16px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.step-tab:hover { background: rgba(255, 255, 255, 0.03); }
.step-tab.is-active {
  background: rgba(246, 182, 74, 0.065);
  border-color: rgba(246, 182, 74, 0.18);
  border-left-color: var(--gold);
}
.step-no { font-family: var(--mono); font-size: 11px; color: var(--gold); opacity: 0.55; width: 18px; }
.step-tab.is-active .step-no { opacity: 1; }
.step-label { display: flex; flex-direction: column; gap: 2px; }
.step-label strong { font-size: 15px; font-weight: 650; color: var(--sand); }
.step-label small { font-size: 11.5px; color: var(--muted-2); }

.step-panel {
  margin-top: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  min-height: 268px;
}
.step-panel h3 { font-size: 21px; margin-bottom: 12px; }
.step-panel p { font-size: 14px; line-height: 1.85; color: var(--muted); }
.step-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.step-facts span {
  font-size: 11px;
  padding: 6px 11px;
  border: 1px solid rgba(246, 182, 74, 0.24);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(246, 182, 74, 0.06);
}
.step-tip {
  margin: 18px 0 0 !important;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 12.5px !important;
  color: #bfb194 !important;
}

/* Simulator */

.simulator {
  margin-top: 26px;
  padding: 30px;
  border: 1px solid rgba(236, 208, 152, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(700px 300px at 10% 0%, rgba(246, 182, 74, 0.08), transparent 60%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.sim-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sim-head .eyebrow { margin-bottom: 8px; }
.sim-head h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
.sim-hint { margin: 0; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }

.sim-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  margin-top: 24px;
  align-items: center;
}
.sky-sim { width: 100%; height: auto; border-radius: 14px; }
.sim-clock { font-family: var(--mono); font-size: 13px; fill: #ffe0a6; letter-spacing: 0.08em; }
.sim-caption { font-size: 9.5px; fill: #9db0a2; letter-spacing: 0.03em; }

.sim-controls { min-width: 0; }
.sim-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #2a4a42, #f6b64a 45%, #f6b64a 60%, #2a4a42);
  outline: none;
  cursor: pointer;
}
.sim-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff6e2;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(246, 182, 74, 0.14);
  cursor: grab;
}
.sim-controls input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff6e2;
  border: 3px solid var(--gold);
  cursor: grab;
}
.sim-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 8px;
}

.meters { margin-top: 22px; display: flex; flex-direction: column; gap: 13px; }
.meter-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.meter-head strong { font-family: var(--mono); font-size: 11px; color: var(--sand); font-weight: 500; }
.meter-track { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 0.45s var(--ease); }
.meter-fill.gold { background: linear-gradient(90deg, #b9782c, #ffd58a); }
.meter-fill.red { background: linear-gradient(90deg, #8c3d2c, #f08b5c); }
.meter-fill.teal { background: linear-gradient(90deg, #2b6f67, #8fe0d0); }
.sim-note { margin: 16px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--muted-2); min-height: 38px; }

/* ========================= CLASSROOM ========================= */

.classroom {
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(89, 195, 179, 0.05), transparent 60%),
    linear-gradient(180deg, var(--bg), #071411);
}

.filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin: -12px 0 24px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.chip:hover { border-color: rgba(246, 182, 74, 0.4); color: var(--sand); }
.chip.is-active {
  background: rgba(246, 182, 74, 0.13);
  border-color: rgba(246, 182, 74, 0.5);
  color: var(--gold-2);
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

.k-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}
.k-card:hover { transform: translateY(-4px); border-color: rgba(246, 182, 74, 0.36); }
.k-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.k-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(246, 182, 74, 0.26);
  border-radius: 999px;
  padding: 3px 9px;
}
.k-index { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.k-title { font-size: 18px; line-height: 1.45; margin-bottom: 9px; color: var(--sand); }
.k-desc { font-size: 13px; line-height: 1.8; color: var(--muted); margin-bottom: 14px; }
.k-toggle {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-2);
  font-size: 11.5px;
  cursor: pointer;
}
.k-toggle svg { width: 12px; height: 12px; transition: transform 0.35s var(--ease); }
.k-card.open .k-toggle svg { transform: rotate(180deg); }
.k-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease), margin 0.45s; }
.k-card.open .k-more { grid-template-rows: 1fr; margin-top: 12px; }
.k-more-inner { overflow: hidden; }
.k-points { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed rgba(255, 255, 255, 0.1); padding-top: 12px; }
.k-points li { position: relative; padding-left: 14px; font-size: 12px; line-height: 1.7; color: #b5b2a2; }
.k-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}
.k-stat {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--teal-soft);
}

/* AI */

.ai-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 52px;
  align-items: center;
  margin-top: 72px;
}
.ai-intro h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.35; margin-bottom: 16px; }
.ai-intro > p { font-size: 14px; line-height: 1.85; color: var(--muted); }
.ai-features { margin-top: 22px; }
.ai-features li {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
  font-size: 12.5px;
  color: #c3c0b1;
}
.ai-features span { font-family: var(--mono); font-size: 10px; color: var(--gold); }
.ai-disclaimer { margin-top: 18px; font-size: 10.5px !important; color: var(--muted-2) !important; }

.ai-panel {
  border: 1px solid rgba(236, 208, 152, 0.18);
  border-radius: 22px;
  background: linear-gradient(165deg, #0a1a16, #07120f);
  overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9);
}
.ai-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ai-avatar {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--gold-2), var(--ember));
  color: #1c1305;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.ai-panel-head strong { display: block; font-size: 13px; line-height: 1.4; }
.ai-panel-head small { font-size: 10.5px; color: var(--muted-2); }
.ai-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--teal-soft);
}
.ai-status i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(89, 195, 179, 0.14);
}

.chat {
  height: auto;
  min-height: 190px;
  max-height: 340px;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat::-webkit-scrollbar { width: 6px; }
.chat::-webkit-scrollbar-thumb { background: rgba(246, 182, 74, 0.2); border-radius: 99px; }

.msg { max-width: 88%; animation: msgIn 0.35s var(--ease); }
.msg-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.ai { align-self: flex-start; }
.msg.ai .msg-bubble {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #d8d3c4;
  border-bottom-left-radius: 4px;
}
.msg.user { align-self: flex-end; }
.msg.user .msg-bubble {
  background: linear-gradient(140deg, #ffd58a, #f0aa46);
  color: #1c1305;
  border-bottom-right-radius: 4px;
}
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
}
.chat-chips button {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chat-chips button:hover { color: var(--gold-2); border-color: rgba(246, 182, 74, 0.4); }

.chat-form {
  display: flex;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.16);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.25s ease;
}
.chat-form input::placeholder { color: var(--muted-2); }
.chat-form input:focus { border-color: rgba(246, 182, 74, 0.5); }
.chat-form button {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: #1c1305;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.chat-form button:hover { transform: scale(1.06); background: var(--gold-2); }
.chat-form button svg { width: 18px; height: 18px; }

/* ========================= LANGUAGES ========================= */

.languages {
  background:
    radial-gradient(900px 500px at 100% 10%, rgba(89, 195, 179, 0.06), transparent 60%),
    linear-gradient(180deg, #071411, #050f0e);
}

.lang-layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 36px;
  align-items: start;
}
.lang-menu { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 100px; }
.lang-tab {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.28s ease;
}
.lang-tab:hover { background: rgba(255, 255, 255, 0.03); }
.lang-tab.is-active {
  background: rgba(246, 182, 74, 0.07);
  border-color: rgba(246, 182, 74, 0.2);
  border-left-color: var(--gold);
}
.lang-tab-native { font-size: 18px; line-height: 1.5; color: var(--sand); }
.lang-tab-zh { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.06em; }

.lang-main { min-width: 0; }

.lang-intro-card {
  position: relative;
  padding: 28px 30px;
  border: 1px solid rgba(236, 208, 152, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(560px 240px at 100% 0%, rgba(246, 182, 74, 0.1), transparent 65%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  overflow: hidden;
}
.lang-intro-top { display: flex; align-items: center; gap: 12px; }
.lang-native-name { font-size: clamp(1.25rem, 2.4vw, 1.65rem); color: var(--gold-2); line-height: 1.5; }
.lang-tag {
  font-size: 10.5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
}
.lang-sentence {
  margin: 20px 0 10px;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  line-height: 1.95;
  color: #f6ead2;
  overflow-wrap: anywhere;
}
.lang-sentence-zh { font-size: 13px; color: var(--muted); margin: 0; }
.lang-meta {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  color: var(--muted-2);
}
.is-rtl { direction: rtl; text-align: right; }

.translator { margin-top: 22px; }
.translator-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.translator-head label { font-size: 13px; font-weight: 650; color: var(--sand); }
.translator-head span { font-size: 10.5px; color: var(--muted-2); }

.search-box { position: relative; }
.search-box svg {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--muted-2);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus { border-color: rgba(246, 182, 74, 0.5); background: rgba(255, 255, 255, 0.05); }

.term-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 16px; }
.term-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.term-chip:hover { color: var(--gold-2); border-color: rgba(246, 182, 74, 0.4); }
.term-chip.is-active { background: rgba(246, 182, 74, 0.12); border-color: rgba(246, 182, 74, 0.45); color: var(--gold-2); }

.term-result {
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(89, 195, 179, 0.08), transparent 65%),
    rgba(255, 255, 255, 0.025);
  min-height: 190px;
}
.term-result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.term-zh { font-size: 13px; color: var(--sand-dim); letter-spacing: 0.04em; }
.term-lang-label { font-size: 10px; color: var(--muted-2); border: 1px solid var(--line-soft); padding: 2px 8px; border-radius: 999px; }
.term-native {
  margin: 10px 0 12px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.75;
  color: var(--gold-2);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.term-note { margin: 0; font-size: 12px; line-height: 1.75; color: var(--muted); }
.term-others {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 26px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.term-other { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.term-other b {
  font-weight: 500;
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: 0.12em;
}
.term-other span { font-size: 13.5px; line-height: 1.75; color: #d4cdbb; overflow-wrap: anywhere; }
.term-other[lang="bo"] span { font-size: 15px; line-height: 1.9; }
.term-other[lang="ug"] span { font-size: 14.5px; line-height: 2; }

.table-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px dashed rgba(236, 208, 152, 0.24);
  border-radius: 12px;
  background: transparent;
  color: var(--sand-dim);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.table-toggle:hover { border-color: rgba(246, 182, 74, 0.5); color: var(--gold-2); }
.table-toggle svg { width: 14px; height: 14px; transition: transform 0.3s ease; }
.table-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; }
.glossary-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.glossary-table th,
.glossary-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  vertical-align: top;
}
.glossary-table th {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(246, 182, 74, 0.05);
  font-weight: 600;
  white-space: nowrap;
}
.glossary-table td { color: #cfc8b6; line-height: 1.7; }
.glossary-table td:first-child { color: var(--sand); white-space: nowrap; }
.glossary-table tr:last-child td { border-bottom: 0; }
.glossary-table .rtl-cell { direction: rtl; text-align: right; }

.lang-disclaimer {
  margin: 18px 0 0;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--muted-2);
  padding-left: 12px;
  border-left: 2px solid rgba(246, 182, 74, 0.28);
}

/* ========================= QUIZ ========================= */

.quiz {
  background:
    radial-gradient(800px 460px at 50% 0%, rgba(89, 195, 179, 0.06), transparent 65%),
    linear-gradient(180deg, #050f0e, var(--bg));
}

.quiz-shell { max-width: 900px; margin: 0 auto; }
.quiz-card {
  padding: 30px 32px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(246, 182, 74, 0.07), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
}
.quiz-top { display: flex; align-items: center; gap: 18px; }
.quiz-count { font-family: var(--mono); font-size: 10.5px; color: var(--gold); letter-spacing: 0.12em; }
.quiz-dots { display: flex; gap: 5px; flex: 1; }
.quiz-score { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.quiz-bar { height: 2px; margin-top: 14px; background: rgba(255, 255, 255, 0.07); border-radius: 99px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--teal)); transition: width 0.4s var(--ease); }

.quiz-question { font-size: clamp(1.15rem, 2.1vw, 1.4rem); line-height: 1.55; margin: 26px 0 20px; }
.quiz-options { display: grid; gap: 9px; }
.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
  color: #d4cfc0;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s ease;
}
.opt:hover:not(:disabled) { border-color: rgba(246, 182, 74, 0.45); background: rgba(246, 182, 74, 0.05); transform: translateX(2px); }
.opt:disabled { cursor: default; }
.opt-key {
  flex-shrink: 0;
  width: 25px; height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.opt.correct { border-color: rgba(79, 191, 154, 0.6); background: rgba(79, 191, 154, 0.1); }
.opt.correct .opt-key { border-color: rgba(79, 191, 154, 0.7); color: var(--ok); }
.opt.wrong { border-color: rgba(224, 112, 90, 0.6); background: rgba(224, 112, 90, 0.09); }
.opt.wrong .opt-key { border-color: rgba(224, 112, 90, 0.7); color: var(--danger); }
.opt.dim { opacity: 0.45; }

.quiz-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(246, 182, 74, 0.06);
  font-size: 12.5px;
  line-height: 1.8;
  color: #cfc4ac;
}
.quiz-feedback strong { color: var(--gold-2); }
.quiz-actions { margin-top: 20px; display: flex; justify-content: flex-end; }

.quiz-result { text-align: center; padding: 46px 30px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)); }
.result-ring {
  width: 150px; height: 150px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  position: relative;
  background: conic-gradient(var(--gold) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, 0.07) 0);
}
.result-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #081512;
}
.result-ring span, .result-ring small { position: relative; z-index: 1; }
.result-ring span { font-size: 42px; font-weight: 800; color: var(--sand); line-height: 1; font-variant-numeric: tabular-nums; }
.result-ring small { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.quiz-result h3 { font-size: 24px; margin-bottom: 10px; }
.quiz-result p { font-size: 13.5px; color: var(--muted); max-width: 520px; margin: 0 auto 22px; line-height: 1.8; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

/* ========================= FOOTER ========================= */

.footer {
  padding: 56px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-deep);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}
.footer-brand { display: flex; gap: 12px; }
.footer-brand strong { font-size: 13.5px; }
.footer-brand p { font-size: 11.5px; color: var(--muted-2); margin: 6px 0 0; line-height: 1.7; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12px; color: var(--muted); }
.footer-links a:hover { color: var(--gold-2); }
.footer-meta p { font-size: 11px; line-height: 1.8; color: var(--muted-2); margin: 0 0 6px; }
.footer-copy { margin-top: 12px !important; font-family: var(--mono); font-size: 9.5px !important; letter-spacing: 0.1em; }

/* ========================= MOTION ========================= */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.75s ease, transform 0.75s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(246, 182, 74, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(246, 182, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(246, 182, 74, 0); }
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.35); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes dashFlow { to { stroke-dashoffset: -200; } }
@keyframes turbine { to { transform: rotate(360deg); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.9; } }
@keyframes sunSpin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ========================= RESPONSIVE ========================= */

@media (max-width: 1080px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: 1fr; }
  .ai-wrap { grid-template-columns: 1fr; gap: 34px; }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .lang-layout { grid-template-columns: 1fr; gap: 22px; }
  .lang-menu { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .lang-tab { min-width: 132px; border-left: 1px solid transparent; border-bottom: 2px solid transparent; }
  .lang-tab.is-active { border-left-color: rgba(246, 182, 74, 0.2); border-bottom-color: var(--gold); }
  .fact-story { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 900px) {
  .nav-inner { flex-wrap: wrap; gap: 12px 18px; padding: 12px 0; }
  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .lang-pill { margin-left: auto; }
  .hero { padding-top: 168px; }
  .sim-grid { grid-template-columns: 1fr; gap: 24px; }
  .sim-visual { max-width: 420px; }
  .diagram-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: -6px;
    padding: 0 6px 6px;
    scrollbar-width: thin;
  }
  .diagram { min-width: 640px; }
  .diagram-hint { display: block; }
  .section { scroll-margin-top: 112px; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .section { padding: 76px 0; }
  .hero { min-height: auto; padding: 150px 0 80px; }
  .hero-scene { inset: 0; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(4, 14, 13, 0.9) 0%, rgba(4, 14, 13, 0.72) 45%, rgba(4, 14, 13, 0.55) 70%, var(--bg) 100%);
  }
  .hero h1 { font-size: clamp(2.4rem, 10.5vw, 3.4rem); }
  .hero-stats { gap: 24px; margin-top: 32px; padding-top: 20px; }
  .hero-stats strong { font-size: 1.35rem; }
  .hero-terms { display: none; }
  .chat { min-height: 170px; max-height: 280px; }
  .chat-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chat-chips::-webkit-scrollbar { display: none; }
  .chat-chips button { flex: 0 0 auto; }
  .scroll-cue { display: none; }
  .hero-copy { max-width: 100%; }

  .section-head { margin-bottom: 34px; }
  .facts-grid { gap: 10px; }
  .fact { padding: 20px 16px; }
  .fact p:last-child { font-size: 11.5px; }
  .fact-story { margin-top: 38px; }
  .tech-panel { padding: 22px; }
  .diagram-card { padding: 12px; }
  .diagram-title { font-size: 10.5px; }
  .simulator { padding: 22px 18px; }
  .sim-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .sim-hint { white-space: normal; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .ai-wrap { margin-top: 48px; }
  .chat { min-height: 160px; max-height: 250px; }
  .quiz-card { padding: 24px 20px 20px; }
  .quiz-top { flex-wrap: wrap; gap: 10px 16px; }
  .quiz-dots { order: 3; flex-basis: 100%; }
  .quiz-question { margin: 20px 0 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .lang-intro-card { padding: 22px 20px; }
  .term-result { padding: 18px; }
}

@media (max-width: 460px) {
  .brand-text small { display: none; }
  .lang-pill-native { display: none; }
  .facts-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; }
  .hero-cta .btn { flex: 1; }
  .step-tab { padding: 12px; gap: 12px; }
  .step-label small { display: none; }
  .term-others { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   2026 扩展：能源全景 / 双光热 / AI 问答 / 详情弹窗
   ========================================================= */

/* ---------- shared ---------- */
.nb { white-space: nowrap; }
.map, .delingha, .ask { position: relative; }
.map {
  background:
    radial-gradient(1000px 560px at 92% 0%, rgba(246, 182, 74, 0.06), transparent 62%),
    linear-gradient(180deg, var(--bg), #071411);
}
.delingha {
  background:
    radial-gradient(900px 500px at 0% 12%, rgba(224, 122, 63, 0.07), transparent 60%),
    linear-gradient(180deg, #071411, #06100f);
}
.ask {
  background:
    radial-gradient(900px 520px at 100% 0%, rgba(89, 195, 179, 0.08), transparent 62%),
    linear-gradient(180deg, #06100f, #050e0d);
}

/* ---------- energy map ---------- */
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: -8px 0 22px;
}
.map-toolbar .filter-row { margin: 0; }
.map-count {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  white-space: nowrap;
}
.energy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.source-card {
  --cat: var(--gold);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012));
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
}
.source-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cat) 55%, transparent);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018));
}
.source-card:focus-visible { outline: 2px solid var(--cat); outline-offset: 3px; }
.source-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.source-icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cat);
  border: 1px solid color-mix(in srgb, var(--cat) 38%, transparent);
  background: color-mix(in srgb, var(--cat) 9%, transparent);
}
.source-icon svg { width: 23px; height: 23px; }
.source-cat {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--cat);
  text-align: right;
}
.source-card h3 { font-size: 18px; line-height: 1.4; color: var(--sand); margin: 0; }
.source-tagline { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); min-height: 42px; }
.source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.source-meta span {
  font-size: 9.5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
}
.source-link {
  margin-top: 2px;
  font-size: 11px;
  color: var(--cat);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.map-note {
  margin: 20px 0 0;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted-2);
  padding-left: 12px;
  border-left: 2px solid rgba(246, 182, 74, 0.28);
}

/* ---------- output chart ---------- */
.output-card {
  margin-top: 30px;
  padding: 24px 26px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(600px 280px at 12% 0%, rgba(246, 182, 74, 0.06), transparent 65%),
    rgba(255, 255, 255, 0.022);
}
.output-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.output-head .eyebrow { margin-bottom: 6px; }
.output-head h3 { font-size: 20px; }
.output-hint { margin: 0; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.output-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.out-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted-2);
  font-size: 10.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.out-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: 0.5; }
.out-chip.is-on { color: var(--sand); border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); }
.out-chip.is-on i { opacity: 1; }
#outputChart { width: 100%; height: auto; margin-top: 4px; }
.output-note { margin: 6px 0 0; font-size: 10.5px; color: var(--muted-2); }

/* ---------- delingha cases ---------- */
.dual-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.case-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
}
.case-visual {
  padding: 8px 12px 0;
  background:
    radial-gradient(400px 160px at 70% 0%, rgba(246, 182, 74, 0.13), transparent 70%),
    rgba(0, 0, 0, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.case-visual svg { width: 100%; height: 150px; }
.case-body { padding: 20px 22px 22px; }
.case-tag { font-size: 9.5px; letter-spacing: 0.1em; color: var(--gold); }
.case-body h3 { font-size: 21px; margin: 8px 0 8px; color: var(--sand); }
.case-body p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-bottom: 14px; }
.case-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.case-stats span { font-size: 10.5px; color: var(--muted-2); }
.case-stats strong { color: var(--gold-2); font-size: 12.5px; margin-right: 3px; font-variant-numeric: tabular-nums; }
.case-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-2);
  font-size: 11.5px;
  cursor: pointer;
}
.case-link:hover { color: #fff1d4; }

.compare-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}
.compare-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.compare-table caption {
  text-align: left;
  padding: 14px 18px 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.compare-table th, .compare-table td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  font-size: 12px;
  line-height: 1.7;
  vertical-align: top;
}
.compare-table thead th { font-size: 10.5px; letter-spacing: 0.08em; color: var(--sand-dim); font-weight: 600; }
.compare-table tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.compare-table td { color: #cfc8b6; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }

.engineering {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  margin-top: 40px;
  align-items: start;
}
.eng-copy .eyebrow { margin-bottom: 10px; }
.eng-copy h3 { font-size: 24px; margin-bottom: 12px; }
.eng-copy p { font-size: 13.5px; line-height: 1.85; color: var(--muted); }
.eng-quote {
  margin-top: 18px;
  padding-left: 16px;
  border-left: 2px solid var(--gold);
  color: var(--sand) !important;
  font-size: 14.5px !important;
}

/* ---------- mode switch ---------- */
.mode-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.mode-btn {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.mode-btn.is-active { background: linear-gradient(135deg, #ffd58a, #f0aa46); color: #1c1305; font-weight: 650; }
.diagram[hidden] { display: none; }

/* ---------- ask ---------- */
.ask-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 48px;
  align-items: center;
}
.ask-info h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.35; margin-bottom: 14px; }
.ask-info > p { font-size: 13.5px; line-height: 1.85; color: var(--muted); }
.flow { margin: 20px 0 18px; display: flex; flex-direction: column; }
.flow li { display: flex; gap: 13px; padding: 11px 0; border-top: 1px dashed rgba(255, 255, 255, 0.09); }
.flow li > span { font-family: var(--mono); font-size: 10px; color: var(--gold); padding-top: 2px; }
.flow strong { display: block; font-size: 12.5px; color: var(--sand); font-weight: 600; }
.flow small { font-size: 10.5px; color: var(--muted-2); }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-grid div {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.status-grid span { display: block; font-size: 9px; letter-spacing: 0.08em; color: var(--muted-2); }
.status-grid strong { display: block; margin-top: 4px; font-size: 11.5px; color: var(--sand); font-weight: 600; }
.status-grid .is-on { color: var(--teal-soft); }
.status-grid .is-off { color: var(--ember); }
.status-grid .is-wait { color: var(--muted); }
.ai-disclaimer { margin-top: 16px; font-size: 10.5px !important; line-height: 1.75 !important; color: var(--muted-2) !important; }

.msg-meta { display: flex; align-items: center; gap: 7px; margin: 0 0 5px 2px; font-size: 9px; color: var(--muted-2); letter-spacing: 0.04em; }
.msg.user .msg-meta { justify-content: flex-end; }
.msg-source {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(246, 182, 74, 0.32);
  color: var(--gold-2);
  background: rgba(246, 182, 74, 0.07);
}
.msg-source.online { border-color: rgba(89, 195, 179, 0.36); color: var(--teal-soft); background: rgba(89, 195, 179, 0.07); }
.msg-source.warn { border-color: rgba(224, 112, 90, 0.36); color: #f0a08e; background: rgba(224, 112, 90, 0.07); }
.msg .msg-bubble a { color: var(--teal-soft); text-decoration: underline; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 7, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 30px 24px;
  border: 1px solid rgba(236, 208, 152, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(246, 182, 74, 0.1), transparent 65%),
    #081613;
  box-shadow: 0 40px 90px -40px #000;
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--sand); border-color: rgba(246, 182, 74, 0.4); }
.modal-head { display: flex; gap: 14px; align-items: center; padding-right: 34px; }
.source-icon.large { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; }
.source-icon.large svg { width: 28px; height: 28px; }
.modal-cat { font-size: 9.5px; letter-spacing: 0.14em; color: var(--gold); }
.modal-head h3 { font-size: 25px; margin: 3px 0 0; color: var(--sand); }
.modal-en { margin: 2px 0 0; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; color: var(--muted-2); }
.modal-lead { margin: 18px 0 16px; font-size: 14.5px; line-height: 1.8; color: #d7cdb8; }
.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.modal-stats div { padding: 11px 13px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 11px; background: rgba(255, 255, 255, 0.025); }
.modal-stats strong { display: block; font-size: 15px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.modal-stats span { display: block; margin-top: 3px; font-size: 9.5px; color: var(--muted-2); }
.modal-body h4 { margin: 0 0 7px; font-size: 11px; letter-spacing: 0.1em; color: var(--gold); font-weight: 600; }
.modal-body p { margin: 0 0 16px; font-size: 13px; line-height: 1.85; color: var(--muted); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 4px 0 18px; }
.pros h4 { color: var(--teal); }
.cons h4 { color: var(--ember); }
.pros ul, .cons ul { display: flex; flex-direction: column; gap: 7px; }
.pros li, .cons li { position: relative; padding-left: 14px; font-size: 12px; line-height: 1.7; color: #c3beae; }
.pros li::before, .cons li::before { content: ""; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.pros li::before { color: var(--teal); }
.cons li::before { color: var(--ember); }
.myth {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(246, 182, 74, 0.06);
}
.myth b { display: block; font-size: 10px; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 4px; }
.myth p { margin: 0; font-size: 12.5px; color: #d3c7ad; }
.modal-related h4 { margin-bottom: 8px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
body.modal-open { overflow: hidden; }

/* ---------- responsive for new blocks ---------- */
@media (max-width: 1080px) {
  .energy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ask-layout { grid-template-columns: 1fr; gap: 30px; }
  .engineering { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  .energy-grid { grid-template-columns: 1fr; }
  .source-tagline { min-height: 0; }
  .dual-cases { grid-template-columns: 1fr; }
  .case-visual svg { height: 135px; }
  .compare-table th, .compare-table td { padding: 10px 13px; }
  .output-card { padding: 20px 16px 16px; }
  .output-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .output-hint { white-space: normal; }
  .ask-info h3 { font-size: 1.55rem; }
  .status-grid { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
  .modal-panel { max-height: 92vh; padding: 22px 18px 18px; }
  .modal-head h3 { font-size: 21px; }
  .modal-stats { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; gap: 14px; }
  .modal-actions .btn { flex: 1; }
}

/* ---------- output chart ---------- */
.chart-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.chart-grid.faint { stroke-dasharray: 3 7; opacity: 0.55; }
.chart-label { fill: #7f8b80; font-family: var(--mono); font-size: 8.5px; }
.chart-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.diagram.is-hidden { display: none !important; }

.compare-hint { display: none; }
@media (max-width: 720px) {
  .compare-hint {
    display: block;
    margin: 8px 0 0;
    text-align: center;
    font-size: 10.5px;
    color: var(--muted-2);
  }
  .source-card { padding: 16px; gap: 7px; }
  .source-card h3 { font-size: 17px; }
  .source-tagline { font-size: 12px; }
  .source-icon { width: 38px; height: 38px; }
  .output-head h3 { font-size: 18px; }
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}
.case-facts span { font-size: 10.5px; color: var(--muted-2); line-height: 1.6; }
.case-facts strong { display: block; font-size: 17px; color: var(--gold-2); font-weight: 700; letter-spacing: -0.01em; }
@media (max-width: 720px) {
  .case-facts { grid-template-columns: 1fr 1fr; gap: 14px 10px; padding: 14px; }
  .case-facts strong { font-size: 16px; }
}

.deepseek-alt { margin: 10px 0 0; font-size: 10.5px; color: var(--muted-2); }
.deepseek-alt a { color: var(--teal-soft); text-decoration: underline; text-underline-offset: 3px; }
.deepseek-alt a:hover { color: #d8fff6; }

.status-retry {
  margin-top: 10px;
  padding: 5px 11px;
  border: 1px dashed rgba(246, 182, 74, 0.32);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-2);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.status-retry:hover { border-color: rgba(246, 182, 74, 0.6); background: rgba(246, 182, 74, 0.06); }
.status-retry:disabled { opacity: 0.5; cursor: wait; }

.ai-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}
.ai-mode-label { font-size: 9px; letter-spacing: 0.14em; color: var(--muted-2); }
.ai-mode {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.ai-mode button {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  font-size: 9.5px;
  cursor: pointer;
}
.ai-mode button.is-active { background: rgba(246, 182, 74, 0.16); color: var(--gold-2); }
.msg-retry {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font-size: 9px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.msg-retry:hover { color: var(--gold-2); }
.msg-meta { flex-wrap: wrap; }
