:root {
  --bg: #f3f6fa;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #596579;
  --line: #dce3ec;
  --blue: #175cd3;
  --blue-dark: #0b2f6b;
  --cyan: #dff6ff;
  --green: #08785f;
  --nav: rgba(248, 250, 252, 0.94);
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: 72px;
  color: var(--ink);
  font-family: "Noto Sans TC", "Segoe UI", sans-serif;
  line-height: 1.75;
  background:
    linear-gradient(rgba(23, 92, 211, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 92, 211, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}
html[lang="en"] body { font-family: "Aptos", "Segoe UI", sans-serif; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
.wrap { width: min(1180px, calc(100vw - 32px)); margin: 0 auto; }
.mono, code, pre { font-family: "IBM Plex Mono", "Cascadia Code", monospace; }
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--nav);
  backdrop-filter: blur(18px);
}
.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  font: 700 13px/1 "IBM Plex Mono", monospace;
}
.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font: inherit;
  font-weight: 750;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 7px;
  color: #465267;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.nav a:hover { color: var(--blue); background: rgba(23, 92, 211, 0.07); }
section[id] { scroll-margin-top: 92px; }
.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 24%),
    linear-gradient(135deg, #fff 0%, #f8fbff 55%, #eef6ff 100%);
}
.hero-grid {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 54px;
  padding: 76px 0;
}
.eyebrow {
  margin: 0 0 15px;
  color: var(--blue);
  font: 700 12px/1.4 "IBM Plex Mono", monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
h2 {
  margin-bottom: 15px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.13;
  letter-spacing: -0.025em;
}
h3 { margin-bottom: 9px; font-size: 21px; line-height: 1.35; }
.lead { max-width: 720px; color: var(--muted); font-size: 18px; }
.button-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 800;
}
.button.primary { color: #fff; border-color: var(--blue); background: var(--blue); }
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(23, 92, 211, 0.12); }
.terminal {
  overflow: hidden;
  border: 1px solid #243247;
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
  background: #0d1420;
  color: #d7e3f3;
}
.terminal-bar {
  padding: 11px 15px;
  color: #9aa9bd;
  border-bottom: 1px solid #243247;
  font: 600 12px/1 "IBM Plex Mono", monospace;
}
.terminal pre { margin: 0; padding: 24px; overflow: auto; font-size: 13px; line-height: 1.9; }
.terminal .ok { color: #55d9b3; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.stat { padding: 24px; background: #fff; }
.stat strong { display: block; font-size: 28px; }
.stat span { color: var(--muted); font-size: 14px; }
.section { padding: 82px 0; }
.section.alt { border-block: 1px solid var(--line); background: rgba(255,255,255,.78); }
.section.dark { color: #f8fafc; background: #0f172a; }
.section.dark .muted { color: #c3cedc; }
.section-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 46px;
  margin-bottom: 34px;
}
.section-head .intro { max-width: 760px; color: var(--muted); font-size: 17px; }
.section.dark .section-head .intro { color: #c3cedc; }
.grid-2, .grid-3 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.tag {
  display: inline-flex;
  margin-bottom: 13px;
  padding: 5px 9px;
  border-radius: 5px;
  color: var(--blue);
  background: rgba(23, 92, 211, 0.08);
  font: 700 12px/1.4 "IBM Plex Mono", monospace;
}
.architecture {
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr;
  align-items: stretch;
  gap: 10px;
}
.architecture .node {
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.architecture .core { border-color: #8cb6fb; background: #eef6ff; }
.architecture .arrow { display: grid; place-items: center; color: var(--blue); font-size: 30px; }
.steps { counter-reset: steps; display: grid; gap: 16px; }
.step {
  position: relative;
  padding: 25px 25px 25px 78px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.step::before {
  counter-increment: steps;
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 23px;
  color: var(--blue);
  font: 750 14px/1.5 "IBM Plex Mono", monospace;
}
.code {
  margin: 13px 0 0;
  padding: 18px;
  overflow: auto;
  border-radius: 10px;
  color: #e8edf5;
  background: #111827;
  font-size: 13px;
  line-height: 1.75;
}
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.shot {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
}
.shot.wide { grid-column: 1 / -1; }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
  background: #111;
}
.shot figcaption { padding: 18px 20px 21px; }
.shot figcaption p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 26px; }
.checklist li::before { content: "OK"; position: absolute; left: 0; color: var(--green); font: 750 11px/1.8 "IBM Plex Mono", monospace; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #344054; background: #f8fafc; font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.source-list { margin: 0; padding: 0; list-style: none; }
.source-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.source-list li:last-child { border-bottom: 0; }
.source-list a { color: var(--blue); overflow-wrap: anywhere; }
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.faq summary { padding: 18px 20px; cursor: pointer; font-weight: 800; }
.faq details p { padding: 0 20px 20px; color: var(--muted); }
.notice { padding: 20px 22px; border-left: 4px solid #f59e0b; background: #fffbeb; color: #78350f; }
.footer { padding: 36px 0 54px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.94);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 90vh; object-fit: contain; }
.lightbox button { position: absolute; top: 18px; right: 18px; min-width: 48px; min-height: 44px; border: 0; border-radius: 8px; background: #fff; font: inherit; font-weight: 800; }

@media (max-width: 960px) {
  body { padding-top: 64px; }
  .topbar { min-height: 64px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute;
    inset: 64px 0 auto;
    display: none;
    max-height: calc(100vh - 64px);
    padding: 12px 16px 20px;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  }
  .nav.open { display: grid; }
  .nav a { width: 100%; }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; padding: 58px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .grid-3 { grid-template-columns: 1fr; }
  .architecture { grid-template-columns: 1fr; }
  .architecture .node { min-height: auto; }
  .architecture .arrow { transform: rotate(90deg); }
}

@media (max-width: 680px) {
  .section { padding: 62px 0; }
  .grid-2, .gallery, .checklist { grid-template-columns: 1fr; }
  .shot.wide { grid-column: auto; }
  .footer-grid { display: block; }
  h1 { font-size: clamp(40px, 13vw, 58px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
