:root {
  color-scheme: light;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --container: 1160px;
  --gutter: 16px;
  --header-h: 64px;
  --term-bg: #17121D;
  --term-fg: #F6EEFF;
  --term-muted: #AFA0BF;
  --term-string: #A5E7B8;
  --term-key: #D7AAFF;
  --term-keyword: #FFD43B;
  --term-border: #372D42;
  --hero-glow: rgba(124, 42, 203, 0.14);
}
[data-theme="dark"] { color-scheme: dark; --hero-glow: rgba(171, 104, 244, 0.16); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --hero-glow: rgba(171, 104, 244, 0.16); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--fh-color-canvas);
  color: var(--fh-color-text);
  font-family: var(--font-body);
  font-size: var(--fh-scale-font-size-16);
  line-height: var(--fh-scale-line-height-relaxed);
  overflow-x: hidden;
}
::selection { background: var(--fh-color-selection); }
img, svg { display: block; max-width: 100%; }
a { color: var(--fh-color-link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: var(--fh-scale-line-height-tight); margin: 0; }
p { margin: 0; }
code, pre { font-family: var(--font-mono); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.product .sr-only + .desc { margin-top: 20px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--fh-color-accent); color: var(--fh-color-on-accent);
  padding: 8px 16px; border-radius: var(--fh-scale-radius-md); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--fh-color-canvas) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--fh-color-border); }
.site-header .container { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--fh-color-text); text-decoration: none; font-weight: 600; font-size: var(--fh-scale-font-size-14);
  padding: 8px 12px; border-radius: var(--fh-scale-radius-md);
}
.nav a:hover { background: var(--fh-color-surface); }
.nav .nav-section { display: none; }
@media (min-width: 820px) { .nav .nav-section { display: inline-block; } }
.ext::after { content: "\2197"; font-weight: 400; margin-left: 4px; color: var(--fh-color-text-muted); }

.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  background: transparent; color: var(--fh-color-text);
  border: 1px solid var(--fh-color-border); border-radius: var(--fh-scale-radius-md); cursor: pointer;
}
.theme-toggle:hover { background: var(--fh-color-surface); border-color: var(--fh-color-border-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--fh-scale-radius-md);
  font: 600 var(--fh-scale-font-size-16)/1 var(--font-body); text-decoration: none;
  border: 1px solid transparent; transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fh-color-accent); color: var(--fh-color-on-accent); }
.btn-primary:hover { background: var(--fh-color-button-hover); }
.btn-primary:active { background: var(--fh-color-button-active); }
.btn-secondary { background: var(--fh-color-surface); color: var(--fh-color-text); border-color: var(--fh-color-border-strong); }
.btn-secondary:hover { background: var(--fh-color-surface-raised); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: var(--fh-scale-font-size-14); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, var(--hero-glow), transparent);
  pointer-events: none;
}
.hero .container { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) {
  .hero { padding: 88px 0 104px; }
  .hero .container { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font-size: var(--fh-scale-font-size-14); font-weight: 600; color: var(--fh-color-text-muted);
  letter-spacing: .02em;
}
.eyebrow .slash { width: 22px; height: 6px; background: var(--fh-color-accent); transform: skewX(-24deg); border-radius: 1px; }
.hero h1 {
  font-size: clamp(36px, 8.5vw, 64px); font-weight: 800; font-style: italic;
  letter-spacing: -0.025em; line-height: 1.05; max-width: 14ch;
}
.hero h1 .accent { color: var(--fh-color-link); }
.hero .lead {
  margin-top: 24px; max-width: 54ch;
  font-size: var(--fh-scale-font-size-18); line-height: var(--fh-scale-line-height-relaxed); color: var(--fh-color-text-muted);
}
.hero .lead strong { color: var(--fh-color-text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.facts {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 32px 0 0; padding: 0; list-style: none;
  font-size: var(--fh-scale-font-size-14); color: var(--fh-color-text-muted);
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fh-color-accent); }

.terminal {
  background: var(--term-bg); color: var(--term-fg);
  border: 1px solid var(--term-border); border-radius: var(--fh-scale-radius-lg);
  box-shadow: 0 24px 60px rgba(36, 22, 47, .22), 0 2px 6px rgba(36, 22, 47, .12);
  overflow: hidden; min-width: 0; margin: 0;
}
@media (max-width: 479px) { .terminal pre, .code pre { font-size: 12px; } }
.terminal-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--term-border); font: 400 12px/1 var(--font-mono); color: var(--term-muted);
}
.terminal-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #4A4053; }
.terminal-bar .dot:first-child { background: var(--fh-color-accent); }
.terminal-bar .title { margin-left: 8px; }
.terminal pre {
  margin: 0; padding: 20px; overflow-x: auto;
  font-size: 13px; line-height: 1.7; tab-size: 2;
}
.terminal .c { color: var(--term-muted); }
.terminal .p { color: var(--term-keyword); user-select: none; }
.terminal .s { color: var(--term-string); }
.terminal .k { color: var(--term-key); }
.terminal .o { color: var(--term-fg); }
.terminal .ok { color: var(--term-string); }

.section { padding: 72px 0; }
@media (min-width: 980px) { .section { padding: 96px 0; } }
.section-alt { background: var(--fh-color-surface); border-top: 1px solid var(--fh-color-border); border-bottom: 1px solid var(--fh-color-border); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.kicker {
  display: inline-block; margin-bottom: 12px;
  font-size: var(--fh-scale-font-size-14); font-weight: 600; color: var(--fh-color-link);
  letter-spacing: .06em; text-transform: uppercase;
}
.section h2 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { margin-top: 16px; font-size: var(--fh-scale-font-size-18); color: var(--fh-color-text-muted); }

.products { display: grid; gap: 20px; }
@media (min-width: 900px) { .products { grid-template-columns: 2fr 1fr; } }
.product {
  position: relative; display: flex; flex-direction: column;
  background: var(--fh-color-surface-raised); border: 1px solid var(--fh-color-border);
  border-radius: var(--fh-scale-radius-lg); padding: 28px; box-shadow: var(--fh-effects-shadow-sm);
}
.section-alt .product { background: var(--fh-color-canvas); }
[data-theme="dark"] .product, [data-theme="dark"] .section-alt .product { background: var(--fh-color-surface-raised); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .product, :root:not([data-theme="light"]) .section-alt .product { background: var(--fh-color-surface-raised); }
}
.product::before {
  content: ""; position: absolute; left: 28px; top: -1px; width: 56px; height: 4px;
  background: var(--fh-color-accent); border-radius: 0 0 3px 3px;
}
.product-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.product-logo img { height: 34px; width: auto; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  font-size: var(--fh-scale-font-size-12); font-weight: 600; border-radius: var(--fh-scale-radius-full);
  background: var(--fh-semantic-warning-bg); color: var(--fh-semantic-warning-fg); border: 1px solid var(--fh-semantic-warning-border);
}
.product h3 { margin-top: 20px; font-size: var(--fh-scale-font-size-24); font-weight: 800; letter-spacing: -0.01em; }
.product .desc { margin-top: 12px; color: var(--fh-color-text-muted); max-width: 62ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 4px 10px; border-radius: var(--fh-scale-radius-sm);
  font: 400 var(--fh-scale-font-size-12)/1.5 var(--font-mono);
  background: var(--fh-color-canvas); border: 1px solid var(--fh-color-border); color: var(--fh-color-text);
}
.product .actions { margin-top: auto; padding-top: 28px; }
.product-soon {
  background: transparent; border-style: dashed; box-shadow: none; justify-content: center;
}
.section-alt .product-soon, [data-theme="dark"] .product-soon { background: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .product-soon { background: transparent; } }
.product-soon::before { display: none; }
.product-soon .mark { width: 56px; height: auto; opacity: .9; }
.product-soon h3 { margin-top: 20px; font-size: var(--fh-scale-font-size-20); }
.product-soon p { margin-top: 8px; color: var(--fh-color-text-muted); }

.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.feature {
  padding: 24px; border-radius: var(--fh-scale-radius-lg);
  background: var(--fh-color-surface); border: 1px solid var(--fh-color-border);
}
.feature .icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--fh-scale-radius-md);
  background: var(--fh-palettes-purple-1); color: var(--fh-palettes-purple-8);
}
[data-theme="dark"] .feature .icon { background: #2E2240; color: var(--fh-color-link); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .feature .icon { background: #2E2240; color: var(--fh-color-link); } }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { margin-top: 16px; font-size: var(--fh-scale-font-size-18); font-weight: 600; }
.feature p { margin-top: 8px; font-size: var(--fh-scale-font-size-16); color: var(--fh-color-text-muted); line-height: var(--fh-scale-line-height-normal); }
.more { margin-top: 32px; font-weight: 600; }

.steps { display: grid; gap: 20px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.step { display: grid; gap: 12px; min-width: 0; }
@media (min-width: 900px) {
  .step { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
}
.step-text { display: flex; gap: 16px; }
.step-text::before {
  counter-increment: step; content: counter(step);
  flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--fh-color-accent); color: var(--fh-color-on-accent); font-weight: 800; font-size: var(--fh-scale-font-size-14);
}
.step-text h3 { font-size: var(--fh-scale-font-size-18); font-weight: 600; padding-top: 3px; }
.step-text p { margin-top: 4px; color: var(--fh-color-text-muted); font-size: var(--fh-scale-font-size-14); line-height: var(--fh-scale-line-height-normal); }
.code {
  position: relative; min-width: 0;
  background: var(--term-bg); color: var(--term-fg);
  border: 1px solid var(--term-border); border-radius: var(--fh-scale-radius-md);
}
.code pre { margin: 0; padding: 16px 56px 16px 16px; overflow-x: auto; font-size: 13px; line-height: 1.7; }
.code .p { color: var(--term-keyword); user-select: none; }
.code .c { color: var(--term-muted); }
.code .s { color: var(--term-string); }
.copy {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 36px; height: 36px;
  background: transparent; color: var(--term-muted); border: 1px solid var(--term-border); border-radius: var(--fh-scale-radius-sm);
  cursor: pointer;
}
.copy:hover { color: var(--term-fg); border-color: var(--term-muted); }
.copy:focus-visible { outline: 2px solid var(--fh-color-focus-ring); outline-offset: 2px; }
.copy svg { width: 16px; height: 16px; }
.copy .icon-done { display: none; color: var(--term-string); }
.copy.is-done .icon-copy { display: none; }
.copy.is-done .icon-done { display: block; }
.copy[hidden] { display: none; }

.about { display: grid; gap: 40px; }
@media (min-width: 980px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }
.about-text p { margin-top: 16px; font-size: var(--fh-scale-font-size-18); color: var(--fh-color-text-muted); max-width: 58ch; }
.about-text p strong { color: var(--fh-color-text); font-weight: 600; }
.principles { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.principles li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 20px; border-radius: var(--fh-scale-radius-lg);
  background: var(--fh-color-surface-raised); border: 1px solid var(--fh-color-border);
}
.section-alt .principles li { background: var(--fh-color-canvas); }
[data-theme="dark"] .section-alt .principles li { background: var(--fh-color-surface-raised); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section-alt .principles li { background: var(--fh-color-surface-raised); } }
.principles .tick {
  width: 14px; height: 22px; margin-top: 2px; background: var(--fh-color-accent); transform: skewX(-14deg); border-radius: 2px;
}
.principles h3 { font-size: var(--fh-scale-font-size-16); font-weight: 600; }
.principles p { margin-top: 4px; color: var(--fh-color-text-muted); font-size: var(--fh-scale-font-size-14); line-height: var(--fh-scale-line-height-normal); }

.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--fh-color-border); }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 16px; color: var(--fh-color-text-muted); font-size: var(--fh-scale-font-size-14); }
.footer-brand img { height: 22px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-size: var(--fh-scale-font-size-14); }
.footer-links a { color: var(--fh-color-text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--fh-color-text); text-decoration: underline; }

.notfound { min-height: calc(100vh - var(--header-h) - 140px); display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .code-404 { font-size: clamp(72px, 18vw, 140px); font-weight: 800; font-style: italic; letter-spacing: -0.04em; line-height: 1; color: var(--fh-color-link); }
[data-theme="dark"] .notfound .code-404 { color: var(--fh-color-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notfound .code-404 { color: var(--fh-color-accent); } }
.notfound h1 { margin-top: 16px; font-size: var(--fh-scale-font-size-32); font-weight: 800; }
.notfound p { margin-top: 12px; color: var(--fh-color-text-muted); }
.notfound .actions { justify-content: center; }
