/* LinkGuard / 聯動守護 — Design System */
:root {
  --bg-0: #f5f7fb;
  --bg-1: #fafbfd;
  --bg-2: #ffffff;
  --bg-3: #eef2f8;
  --line: rgba(40, 70, 120, 0.12);
  --line-strong: rgba(40, 70, 120, 0.28);
  --fg-0: #0a1226;
  --fg-1: #2f3a55;
  --fg-2: #5a6680;
  --fg-3: #8b94a8;
  --signal: #1d6fe0;        /* deeper signal blue for light bg */
  --signal-soft: #5fa1ee;
  --alert: #e8401b;         /* rescue / alert orange-red */
  --alert-soft: #c0331a;
  --warn: #d68a0a;
  --ok: #18a373;

  --grid: 8px;
  --maxw: 1440px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-0); }
body {
  background: var(--bg-1);
  color: var(--fg-0);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01','ss02','cv11';
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  cursor: none;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; cursor: none; }
button { font: inherit; cursor: none; }

/* ---------- typography ---------- */
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: 'zero'; }
.serif-tc { font-family: 'Noto Serif TC', 'Songti TC', serif; font-weight: 500; }
.label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--signal);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; }
.display {
  font-family: 'Noto Serif TC', 'Songti TC', serif;
  font-weight: 400;
  font-size: clamp(48px, 7.4vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.display .en {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 200;
  font-style: italic;
  letter-spacing: -0.04em;
}
.h2 {
  font-family: 'Noto Serif TC', 'Songti TC', serif;
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.h3 {
  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

/* ---------- layout ---------- */
.container {
  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding: 0 40px;
}
section {
  position: relative;
  padding: clamp(80px, 10vw, 160px) 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: start;
}
.section-head .meta { display: flex; flex-direction: column; gap: 8px; }

/* ---------- ambient scanlines & grid ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(40,70,120,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40,70,120,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 80%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.15  0 0 0 0 0.3  0 0 0 0.025 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- custom cursor ---------- */
.cursor-wrap { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; }
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 6px; height: 6px;
  background: var(--signal);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(29,111,224,0.5);
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 56px; height: 56px;
  border: 1px solid var(--signal);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  opacity: 0.6;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
}
.cursor-ring.is-hover { width: 92px; height: 92px; opacity: 0.9; border-color: var(--alert); }
.cursor-ring::after {
  content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(95,180,255,0.4);
  border-radius: 50%;
  animation: rotate 8s linear infinite;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.cursor-coords {
  position: fixed; top: 0; left: 0;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.05em; color: var(--signal);
  transform: translate(36px, 36px);
  pointer-events: none; z-index: 9998;
  text-shadow: 0 0 6px rgba(95,180,255,0.5);
  white-space: nowrap;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 40px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(245,247,251,0.92), rgba(245,247,251,0.4));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo svg { width: 28px; height: 28px; }
.nav-logo .name { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.18em; }
.nav-logo .name b { color: var(--signal); font-weight: 700; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fg-1);
  position: relative; padding: 4px 0;
}
.nav-links a::before {
  content: attr(data-num); position: absolute; top: -10px; left: 0;
  font-size: 9px; color: var(--fg-3);
}
.nav-links a:hover { color: var(--fg-0); }
.nav-cta {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  padding: 10px 18px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--fg-0);
  display: inline-flex; align-items: center; gap: 10px;
  transition: all 0.2s ease;
}
.nav-cta:hover { background: var(--signal); color: var(--bg-0); border-color: var(--signal); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; padding: 140px 0 100px; border: none;
  display: grid; grid-template-rows: 1fr auto;
  position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  align-content: end;
}
.hero-tag-row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em;
  color: var(--fg-2);
}
.hero-title { max-width: 1100px; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: block; }
.hero-sub {
  max-width: 640px; color: var(--fg-1); font-size: 17px; line-height: 1.55;
  margin-top: 32px;
}
.hero-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin-top: 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-meta-cell {
  padding: 24px 24px 24px 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.hero-meta-cell:last-child { border-right: none; padding-right: 0; }
.hero-meta-cell .v {
  font-family: 'Noto Serif TC', serif; font-size: 32px; line-height: 1;
  color: var(--fg-0);
}
.hero-meta-cell .v .unit { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--fg-2); margin-left: 4px; }
.hero-meta-cell .k {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-2);
}

.hero-awards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
  align-items: flex-start;
}
.hero-award {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  font-family: 'Noto Sans TC', 'Inter', sans-serif;
  font-size: 13px;
  color: var(--fg-0);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 16px rgba(40,70,120,0.05);
  max-width: 100%;
  flex-wrap: wrap;
}
.hero-award-badge {
  font-size: 18px;
  filter: saturate(1.2);
}
@media (max-width: 720px) {
  .hero-award { font-size: 12px; padding: 10px 14px; }
  .hero-award-badge { font-size: 16px; }
}

/* radar visualization in hero */
.hero-radar {
  position: absolute; right: 40px; top: 140px;
  width: 420px; height: 420px;
  pointer-events: none;
  opacity: 0.85;
}

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: start; }
.about-narrative p {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px; line-height: 1.6;
  color: var(--fg-0);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.about-narrative p .key { color: var(--alert); }
.about-narrative p .signal { color: var(--signal); }
.about-stats {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: 0 4px 24px rgba(40,70,120,0.06);
}
.about-stat {
  padding: 28px;
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 90px 1fr; gap: 24px; align-items: center;
}
.about-stat:last-child { border-bottom: none; }
.about-stat .num {
  font-family: 'Noto Serif TC', serif;
  font-size: 44px; line-height: 1; color: var(--signal);
}
.about-stat .lbl { font-size: 13px; color: var(--fg-1); line-height: 1.45; }

/* ---------- services / four modules ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.service-card {
  padding: 36px 28px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  position: relative;
  transition: background 0.3s ease;
  display: flex; flex-direction: column; gap: 20px;
  min-height: 480px;
}
.service-card:last-child { border-right: none; }
.service-card:hover { background: var(--bg-3); }
.service-card .idx {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em;
  color: var(--fg-3);
}
.service-card .icon {
  width: 64px; height: 64px;
  margin-bottom: 8px;
}
.service-card h3 .en {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--signal);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.service-card h3 .zh {
  font-family: 'Noto Serif TC', serif; font-weight: 400;
  font-size: 26px; line-height: 1.15;
}
.service-card .desc { color: var(--fg-1); font-size: 13.5px; line-height: 1.6; }
.service-card .specs {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.service-card .specs .row {
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.04em;
}
.service-card .specs .row .k { color: var(--fg-2); }
.service-card .specs .row .v { color: var(--fg-0); }

/* ---------- products / transmission chain ---------- */
.chain {
  margin-top: 64px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.chain-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 40px 0;
  flex-wrap: wrap;
}
.chain-node {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: 132px; min-width: 132px; text-align: center;
  flex-shrink: 0;
}
.chain-node .node-icon {
  width: 80px; height: 80px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(40,70,120,0.06);
}
.chain-node .node-icon::before {
  content: ""; position: absolute; inset: -1px;
  border: 1px solid var(--signal);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 4px;
}
.chain-node:hover .node-icon::before { opacity: 1; }
.chain-node .node-name {
  font-family: 'Noto Serif TC', serif; font-size: 16px; line-height: 1.2;
}
.chain-node .node-en {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em;
  color: var(--fg-2); text-transform: uppercase;
}
.chain-link {
  position: relative;
  flex: 1 1 40px;
  min-width: 40px;
  height: 1px;
  background: var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  margin-top: 8px;
  align-self: center;
  overflow: visible;
}
.chain-link::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: 30px;
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
  animation: travel 2.4s linear infinite;
}
.chain-link .protocol {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em;
  color: var(--signal); white-space: nowrap;
  background: var(--bg-2); padding: 2px 8px; border: 1px solid var(--line);
}
.chain-link .freq {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  color: var(--fg-2); white-space: nowrap;
}
@keyframes travel {
  0% { left: 0%; }
  100% { left: calc(100% - 30px); }
}

/* product cards row below chain */
.product-rows { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 64px; }
.product-row {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 60px 1fr 200px; gap: 32px; align-items: start;
  cursor: none;
  transition: background 0.2s ease;
}
.product-row:hover { background: rgba(95,180,255,0.025); }
.product-row .idx { font-family: 'JetBrains Mono', monospace; color: var(--fg-3); font-size: 12px; padding-top: 4px; }
.product-row .name {
  font-family: 'Noto Serif TC', serif; font-size: 22px; line-height: 1.3;
}
.product-row .name .en {
  display: block; margin-top: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--fg-2); letter-spacing: 0.1em; text-transform: uppercase;
}
.product-row .desc { font-size: 13px; color: var(--fg-1); margin-top: 10px; line-height: 1.55; }
.product-row .stat {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--signal); text-align: right;
}
.product-row .stat .big {
  display: block;
  font-family: 'Noto Serif TC', serif; font-size: 28px; color: var(--fg-0);
  margin-bottom: 4px;
}

/* ---------- experiments / data band ---------- */
.experiments {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.experiment {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.experiment:last-child { border-right: none; }
.experiment .tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.16em; color: var(--alert);
  display: flex; align-items: center; gap: 8px;
}
.experiment .tag::before {
  content: ""; width: 8px; height: 8px; background: var(--alert);
}
.experiment .big {
  font-family: 'Noto Serif TC', serif;
  font-size: 56px; line-height: 1; color: var(--fg-0);
}
.experiment .big .unit { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--fg-2); }
.experiment .ttl { font-size: 14px; color: var(--fg-0); }
.experiment .body { font-size: 13px; color: var(--fg-1); line-height: 1.55; }

/* ---------- team ---------- */
.team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.team-card {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 320px;
}
.team-card:nth-child(3n) { border-right: none; }
.team-portrait {
  width: 120px; height: 120px;
  background:
    repeating-linear-gradient(45deg, rgba(29,111,224,0.07) 0 6px, transparent 6px 12px),
    var(--bg-3);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif TC', serif; font-size: 36px; color: var(--signal);
  position: relative;
}
.team-portrait::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid transparent;
  background:
    linear-gradient(transparent, transparent) padding-box,
    linear-gradient(135deg, transparent 50%, var(--signal) 50%, var(--signal) 52%, transparent 52%) border-box;
}
.team-card .role {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em;
  color: var(--signal); text-transform: uppercase;
}
.team-card .name {
  font-family: 'Noto Serif TC', serif; font-size: 24px; line-height: 1.2;
}
.team-card .focus { font-size: 13px; color: var(--fg-1); line-height: 1.55; }
.team-card .meta {
  margin-top: auto;
  display: flex; gap: 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--fg-2);
  letter-spacing: 0.05em;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 60px; border-bottom: 1px solid var(--line);
}
.footer h4 {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em;
  color: var(--fg-2); text-transform: uppercase; margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--fg-1); font-size: 13px; }
.footer ul a:hover { color: var(--fg-0); }
.footer-mark { font-family: 'Noto Serif TC', serif; font-size: 28px; line-height: 1.2; }
.footer-mark .en { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--fg-2); letter-spacing: 0.18em; display: block; margin-top: 8px; }
.footer-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.14em; color: var(--fg-3); text-transform: uppercase;
}

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.35s; }

/* prefers-reduced-motion: ensure visibility without relying on animations.
   Some preview iframes default to reduce, which would otherwise leave
   .reveal / modal at opacity 0 forever. */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > *,
  .reveal-stagger.in > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .fm-overlay,
  .fm-panel { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ---------- placeholder text ---------- */
::selection { background: var(--signal); color: var(--bg-0); }

/* logo image */
.logo-img {
  width: 32px; height: 32px;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  flex-shrink: 0;
}

/* ===== Features Accordion ===== */
.features-intro {
  max-width: 760px;
  margin: 0 0 48px;
  font-size: 18px;
  color: var(--fg-1);
  line-height: 1.7;
}
.features-intro .key { color: var(--fg-0); font-weight: 600; }

.features-acc {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.feat-row { border-bottom: 1px solid var(--line); }
.feat-row:last-child { border-bottom: none; }

.feat-head {
  width: 100%;
  display: grid;
  grid-template-columns: 60px 1fr auto 28px;
  align-items: center;
  gap: 24px;
  padding: 28px 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.feat-head:hover { background: rgba(29, 111, 224, 0.02); }

.feat-idx {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
}

.feat-title-block { min-width: 0; }
.feat-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.feat-title .zh {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--fg-0);
  letter-spacing: 0.01em;
}
.feat-en {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.feat-blurb {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.55;
  max-width: 640px;
}

.feat-meta {
  display: flex;
  align-items: center;
  gap: 24px;
}
.feat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 220px;
}
.feat-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  background: var(--bg-2);
}

.feat-count {
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
  min-width: 56px;
}
.feat-count .n {
  display: block;
  font-size: 26px;
  color: var(--signal);
  font-weight: 500;
  line-height: 1;
}
.feat-count .u {
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
}

.feat-toggle {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--fg-1);
  transition: transform 0.4s cubic-bezier(.22,1,.36,1), background 0.2s, color 0.2s, border-color 0.2s;
}
.feat-row.open .feat-toggle {
  transform: rotate(45deg);
  background: var(--signal);
  color: #fff;
  border-color: var(--signal);
}

.feat-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(.22,1,.36,1);
}
.feat-body-inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
}
.feat-row.open .feat-body { grid-template-rows: 1fr; }
.feat-row.open .feat-body-inner {
  padding: 8px 0 36px;
  border-top: 1px dashed var(--line);
}

.feat-group {
  padding: 20px 24px 20px 0;
  border-right: 1px dashed var(--line);
}
.feat-group:last-child { border-right: none; }

.feat-group-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.feat-group-name .dot {
  width: 5px; height: 5px;
  background: var(--signal);
  border-radius: 50%;
  flex-shrink: 0;
}
.feat-group-name .ct {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--fg-3);
  padding: 2px 6px;
  border: 1px solid var(--line);
}

.feat-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feat-items li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--fg-1);
  line-height: 1.5;
}
.feat-items .bullet {
  color: var(--signal);
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 3px;
}

.feat-items li {
  display: block;
  padding: 0;
}
.feat-item-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: transparent;
  border: none;
  border-bottom: 1px dashed transparent;
  padding: 6px 4px 6px 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--fg-1);
  text-align: left;
  cursor: pointer;
  line-height: 1.5;
  position: relative;
  transition: color 0.15s, border-color 0.15s, padding 0.15s;
}
.feat-item-btn:hover {
  color: var(--fg-0);
  border-bottom-color: var(--line-strong);
  padding-left: 4px;
}
.feat-item-btn .bullet {
  color: var(--signal);
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 3px;
  transition: transform 0.15s;
}
.feat-item-btn:hover .bullet { transform: translateX(2px); }
.feat-item-btn .label { flex: 1; }
.feat-item-arrow {
  font-size: 11px;
  color: var(--fg-3);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
  margin-left: 4px;
}
.feat-item-btn:hover .feat-item-arrow {
  opacity: 1;
  color: var(--signal);
  transform: translate(2px, -2px);
}

/* group header as button */
.feat-group-btn {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  position: relative;
}
.feat-group-btn:hover .feat-group-arrow {
  opacity: 1;
  color: var(--signal);
  transform: translate(2px, -2px);
}
.feat-group-arrow {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 11px;
  color: var(--fg-3);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}

/* ===== Feature Modal ===== */
.fm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 32px;
  animation: fmFadeIn 0.18s ease;
}
@keyframes fmFadeIn { from { opacity: 0; } to { opacity: 1; } }

.fm-panel {
  width: min(960px, 100%);
  max-height: calc(100vh - 64px);
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  animation: fmSlide 0.24s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
@keyframes fmSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  flex-shrink: 0;
}
.fm-crumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fm-idx {
  color: var(--signal);
  font-weight: 500;
}
.fm-close {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--fg-1);
  cursor: pointer;
  transition: all 0.15s;
}
.fm-close:hover { background: var(--fg-0); color: var(--bg-0); border-color: var(--fg-0); }

.fm-body {
  padding: 32px 36px;
  overflow-y: auto;
  flex: 1;
}

.fm-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.fm-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 32px;
  font-weight: 500;
  color: var(--fg-0);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0;
}
.fm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fm-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  color: var(--fg-1);
  background: var(--bg-2);
}

.fm-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 36px;
}
.fm-section { margin-bottom: 24px; }
.fm-section:last-child { margin-bottom: 0; }
.fm-section-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.fm-desc {
  font-size: 15px;
  color: var(--fg-1);
  line-height: 1.75;
  margin: 0;
}

.fm-flow {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 8px;
}
.flow-svg { width: 100%; height: auto; display: block; }

.fm-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
}
.fm-items li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--fg-1);
}
.fm-items .b { color: var(--signal); margin-top: 2px; }

.fm-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.fm-stat:last-child { border-bottom: none; }
.fm-stat-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.fm-stat-val {
  color: var(--fg-0);
  text-align: right;
}

.fm-shot {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.fm-shot-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 16px 16px;
}
.fm-shot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s;
}
.fm-shot-img.loaded { opacity: 1; }
.fm-shot-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.04);
  padding: 2px 6px;
  margin-top: 4px;
  display: inline-block;
}
.fm-shot-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--fg-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.fm-shot-label > * { display: block; }
.fm-shot-icon { font-size: 24px; opacity: 0.4; }
.fm-shot-meta {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--fg-3);
}

.fm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-transform: uppercase;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .fm-overlay { padding: 0; }
  .fm-panel { max-height: 100vh; height: 100vh; border: none; }
  .fm-body { padding: 20px; }
  .fm-title { font-size: 24px; }
  .fm-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 900px) {
  .features-intro { font-size: 15px; margin-bottom: 32px; }
  .feat-head {
    grid-template-columns: 36px 1fr 24px;
    grid-template-rows: auto auto;
    gap: 12px 12px;
    padding: 20px 0;
  }
  .feat-title-block { grid-column: 2; }
  .feat-meta {
    grid-column: 2;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }
  .feat-toggle { grid-column: 3; grid-row: 1; align-self: start; }
  .feat-idx { grid-row: 1; align-self: start; padding-top: 4px; }
  .feat-title .zh { font-size: 18px; }
  .feat-blurb { font-size: 13px; }
  .feat-tags { max-width: none; justify-content: flex-start; }
  .feat-count { text-align: left; min-width: auto; display: flex; align-items: baseline; gap: 4px; }
  .feat-count .n { font-size: 22px; display: inline; }
  .feat-body-inner { grid-template-columns: 1fr; }
  .feat-group { border-right: none; border-bottom: 1px dashed var(--line); padding: 16px 0; }
  .feat-group:last-child { border-bottom: none; }
}

/* hide cursor on small screens, show default */
@media (max-width: 900px) {
  body { cursor: auto; font-size: 14px; }
  a, button { cursor: pointer; }
  .cursor-dot, .cursor-ring, .cursor-coords { display: none; }

  /* Nav */
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .nav-cta { padding: 8px 12px; font-size: 10px; }
  .logo-text .en { font-size: 11px; }
  .logo-text .tc { font-size: 14px; }
  .logo-img { width: 28px; height: 28px; }

  /* Containers */
  .container { padding: 0 20px; }
  section { padding: 80px 0 !important; }

  /* Section heads */
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .h2 { font-size: 28px !important; line-height: 1.2; }

  /* Hero */
  .hero { padding-top: 120px !important; min-height: auto !important; }
  .hero-title { font-size: 44px !important; line-height: 1.05; }
  .hero-title .line { font-size: inherit !important; }
  .hero-sub { font-size: 15px; margin-top: 24px; }
  .hero-radar { display: none; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .hero-meta-cell { padding: 16px 12px; }
  .hero-meta-cell:nth-child(2) { border-right: none; }
  .hero-meta-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .hero-meta-cell .v { font-size: 22px; }
  .hero-status-bar { flex-direction: column; gap: 8px; align-items: flex-start; font-size: 9px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-narrative p { font-size: 17px; line-height: 1.7; }
  .about-stat .num { font-size: 32px; }
  .about-stat { padding: 20px; gap: 12px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }
  .service-card { border-right: none; min-height: auto; padding: 28px 20px; }
  .service-card .title { font-size: 22px; }

  /* Chain */
  .chain { padding: 28px 16px; }
  .chain-track {
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
  }
  .chain-node { width: 100%; min-width: 0; flex-direction: row; justify-content: flex-start; gap: 18px; text-align: left; }
  .chain-node .node-icon { width: 64px; height: 64px; flex-shrink: 0; }
  .chain-node .node-icon svg { width: 100%; height: 100%; }
  .chain-link {
    width: 1px; height: 40px; min-height: 40px;
    flex: 0 0 40px; background: var(--line-strong);
    margin: 0 0 0 32px;
    align-self: flex-start;
  }
  .chain-link::before {
    width: 1px; height: 12px;
    background: linear-gradient(180deg, transparent, var(--signal), transparent);
    animation: travel-v 2.4s linear infinite;
    top: 0; left: 0;
  }
  .chain-link .protocol {
    top: 50%; left: 16px; transform: translateY(-50%);
    white-space: nowrap;
  }
  .chain-link .freq {
    top: 50%; left: auto; right: -180px; transform: translateY(-50%);
  }

  /* Products */
  .product-rows { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 40px 1fr; padding: 20px 0; gap: 12px; }
  .product-row .stat { grid-column: 1 / -1; text-align: left; margin-top: 8px; }
  .product-row .name { font-size: 18px; }
  .product-row .stat .big { font-size: 22px; }

  /* Experiments */
  .experiments { grid-template-columns: 1fr; }
  .experiment { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 20px; }
  .experiment:last-child { border-bottom: none; }
  .experiment .big { font-size: 40px; }

  /* Team */
  .team-grid { grid-template-columns: 1fr; }
  .team-card { border-right: none; padding: 24px 20px; }
  .team-portrait { width: 80px; height: 80px; font-size: 28px; }

  /* Footer */
  .footer { padding: 40px 20px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-mark { font-size: 22px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; font-size: 10px; }

  /* Tweaks panel — keep within viewport */
  .twk-panel { right: 8px !important; bottom: 8px !important; width: calc(100vw - 16px) !important; max-width: 280px; }
}

@keyframes travel-v {
  0% { transform: translateY(-12px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 36px !important; }
  .h2 { font-size: 24px !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .nav-cta span { display: none; }
}

/* ---------- v0.4 architecture ---------- */
.arch-versions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.arch-card {
  padding: 28px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 16px;
  transition: background 0.3s ease;
}
.arch-card:hover { background: var(--bg-3); }
.arch-card-top { display: flex; align-items: center; justify-content: space-between; }
.arch-code {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; height: 28px; padding: 0 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--signal);
  border: 1px solid var(--line-strong); border-radius: 2px;
}
.arch-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.arch-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.08em;
  color: var(--fg-2); padding: 2px 7px; border: 1px solid var(--line); border-radius: 2px;
}
.arch-name .full {
  display: block;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.06em;
  color: var(--signal); text-transform: none; margin-bottom: 6px;
}
.arch-name .zh {
  font-family: 'Noto Serif TC', serif; font-weight: 400;
  font-size: 22px; line-height: 1.2; color: var(--fg-0);
}
.arch-desc { color: var(--fg-1); font-size: 13px; line-height: 1.6; }
.arch-device {
  margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.04em;
}
.arch-device .k { color: var(--fg-2); }
.arch-device .v { color: var(--fg-0); }
.arch-core-head {
  margin-top: 64px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.arch-core-head .label {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  color: var(--fg-2); text-transform: uppercase;
}

@media (max-width: 720px) {
  .arch-versions { grid-template-columns: 1fr; }
}

/* hide cursor on small screens, show default */

@keyframes travel-v {
  0% { transform: translateY(-12px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 36px !important; }
  .h2 { font-size: 24px !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .nav-cta span { display: none; }
}
