/* =============================================
   CIYUAN Website — Shared Styles
   ============================================= */

/* ---------- Variables ---------- */
:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-primary: #1a1a2e;
  --color-accent: #e63946;
  --color-accent2: #457b9d;
  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-highlight: #f0f4ff;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.10);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Noto Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-w: 1100px;
  --section-py: 80px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

/* ---------- Reading Progress Bar ---------- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(230,57,70,0.5);
}

body { padding-top: 0; }
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.logo-en {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.logo-zh {
  font-family: var(--font-cn);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-primary);
  color: #fff !important;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.lang-switch:hover {
  background: var(--color-accent2);
  text-decoration: none !important;
}

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, #f0f4ff 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.hero h1 .zh {
  font-family: var(--font-cn);
  color: var(--color-accent);
  letter-spacing: 0;
}

.hero-sub {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--color-text-muted);
  font-weight: 400;
  max-width: 680px;
  margin: 0 auto 12px;
  line-height: 1.5;
}

.hero-sub .zh {
  font-family: var(--font-cn);
  color: var(--color-accent);
  font-weight: 600;
}

.hero-equals {
  font-size: 16px;
  color: var(--color-text-muted);
  margin: 8px 0;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-primary);
  color: #fff !important;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #2d2d5a;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-surface);
  color: var(--color-primary) !important;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.2s, transform 0.15s;
}

.btn-secondary:hover {
  border-color: var(--color-accent2);
  transform: translateY(-1px);
  text-decoration: none !important;
}

/* ---------- Section Shared ---------- */
section { padding: var(--section-py) 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-accent2);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.section-title .zh {
  font-family: var(--font-cn);
  color: var(--color-accent);
  letter-spacing: 0;
}

.section-desc {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.section-desc .zh {
  font-family: var(--font-cn);
  font-weight: 600;
  color: var(--color-accent);
}

/* ---------- Definition Block ---------- */
.definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.def-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.def-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.def-card .en-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-accent2);
  margin-bottom: 8px;
}

.def-card .zh-label {
  font-family: var(--font-cn);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.def-card .term {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.def-card .term.zh {
  font-family: var(--font-cn);
  color: var(--color-accent);
}

.def-card .desc {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.def-card .desc.zh {
  font-family: var(--font-cn);
}

/* ---------- Official Note ---------- */
.official-note {
  background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  margin-top: 48px;
}

.official-note .note-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #4338ca;
  margin-bottom: 14px;
}

.official-note p {
  font-size: 17px;
  line-height: 1.8;
  color: #1e1b4b;
}

.official-note .en { color: var(--color-primary); }
.official-note .zh {
  font-family: var(--font-cn);
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------- Use Cases ---------- */
.use-cases { background: var(--color-surface); border-top: 1px solid var(--color-border); }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.case-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.case-icon {
  width: 48px;
  height: 48px;
  background: #f0f4ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}

.case-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.case-card h3 .zh {
  font-family: var(--font-cn);
  color: var(--color-accent);
  font-size: 15px;
  font-weight: 600;
}

.case-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.case-card .p-zh {
  font-family: var(--font-cn);
  font-size: 13px;
  margin-top: 4px;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; }

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child { border-top: 1px solid var(--color-border); }

.faq-item > .faq-q {
  padding: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  list-style: none;
  transition: color 0.2s;
}

.faq-item > .faq-q::-webkit-details-marker { display: none; }

.faq-item > .faq-q::marker { display: none; }

.faq-item > .faq-q:hover { color: var(--color-accent2); }

.faq-item > .faq-q .zh {
  font-family: var(--font-cn);
  color: var(--color-accent);
  font-size: 15px;
  font-weight: 600;
}

.faq-a {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.8;
  padding: 0 0 24px 0;
  padding-left: 26px;
}

.faq-a .zh {
  font-family: var(--font-cn);
  font-size: 14px;
}

/* details open state */
details.faq-item[open] > .faq-q { color: var(--color-accent2); }

details.faq-item summary { list-style: none; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::marker { display: none; }

/* old .faq-q and .faq-a styles removed — now using summary/div in <details> */

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo-en { color: #fff; font-size: 20px; }
.footer-brand .logo-zh { color: var(--color-accent); }

.footer-brand p {
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-bottom .lang-btns {
  display: flex;
  gap: 8px;
}

.footer-bottom .lang-btn {
  padding: 5px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

.footer-bottom .lang-btn:hover,
.footer-bottom .lang-btn.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root { --section-py: 56px; }

  .nav-links { gap: 16px; }
  .nav-links .desktop-only { display: none; }

  .hero { padding: 72px 0 56px; }

  .official-note { padding: 28px 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.6s ease forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* =============================================
   NEW COMPONENTS — Scale / Narrative
   ============================================= */

/* ---------- Stats Strip ---------- */
.stats-strip {
  background: var(--color-primary);
  padding: 36px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 0 48px;
}

.stat-divider {
  width: 1px;
  height: 56px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-unit {
  font-size: 0.45em;
  font-weight: 600;
  color: var(--color-accent);
  margin-left: 4px;
}

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}

/* ---------- Scale Section ---------- */
.scale-section {
  background: var(--color-primary);
  padding: var(--section-py) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.scale-section .section-desc { color: rgba(255,255,255,0.65); }

.scale-timeline {
  max-width: 640px;
  margin: 0 auto 48px;
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.12);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 48px;
  position: relative;
  padding: 0 0 0 calc(50% + 24px);
}

.timeline-item:nth-child(even) {
  padding: 0 calc(50% + 24px) 0 0;
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content { align-items: flex-end; }

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 2px solid rgba(255,255,255,0.5);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-dot.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(230,57,70,0.3);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 220px;
}

.timeline-year {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.timeline-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 8px;
}

.timeline-num .stat-unit {
  font-size: 0.35em;
}

.timeline-note {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.timeline-note-zh {
  font-family: var(--font-cn);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
}

.quote-block {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  max-width: 740px;
  margin: 0 auto;
}

.quote-block blockquote {
  font-family: var(--font-serif);
  font-size: 17px;
  color: #fff;
  line-height: 1.8;
  font-style: italic;
}

.quote-block blockquote::before {
  content: '\201C';
  font-size: 3em;
  color: var(--color-accent);
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: 4px;
}

.quote-block blockquote footer {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 12px;
}

/* ---------- Narrative Grid ---------- */
.narrative-grid {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.narrative-card {
  flex: 1;
  padding: 36px 32px;
}

.narrative-card.left {
  background: #fff;
}

.narrative-card.right {
  background: var(--color-highlight);
}

.narrative-header {
  margin-bottom: 24px;
}

.narrative-header.old .narrative-badge {
  background: #fef2f2;
  color: #b91c1c;
}

.narrative-header.new .narrative-badge {
  background: #f0fdf4;
  color: #15803d;
}

.narrative-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.narrative-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

.narrative-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  background: var(--color-bg);
  flex-shrink: 0;
}

.narrative-list {
  list-style: none;
  margin-bottom: 16px;
}

.narrative-list li {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.narrative-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
  opacity: 0.4;
}

.narrative-zh {
  font-family: var(--font-cn);
  font-size: 12px;
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------- Expert Block ---------- */
.expert-block {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius-lg);
  padding: 32px 40px;
}

.expert-text {
  font-family: var(--font-serif);
  font-size: 16px;
  color: #3b0764;
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 12px;
}

.expert-authors {
  font-size: 13px;
  color: #6b21a8;
  line-height: 1.6;
}

/* ---------- Scale Responsive ---------- */
@media (max-width: 768px) {
  .stats-grid {
    flex-direction: column;
    gap: 24px;
  }

  .stat-divider {
    width: 80px;
    height: 1px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    padding: 0 0 0 40px;
    flex-direction: row;
    text-align: left;
  }

  .timeline-item:nth-child(even) .timeline-content {
    align-items: flex-start;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-dot {
    left: 20px;
  }

  .narrative-grid {
    flex-direction: column;
  }

  .narrative-divider {
    padding: 8px 0;
    flex-direction: column;
  }

  .narrative-divider svg {
    transform: rotate(90deg);
  }

  .quote-block {
    padding: 24px 20px;
  }

  .expert-block {
    padding: 24px 20px;
  }

  .stat-item {
    padding: 0 24px;
  }
}

/* =============================================
   SHARE BUTTONS
   ============================================= */

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  background: var(--color-surface);
  color: var(--color-primary) !important;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-share:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.share-toast {
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #15803d;
  opacity: 0;
  transition: opacity 0.3s;
  height: 20px;
}

.share-toast.show {
  opacity: 1;
}

/* =============================================
   GLOSSARY TABLE
   ============================================= */

.glossary-table {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 8px;
}

.gtable-header {
  display: grid;
  grid-template-columns: 100px 120px 130px 1fr 130px;
  gap: 0;
  background: var(--color-primary);
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 12px 20px;
}

.gtable-row {
  display: grid;
  grid-template-columns: 100px 120px 130px 1fr 130px;
  gap: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-muted);
  align-items: center;
  background: var(--color-surface);
  transition: background 0.15s;
}

.gtable-row:last-child { border-bottom: none; }
.gtable-row:hover { background: var(--color-highlight); }

.gtable-row.highlight {
  background: #f0fdf4;
}

.gtable-row.highlight:hover { background: #dcfce7; }

.gtable-row .term.zh {
  font-family: var(--font-cn);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.gtable-row.highlight .term.zh {
  color: #15803d;
}

.gtable-row .term.en {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
}

.badge-official {
  font-size: 12px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 20px;
}

/* =============================================
   TOKEN CALCULATOR
   ============================================= */

.calc-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  max-width: 820px;
}

.calc-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.calc-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-sans);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  resize: vertical;
  transition: border-color 0.2s;
  line-height: 1.6;
}

.calc-input:focus {
  outline: none;
  border-color: var(--color-accent2);
}

.calc-counter {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 8px;
  font-family: var(--font-mono);
}

.calc-counter span { color: var(--color-accent); font-weight: 700; }

.calc-results {
  margin-top: 20px;
  min-height: 56px;
  padding: 16px;
  background: var(--color-primary);
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  line-height: 1.7;
}

.calc-hint {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.calc-token-chip {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 3px 3px 3px 0;
}

.calc-token-chip.cn {
  background: rgba(230,57,70,0.25);
  border-color: rgba(230,57,70,0.4);
  font-family: var(--font-cn);
}

.calc-note {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 16px;
  line-height: 1.6;
}

/* =============================================
   RESPONSIVE UPDATES
   ============================================= */
@media (max-width: 768px) {
  .gtable-header { display: none; }
  .gtable-row { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .gtable-row .term.zh { grid-column: 1; grid-row: 1; }
  .gtable-row .term.en { grid-column: 2; grid-row: 1; }
  .gtable-row > span:nth-child(3) { grid-column: 1; grid-row: 2; font-size: 12px; }
  .gtable-row > span:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; margin-top: 4px; }
  .gtable-row > span:nth-child(5) { display: none; }
  .calc-box { padding: 24px 20px; }
  .hero-cta { gap: 8px; }
}
