:root {
  --bg: #0A0B0F;
  --surface: #12141B;
  --surface-2: #171A23;
  --ink: #F2F4F8;
  --muted: #98A0B3;
  --accent: #FF6B3D;
  --accent-ink: #0A0B0F;
  --accent-soft: rgba(255, 107, 61, 0.14);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --nav-bg: rgba(10, 11, 15, 0.76);
  --code-bg: #0E1016;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --btn-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --r-card: 22px;
  --r-inner: 14px;
  --r-btn: 10px;
  --r-pill: 999px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --surface-2: #EDF0F7;
  --ink: #111318;
  --muted: #5A6275;
  --accent: #D9481E;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(217, 72, 30, 0.10);
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --nav-bg: rgba(245, 246, 250, 0.80);
  --code-bg: #F0F2F8;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  --btn-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
code, pre {
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.02em; flex-shrink: 0;
}
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF6B3D, #3B82F6);
  color: #FFFFFF;
}
.nav-links {
  display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; font-weight: 500;
}
.nav-links a { transition: color 140ms ease; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--r-btn);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: background 140ms ease, border-color 140ms ease, transform 100ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost {
  background: var(--surface); color: var(--ink); border-color: var(--border);
  box-shadow: var(--btn-shadow);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.theme-btn {
  height: 36px; padding: 0 12px; border-radius: var(--r-btn);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font: 500 13px/1 inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--btn-shadow);
}
.theme-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }

.hero { padding: 72px 0 56px; }
.hero-head { max-width: 780px; margin: 0 auto 40px; text-align: center; }
.eyebrow-row { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.pill-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.hero h1 {
  margin: 0 0 18px; font-size: clamp(34px, 5vw, 56px); line-height: 1.08;
  font-weight: 600; letter-spacing: -0.03em; text-wrap: balance;
}
.hero-sub {
  margin: 0 auto 28px; max-width: 640px; font-size: 17px; line-height: 1.6;
  color: var(--muted); text-wrap: pretty;
}
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.frame {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 8px; box-shadow: var(--shadow);
}
.frame-inner {
  border-radius: var(--r-inner); overflow: hidden; background: #090A0E;
  aspect-ratio: 16 / 10;
}
[data-theme="light"] .frame-inner { background: #EAEDF4; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-light { display: none; }
[data-theme="light"] .hero-img-dark { display: none; }
[data-theme="light"] .hero-img-light { display: block; }

.sec { padding: 56px 0; }
.sec-head { max-width: 660px; margin-bottom: 28px; }
.sec-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.sec h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 32px); line-height: 1.18; font-weight: 600; letter-spacing: -0.025em; }
.sec-lead { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 20px;
}
.kpi-val {
  font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; margin-bottom: 8px;
}
.kpi-label { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.kpi-note { font-size: 13px; color: var(--muted); line-height: 1.45; }
.table-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); overflow: hidden;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 14px; }
.cmp-table th, .cmp-table td { text-align: left; padding: 14px 18px; vertical-align: top; }
.cmp-table th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); }
.cmp-table tbody tr + tr td { border-top: 1px solid var(--border); }
.cmp-table td:first-child { font-weight: 500; color: var(--ink); }
.cmp-table td.hi { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.cmp-table td.dim { color: var(--muted); font-variant-numeric: tabular-nums; }

.shot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.shot-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 8px; display: flex; flex-direction: column;
}
.shot-media { border-radius: var(--r-inner); overflow: hidden; background: #090A0E; aspect-ratio: 16 / 10; }
[data-theme="light"] .shot-media { background: #EAEDF4; }
.shot-media img { width: 100%; height: 100%; object-fit: cover; }
.shot-body { padding: 16px 12px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shot-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.shot-desc { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.shot-link { font-size: 13px; font-weight: 500; color: var(--accent); margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; width: fit-content; }
.shot-link:hover { text-decoration: underline; }

.bento-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bento-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.bento-step { font-size: 12px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.bento-card h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.bento-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.pkg-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.pkg-tag {
  font-family: "SF Mono", ui-monospace, monospace; font-size: 12px;
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink);
}

.qs-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.code-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 8px; display: flex; flex-direction: column; min-width: 0;
}
.code-head { padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.code-pre {
  margin: 0; padding: 16px; border-radius: var(--r-inner); background: var(--code-bg);
  font-size: 13px; line-height: 1.6; overflow-x: auto; flex: 1; color: var(--ink);
}

.foot { border-top: 1px solid var(--border); padding: 28px 0 40px; margin-top: 32px; }
.foot-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; font-size: 13px; color: var(--muted);
}
.foot-link { color: var(--ink); font-weight: 500; }
.foot-link:hover { color: var(--accent); }

@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-grid { grid-template-columns: 1fr; }
  .qs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .hero { padding: 48px 0 36px; }
  .sec { padding: 40px 0; }
  .shot-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 16px; }
  .kpi-val { font-size: 24px; }
  .btn-nav-cta { padding: 0 12px; font-size: 13px; }
}
