:root {
  --bg: #0b0f14;
  --bg-elev: #121820;
  --bg-soft: #18212c;
  --line: #2a3544;
  --text: #e8eef6;
  --muted: #9aabbd;
  --accent: #5ee0a0;
  --accent-ink: #0b0f14;
  --warn: #f0c674;
  --danger: #ff7b72;
  --radius: 12px;
  --max: 68rem;
  --read: 36em;
  --font: "IBM Plex Sans", "Noto Sans TC", "PingFang TC", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 224, 160, 0.08), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(90, 140, 255, 0.08), transparent 50%),
    var(--bg);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: #9ff0c4;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.75rem;
  z-index: 100;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 20, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #9ff0c4;
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-brand {
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.hero-lead {
  max-width: var(--read);
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  font-family: var(--mono);
}

.badge-warn {
  border-color: rgba(240, 198, 116, 0.45);
  color: var(--warn);
}

section {
  padding: 3rem 0;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  max-width: var(--read);
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn[aria-pressed="true"] {
  background: rgba(94, 224, 160, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: none;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.card:hover,
.card:focus-within {
  border-color: rgba(94, 224, 160, 0.55);
  transform: translateY(-2px);
  background: var(--bg-soft);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.card li {
  margin-bottom: 0.25rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.case-card a.title-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.case-card a.title-link:hover,
.case-card a.title-link:focus-visible {
  color: var(--accent);
}

.media-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #070a0e;
  margin: 1rem 0 1.25rem;
}

.media-frame figcaption {
  padding: 0.65rem 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.prose {
  max-width: var(--read);
}

.prose h2,
.prose h3 {
  line-height: 1.3;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose strong {
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.price {
  color: var(--accent);
  font-family: var(--mono);
  white-space: nowrap;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.steps li {
  counter-increment: step;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1rem 3.2rem;
  position: relative;
  color: var(--muted);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(94, 224, 160, 0.15);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.muted {
  color: var(--muted);
}

.notice {
  border: 1px solid rgba(240, 198, 116, 0.35);
  background: rgba(240, 198, 116, 0.08);
  color: var(--warn);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.page-hero {
  padding: 3rem 0 1.5rem;
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.stack-lg > * + * {
  margin-top: 2rem;
}

[hidden],
.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav-links.is-open {
    display: flex;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 3.6rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    flex-direction: column;
    box-shadow: var(--shadow);
  }

  .menu-toggle {
    display: inline-flex;
  }
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .card,
  .filter-btn {
    transition: none;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }

  .demo-shell,
  .demo-toast {
    transition: none;
  }
}

/* —— Interactive synthetic demos —— */
.demo-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #070a0e;
  overflow: hidden;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow);
}

.demo-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}

.demo-chrome strong {
  font-size: 0.92rem;
}

.demo-body {
  padding: 1rem;
}

.demo-grid {
  display: grid;
  gap: 1rem;
}

.demo-grid-2 {
  grid-template-columns: 1.2fr 0.8fr;
}

@media (max-width: 800px) {
  .demo-grid-2 {
    grid-template-columns: 1fr;
  }
}

.demo-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  padding: 0.9rem;
}

.demo-panel h3,
.demo-panel h4 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.demo-field {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.7rem;
}

.demo-field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.demo-field input,
.demo-field select,
.demo-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0f14;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.demo-field input:hover,
.demo-field select:hover,
.demo-field textarea:hover,
.demo-field input:focus-visible,
.demo-field select:focus-visible,
.demo-field textarea:focus-visible {
  border-color: var(--accent);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.slot-btn {
  border: 1px solid var(--line);
  background: #0b0f14;
  color: var(--muted);
  border-radius: 8px;
  padding: 0.55rem 0.4rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 44px;
}

.slot-btn:hover,
.slot-btn:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}

.slot-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(94, 224, 160, 0.12);
  color: var(--accent);
}

.slot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.product-list {
  display: grid;
  gap: 0.65rem;
}

.product-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  background: #0b0f14;
}

.product-row:hover {
  border-color: rgba(94, 224, 160, 0.45);
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.25rem 0;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: var(--mono);
}

.sheet-table th,
.sheet-table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
}

.sheet-table th {
  background: rgba(94, 224, 160, 0.08);
  color: var(--accent);
}

.notify-inbox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.notify-inbox-head h3 {
  margin: 0;
}

.notify-channel-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.notify-channel-switch .btn.is-active,
.notify-channel-switch .btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.notify-feed {
  display: grid;
  gap: 0.55rem;
  min-height: 8rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.notify-feed.is-telegram {
  background: rgba(36, 161, 222, 0.08);
  border-color: rgba(36, 161, 222, 0.35);
}

.notify-feed.is-discord {
  background: rgba(88, 101, 242, 0.1);
  border-color: rgba(88, 101, 242, 0.4);
}

.notify-card {
  border: 1px solid rgba(94, 224, 160, 0.35);
  background: rgba(94, 224, 160, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
}

.notify-feed.is-telegram .notify-card {
  border-color: rgba(36, 161, 222, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.notify-feed.is-discord .notify-card {
  border-color: rgba(88, 101, 242, 0.45);
  background: rgba(32, 34, 37, 0.55);
}

.notify-card time {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.chat-log {
  display: grid;
  gap: 0.55rem;
  max-height: 280px;
  overflow: auto;
  margin-bottom: 0.75rem;
  padding-right: 0.25rem;
}

.chat-bubble {
  max-width: 92%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

.chat-bubble.user {
  justify-self: end;
  background: rgba(94, 224, 160, 0.15);
  border: 1px solid rgba(94, 224, 160, 0.35);
}

.chat-bubble.bot {
  justify-self: start;
  background: #0b0f14;
  border: 1px solid var(--line);
  color: var(--muted);
}

.chat-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.mini-site {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0e141c;
}

.mini-site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: #121820;
}

.mini-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.mini-tab:hover,
.mini-tab:focus-visible {
  color: var(--text);
  border-color: var(--line);
}

.mini-tab[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.mini-pane {
  padding: 1rem 1.05rem 1.2rem;
  min-height: 220px;
}

.mini-pane[hidden] {
  display: none !important;
}

.mini-pane h3 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.mini-pane p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.mini-works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.mini-works span {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a2430, #243244);
  border: 1px solid var(--line);
}

.checkout-steps {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.checkout-steps span {
  font-size: 0.78rem;
  font-family: var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.checkout-steps span.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.demo-status {
  margin-top: 0.65rem;
  color: var(--accent);
  font-size: 0.9rem;
  min-height: 1.4em;
}

.demo-status[data-tone="warn"] {
  color: var(--warn);
}
