/* Colors follow the desktop workbench (sparklet-ui/ui/styles.css). */
:root {
  color-scheme: light;
  --font-sans:
    Inter, "Segoe UI Variable Text", "Segoe UI", -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI",
    "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC",
    sans-serif;
  --font-mono:
    "Cascadia Mono", "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono",
    Menlo, "Noto Sans Mono CJK SC", monospace;
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --surface-3: #eef2f0;
  --border: #e1e7e3;
  --border-strong: #cdd6d1;
  --text-1: #141c18;
  --text-2: #47534d;
  --text-3: #66726c;
  --brand: #176a47;
  --brand-hover: #115638;
  --brand-text: #136b46;
  --brand-soft: #e9f7ef;
  --brand-line: #b3dfc7;
  --on-brand: #ffffff;
  --mint: #77edb1;
  --ink: #12382e;
  --mark-lit: #1e8a59;
  --mark-off: rgb(18 56 46 / 0.14);
  --mark-glow: 0.9;
  --hero-glow: rgb(119 237 177 / 0.38);
  --grid-dot: rgb(23 106 71 / 0.09);
  --term-bg: #0f1a15;
  --term-bar: #16241d;
  --term-text: #d6e4dd;
  --term-dim: #7d9289;
  --cta-bg: #12382e;
  --cta-text: #eaf7f0;
  --cta-muted: #a9cdbb;
  --shadow-sm: 0 1px 2px rgb(16 32 24 / 0.05), 0 4px 16px -8px rgb(16 32 24 / 0.12);
  --shadow-lg: 0 24px 64px -16px rgb(9 28 19 / 0.32), 0 8px 24px -12px rgb(9 28 19 / 0.18);
  --ring: 0 0 0 3px rgb(31 157 104 / 0.3);
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c110f;
    --surface: #131a17;
    --surface-2: #171f1b;
    --surface-3: #1d2622;
    --border: #232d28;
    --border-strong: #34413b;
    --text-1: #e6edea;
    --text-2: #aab7b1;
    --text-3: #84918b;
    --brand: #3cc489;
    --brand-hover: #4fd497;
    --brand-text: #6fdcaa;
    --brand-soft: #112a1f;
    --brand-line: #1f4d38;
    --on-brand: #04150d;
    --mark-lit: #77edb1;
    --mark-off: rgb(255 255 255 / 0.14);
    --mark-glow: 0.55;
    --hero-glow: rgb(60 196 137 / 0.18);
    --grid-dot: rgb(111 220 170 / 0.07);
    --term-bg: #08100c;
    --term-bar: #101a15;
    --cta-bg: #102a20;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
    --shadow-lg: 0 24px 64px -16px rgb(0 0 0 / 0.7), 0 8px 24px -12px rgb(0 0 0 / 0.5);
    --ring: 0 0 0 3px rgb(60 196 137 / 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
a {
  color: var(--brand-text);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--brand-hover);
}
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.1em 0.38em;
  border-radius: 6px;
  background: var(--surface-3);
  overflow-wrap: anywhere;
}
ul,
ol {
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 720px) {
  :root {
    --gutter: 28px;
  }
}
.narrow > * {
  max-width: 720px;
}
.muted {
  color: var(--text-3);
}
.small {
  font-size: 0.875rem;
}
.eyebrow {
  margin-bottom: 12px;
  color: var(--brand-text);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}
.lead {
  color: var(--text-2);
  font-size: 1.125rem;
  max-width: 40em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}
.brand:hover {
  color: var(--text-1);
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  overflow: visible;
}
.brand-mark .lit {
  fill: var(--mark-lit);
}
.brand-mark .off {
  fill: var(--mark-off);
}
.brand-mark .spark {
  fill: #ffffff;
}
.brand-mark .glow-core {
  stop-color: var(--mark-lit);
  stop-opacity: var(--mark-glow);
}
.brand-mark .glow-edge {
  stop-color: var(--mark-lit);
  stop-opacity: 0;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--text-1);
  background: var(--surface-3);
}
.site-nav a[aria-current="page"] {
  color: var(--text-1);
  font-weight: 600;
}
.nav-icon {
  display: inline-flex;
}
.nav-icon svg {
  width: 20px;
  height: 20px;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-1);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.button:hover {
  color: var(--text-1);
  border-color: var(--text-3);
}
.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
.button.primary:hover {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}
.button.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
  background: radial-gradient(48rem 28rem at 85% -10%, var(--hero-glow), transparent 70%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero-inner > * {
  min-width: 0;
}
.hero h1 {
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 4vw + 1.2rem, 3.75rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hero .lead {
  margin-bottom: 28px;
}
.hero-note {
  margin-top: 20px;
  color: var(--text-3);
  font-size: 0.875rem;
  max-width: 34em;
}
@media (min-width: 960px) {
  .hero {
    padding: 88px 0 104px;
  }
  .hero-inner {
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
  }
}

.terminal {
  margin: 0;
  border-radius: var(--radius-xl);
  background: var(--term-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgb(119 237 177 / 0.14);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--term-bar);
}
.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2d3d35;
}
.terminal-bar span:first-child {
  background: var(--mint);
}
.terminal-bar em {
  margin-left: 8px;
  color: var(--term-dim);
  font-size: 0.75rem;
  font-style: normal;
}
.terminal pre {
  margin: 0;
  padding: 18px 20px 6px;
  overflow-x: auto;
  color: var(--term-text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
}
.terminal code {
  padding: 0;
  background: none;
  font-size: inherit;
  overflow-wrap: normal;
}
.t-prompt {
  color: var(--mint);
}
.t-dim {
  color: var(--term-dim);
}
.t-out {
  color: var(--mint);
}
.terminal figcaption {
  padding: 8px 20px 16px;
  color: var(--term-dim);
  font-size: 0.75rem;
}

/* Sections */
.section {
  padding: 72px 0;
}
.section-tight {
  padding: 28px 0;
}
.section-alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head {
  max-width: 44em;
  margin-bottom: 40px;
}
.section-head h2,
.split h2 {
  margin-bottom: 14px;
  font-size: clamp(1.625rem, 1.6vw + 1.1rem, 2.25rem);
  font-weight: 700;
}
.section-head p:not(.eyebrow),
.split p:not(.eyebrow) {
  color: var(--text-2);
}
.split p + p {
  margin-top: 14px;
}
@media (min-width: 960px) {
  .section {
    padding: 96px 0;
  }
  .section-tight {
    padding: 32px 0;
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.feature svg {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  padding: 9px;
  border-radius: 11px;
  background: var(--brand-soft);
  fill: none;
  stroke: var(--brand-text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 {
  margin-bottom: 8px;
  font-size: 1.0625rem;
}
.feature p {
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* How it works */
.flow {
  display: grid;
  gap: 0;
  align-items: center;
  margin-bottom: 48px;
}
.flow-col {
  display: grid;
  gap: 10px;
  list-style: none;
}
.node {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.node strong {
  font-size: 0.9375rem;
}
.node span {
  color: var(--text-3);
  font-size: 0.8125rem;
}
.node-core {
  gap: 2px;
  padding: 22px 24px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}
.node-core strong {
  margin-bottom: 6px;
  color: var(--brand-text);
  font-family: var(--font-mono);
  font-size: 1.0625rem;
}
.node-core span {
  color: var(--text-2);
  font-size: 0.875rem;
}
.flow-link {
  position: relative;
  justify-self: center;
  width: 2px;
  height: 36px;
  background: var(--brand-line);
}
.flow-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--brand-line);
  border-bottom: 2px solid var(--brand-line);
  transform: translateX(-50%) rotate(45deg);
}
@media (min-width: 860px) {
  .flow {
    grid-template-columns: 1fr 64px 1.15fr 64px 1fr;
  }
  .flow-link {
    width: 100%;
    height: 2px;
  }
  .flow-link::after {
    left: auto;
    right: 0;
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
  }
}
.steps {
  display: grid;
  gap: 16px;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 48px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--mint);
  font-weight: 700;
  font-size: 0.875rem;
}
.steps span {
  color: var(--text-2);
  font-size: 0.9375rem;
}
@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* Hardware */
.split {
  display: grid;
  gap: 32px;
  align-items: start;
}
@media (min-width: 960px) {
  .split {
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
  }
}
.spec-card {
  padding: 8px 24px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.spec-caption {
  padding: 14px 0 6px;
  color: var(--text-3);
  font-size: 0.8125rem;
}
.spec-list,
.facts {
  margin: 0;
}
.spec-list div,
.facts div {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.spec-list dt,
.facts dt {
  color: var(--text-3);
  font-size: 0.9375rem;
}
.spec-list dd,
.facts dd {
  margin: 0;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.facts div:last-child {
  border-bottom: 1px solid var(--border);
}
.facts div {
  grid-template-columns: 8em 1fr;
}

/* Call to action */
.cta {
  padding: 0 0 96px;
}
.cta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 40px 24px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(30rem 16rem at 100% 0%, rgb(119 237 177 / 0.22), transparent 70%),
    var(--cta-bg);
  color: var(--cta-text);
}
.cta h2 {
  font-size: clamp(1.5rem, 1.4vw + 1rem, 2rem);
}
.cta p {
  color: var(--cta-muted);
}
.cta .button.primary {
  margin-top: 8px;
  border-color: var(--mint);
  background: var(--mint);
  color: var(--ink);
}
.cta .button.primary:hover {
  border-color: #9df3c8;
  background: #9df3c8;
}
@media (min-width: 720px) {
  .cta-box {
    padding: 56px;
  }
}

/* Inner pages */
.page-head {
  padding: 56px 0 16px;
}
.page-head h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 2.5vw + 1.2rem, 2.75rem);
  font-weight: 750;
}
.page-404 {
  padding-bottom: 96px;
}
.page-404 .lead {
  margin-bottom: 28px;
}
.section-tight h2 {
  margin-bottom: 16px;
  font-size: 1.375rem;
}
.section-tight > .container > p {
  color: var(--text-2);
}
.section-tight > .container > * + * {
  margin-top: 16px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.card-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}
.card {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}
.card p,
.card li {
  color: var(--text-2);
  font-size: 0.9375rem;
}
.card .code + p {
  margin-top: 12px;
}
.plain-steps {
  display: grid;
  gap: 6px;
  padding-left: 1.3em;
}
.code {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--term-bg);
  color: var(--term-text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
}
.code code {
  padding: 0;
  background: none;
  font-size: inherit;
  overflow-wrap: normal;
}
.prose h3 {
  margin: 24px 0 8px;
  font-size: 1.0625rem;
}
.prose p {
  color: var(--text-2);
}
.prose p + p {
  margin-top: 12px;
}

/* Release list (download page) */
.release {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.release-status {
  color: var(--text-2);
}
.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 8px;
}
.release-head h2 {
  margin: 0;
  font-size: 1.5rem;
}
.release-meta {
  color: var(--text-3);
  font-size: 0.875rem;
}
.asset-group + .asset-group {
  margin-top: 8px;
}
.asset-group h3 {
  margin: 20px 0 8px;
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.asset-list {
  list-style: none;
  border-top: 1px solid var(--border);
}
.asset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.asset-label {
  font-weight: 600;
}
.asset-file {
  grid-column: 1;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}
.asset .button {
  grid-column: 2;
  grid-row: 1 / span 2;
}
@media (min-width: 720px) {
  .release {
    padding: 28px 32px;
  }
}

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.875rem;
}
.footer-inner {
  display: grid;
  gap: 20px;
}
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.footer-brand .brand {
  font-size: 1rem;
}
.footer-brand .brand-mark {
  width: 24px;
  height: 24px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-nav a {
  color: var(--text-2);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--text-1);
}
.footer-note {
  font-size: 0.8125rem;
}
@media (min-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .footer-note {
    grid-column: 1 / -1;
  }
}
