:root {
  --bg: #0b0a1f;
  --bg-2: #13112e;
  --surface: rgb(255 255 255 / 0.05);
  --surface-strong: rgb(255 255 255 / 0.08);
  --border: rgb(255 255 255 / 0.1);
  --text: #f4f2ff;
  --text-dim: #b3aed6;
  --text-faint: #7f7aa6;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --blue: #3b82f6;
  --accent: linear-gradient(135deg, #a78bfa 0%, #6366f1 45%, #38bdf8 100%);
  --green: #34d399;
  --amber: #fbbf24;
  --radius: 18px;
  --radius-small: 10px;
  --shadow: 0 30px 80px -20px rgb(20 10 60 / 0.7);
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6ff;
    --bg-2: #eeebff;
    --surface: rgb(255 255 255 / 0.7);
    --surface-strong: #ffffff;
    --border: rgb(40 30 110 / 0.1);
    --text: #17142e;
    --text-dim: #4c4775;
    --text-faint: #807ba3;
    --shadow: 0 30px 70px -25px rgb(60 40 160 / 0.35);
    color-scheme: light;
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgb(139 92 246 / 0.35), transparent 60%),
    radial-gradient(900px 500px at 5% 10%, rgb(56 189 248 / 0.18), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgb(99 102 241 / 0.25), transparent 60%),
    var(--bg);
}

.stars {
  position: absolute;
  inset: -640px -80px 0;
  background-repeat: repeat;
  will-change: translate;
}

.stars-far {
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgb(255 255 255 / 0.55), transparent),
    radial-gradient(1px 1px at 33% 68%, rgb(255 255 255 / 0.4), transparent),
    radial-gradient(1px 1px at 58% 14%, rgb(255 255 255 / 0.5), transparent),
    radial-gradient(1px 1px at 76% 44%, rgb(255 255 255 / 0.35), transparent),
    radial-gradient(1px 1px at 91% 83%, rgb(255 255 255 / 0.45), transparent);
  background-size: 320px 320px;
  animation: twinkle 9s ease-in-out infinite alternate;
}

.stars-mid {
  background-image:
    radial-gradient(1.3px 1.3px at 18% 30%, rgb(255 255 255 / 0.75), transparent),
    radial-gradient(1.2px 1.2px at 64% 72%, rgb(214 204 255 / 0.7), transparent),
    radial-gradient(1.4px 1.4px at 82% 18%, rgb(255 255 255 / 0.8), transparent);
  background-size: 480px 480px;
  animation: twinkle 6s ease-in-out 1s infinite alternate;
}

.stars-near {
  background-image:
    radial-gradient(2px 2px at 26% 40%, rgb(255 255 255 / 0.95), transparent),
    radial-gradient(1.8px 1.8px at 70% 86%, rgb(190 215 255 / 0.85), transparent);
  background-size: 640px 640px;
  filter: drop-shadow(0 0 3px rgb(200 190 255 / 0.9));
  animation: twinkle 4s ease-in-out 2s infinite alternate;
}

@media (prefers-color-scheme: light) {
  .stars { opacity: 0; }
}

@keyframes twinkle {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

.brand img { border-radius: 8px; }

.nav nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
}

.nav nav a:hover { color: var(--text); }
.lang { padding: 4px 9px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-dim); font-size: 13px; font-weight: 600; text-decoration: none; }
.lang:hover { color: var(--text); border-color: rgb(139 92 246 / 0.5); }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 30px -8px rgb(99 102 241 / 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -8px rgb(99 102 241 / 0.85); }

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button.small { padding: 8px 16px; font-size: 14px; }

.button.ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.button.disabled {
  background: var(--surface);
  color: var(--text-faint);
  border: 1px dashed var(--border);
  box-shadow: none;
  cursor: default;
}

.button.disabled:hover { transform: none; }

/* Hero */

main { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

section { padding: 96px 0; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 72px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  font-weight: 800;
}

.gradient {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 24px 0 32px;
  max-width: 34em;
  font-size: 19px;
  color: var(--text-dim);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.meta { margin-top: 18px; font-size: 14px; color: var(--text-faint); }

/* Hero visual: a stylized menu bar, popover and widget */

.hero-visual {
  position: relative;
  min-height: 520px;
}

.glow {
  position: absolute;
  inset: 8% 4% 10% 12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(139 92 246 / 0.55), rgb(56 189 248 / 0.18) 55%, transparent 75%);
  filter: blur(30px);
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  .glow { background: radial-gradient(closest-side, rgb(139 92 246 / 0.28), rgb(56 189 248 / 0.12) 55%, transparent 75%); }
}

.menubar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 32px;
  padding: 0 14px;
  border-radius: 12px 12px 0 0;
  background: rgb(30 27 60 / 0.75);
  border: 1px solid var(--border);
  color: #eceaff;
  font-size: 13px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@media (prefers-color-scheme: light) {
  .menubar { background: rgb(255 255 255 / 0.75); color: #1b1838; }
}

.apple {
  width: 12px;
  height: 14px;
  border-radius: 6px 6px 7px 7px;
  background: currentColor;
  opacity: 0.85;
}

.mb-spacer { flex: 1; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.up, .dot.done { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.slow, .dot.wait { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.dot.run { background: var(--blue); box-shadow: 0 0 10px var(--blue); animation: pulse 1.6s ease-in-out infinite; }

@keyframes pulse {
  50% { opacity: 0.35; }
}

.widget {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 280px;
  padding: 16px;
  border-radius: 22px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  animation: float 8s ease-in-out 1s infinite;
}

@media (prefers-color-scheme: dark) {
  .widget { background: rgb(28 25 58 / 0.82); }
}

.w-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.w-row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 7px; }
.w-row span { margin-left: auto; font-size: 11px; color: var(--text-faint); }

/* Hero demo */
.hero-copy, .hero-visual { min-width: 0; }
.menubar { gap: 2px; overflow: hidden; white-space: nowrap; }
.mb-clock { margin-left: 8px; white-space: nowrap; opacity: 0.85; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Menu bar items mirror MetricIcon: a tiny label over the value, arrows in two rows, a flame with the temperature. */
.mb-item {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 5px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s ease;
}
.mb-item:hover { background: rgb(255 255 255 / 0.12); }
.mb-item.active { background: rgb(255 255 255 / 0.22); }
.mb-item:focus-visible { outline: 2px solid rgb(139 92 246 / 0.8); outline-offset: 1px; }
.mb-stack { display: grid; width: 32px; text-align: left; line-height: 1; }
.mb-stack small { font-size: 7px; font-weight: 300; letter-spacing: 0.02em; }
.mb-stack span { font-size: 12px; }
.mb-rows { display: grid; font-size: 9px; font-weight: 500; line-height: 1.15; text-align: right; }
.mb-rows span { min-width: 56px; }
.mb-temp { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; }
.mb-temp .sym { width: 11px; height: 11px; }
.sparkle-plate { width: 16px; height: 16px; display: block; }

@media (prefers-color-scheme: light) {
  .mb-item:hover { background: rgb(0 0 0 / 0.08); }
  .mb-item.active { background: rgb(0 0 0 / 0.14); }
}

/* The popover follows NSPopover in dark mode with SwiftUI's system colours and type sizes. */
.popover {
  --fg: rgb(255 255 255 / 0.92);
  --fg2: rgb(235 235 245 / 0.6);
  --fg3: rgb(235 235 245 / 0.3);
  --fill: rgb(255 255 255 / 0.1);
  --sys-blue: #0a84ff;
  --sys-red: #ff453a;
  --sys-orange: #ff9f0a;
  --sys-yellow: #ffd60a;
  --sys-green: #30d158;
  --sys-indigo: #5e5ce6;
  --sys-gray: #98989d;
  position: absolute;
  top: 44px;
  right: 40px;
  z-index: 2;
  width: 300px;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--fg3) transparent;
  padding: 14px;
  border-radius: 12px;
  background: rgb(40 38 52 / 0.9);
  border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  color: var(--fg);
  font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  animation: float 7s ease-in-out infinite;
}

@media (prefers-color-scheme: light) {
  .popover {
    --fg: rgb(0 0 0 / 0.88);
    --fg2: rgb(60 60 67 / 0.62);
    --fg3: rgb(60 60 67 / 0.3);
    --fill: rgb(0 0 0 / 0.07);
    --sys-blue: #007aff;
    --sys-red: #ff3b30;
    --sys-orange: #ff9500;
    --sys-yellow: #ffcc00;
    --sys-green: #34c759;
    --sys-indigo: #5856d6;
    --sys-gray: #8e8e93;
    background: rgb(246 245 250 / 0.92);
    border-color: rgb(0 0 0 / 0.1);
  }
}

.popover .blue { --c: var(--sys-blue); }
.popover .red { --c: var(--sys-red); }
.popover .orange { --c: var(--sys-orange); }
.popover .green { --c: var(--sys-green); }
.popover .indigo { --c: var(--sys-indigo); }
.popover .gray { --c: var(--sys-gray); }

.panel { display: flex; flex-direction: column; gap: 10px; padding: 0; }
.panel[hidden] { display: none; }
.panel-in { animation: panel-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
.popover hr { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--fill); }
.popover :where(button) { font: inherit; color: inherit; }

@keyframes panel-in {
  from { opacity: 0; translate: 0 6px; }
}

.sym { width: 14px; height: 14px; flex: none; }

/* Overview (OverviewView) */
#demo-ai { gap: 12px; }
.ov-header { display: flex; align-items: center; justify-content: space-between; }
.ov-header strong { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ov-header strong .sym { color: var(--sys-blue); }
.icon-button { display: grid; place-items: center; padding: 2px; border: 0; background: none; color: var(--sys-blue); cursor: pointer; }
.icon-button.spinning .sym { animation: spin 0.8s linear; }

@keyframes spin {
  to { rotate: 360deg; }
}

.providers { display: grid; gap: 14px; }
.provider { display: grid; gap: 4px; }
.pv-head { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.pv-head strong { font-weight: 600; }
.pv-plan { color: var(--fg2); }
.logo { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.logo.claude { background: radial-gradient(circle at 50% 50%, #f4a261 0 35%, #d97757 36%); }
.logo.codex { background: conic-gradient(from 0deg, #10a37f, #1f6feb, #10a37f); }
.u-row { display: grid; gap: 2px; }
.u-line { display: flex; align-items: baseline; gap: 4px; font-size: 10px; }
.u-label { color: var(--fg2); }
.u-reset { margin-left: auto; color: var(--fg3); }
.u-value { font-weight: 500; font-variant-numeric: tabular-nums; }
.u-value.warning { color: var(--sys-orange); font-weight: 700; }
.u-value.critical { color: var(--sys-red); font-weight: 700; }
.u-bar { height: 4px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.u-bar i { display: block; height: 100%; min-width: 3px; border-radius: 99px; background: linear-gradient(90deg, #a78bfa, #6366f1, #38bdf8); transition: width 0.6s ease; }
.u-bar i.warning { background: var(--sys-orange); }
.u-bar i.critical { background: var(--sys-red); }

.websites { display: grid; gap: 6px; }
.ws-title { margin: 0; font-size: 10px; font-weight: 600; color: var(--fg2); }
.site-row { display: flex; align-items: center; gap: 8px; }
.site-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-detail { margin-left: auto; font-size: 10px; color: var(--fg2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.site-detail.problem { color: var(--sys-red); }
.site-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.site-dot.up { background: var(--sys-green); }
.site-dot.down { background: var(--sys-red); }

.app-buttons { display: flex; justify-content: space-between; }
.bordered {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: rgb(255 255 255 / 0.14);
  font-size: 11px;
  cursor: pointer;
}
.bordered .sym { width: 12px; height: 12px; }

@media (prefers-color-scheme: light) {
  .bordered { background: rgb(0 0 0 / 0.06); box-shadow: 0 0.5px 1px rgb(0 0 0 / 0.2); }
}

/* Metric details (MetricDetailView and DetailComponents) */
.d-headline { margin: 0; font-size: 13px; font-weight: 700; text-align: center; }
.d-section { display: grid; gap: 6px; }
.d-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--fg3); }
.d-title::before, .d-title::after { content: ""; flex: 1; height: 1px; background: var(--fill); }
.d-row { display: flex; align-items: center; gap: 6px; }
.d-label { color: var(--fg2); }
.d-value { margin-left: auto; padding-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2.5px; flex: none; background: var(--c); }
.caption2 { margin: 0; font-size: 10px; color: var(--fg3); }

.all-fine { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--fg2); }
.insight-row { display: flex; align-items: flex-start; gap: 8px; }
.insight-row .sym { margin-top: 1px; color: var(--sys-blue); }
.insight-row strong { display: block; font-weight: 600; }
.insight-row small { display: block; margin-top: 2px; font-size: 10px; color: var(--fg2); }
.handoff { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--fg2); }
.logo-button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: var(--fill); cursor: pointer; }
.logo-button:hover { background: var(--fg3); }

.rings { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.rings.centered { justify-content: space-evenly; padding: 0; }
.ring { position: relative; display: grid; place-items: center; }
.ring.big { width: 72px; height: 72px; }
.ring.small { width: 52px; height: 52px; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.ring circle { fill: none; stroke: var(--c); stroke-dasharray: 0 999; transition: stroke-dasharray 0.6s ease, stroke-dashoffset 0.6s ease; }
.ring circle.track { stroke: var(--fill); stroke-dasharray: none; }
.ring span { position: relative; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ring.big span { font-size: 14px; }
.ring.small span { font-size: 10px; }

.gauge { display: grid; justify-items: center; gap: 4px; font-size: 10px; font-weight: 600; }
.gauge svg { width: 72px; height: 43px; }
.gauge path { fill: none; stroke-width: 6; stroke-linecap: round; }
.g-green { stroke: var(--sys-green); }
.g-yellow { stroke: var(--sys-yellow); }
.g-red { stroke: var(--sys-red); }
.g-needle { stroke: var(--sys-blue); stroke-width: 3; stroke-linecap: round; }

.chart { position: relative; padding: 4px; border-radius: 6px; background: var(--fill); }
.chart.h60 { height: 60px; }
.chart.h80 { height: 80px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart polygon { fill: var(--sys-blue); opacity: 0.85; transition: all 0.6s ease; }
.chart polygon.up { fill: var(--sys-red); }
.scale { position: absolute; left: 6px; font-size: 9px; font-style: normal; color: var(--fg2); font-variant-numeric: tabular-nums; }
.scale.top { top: 5px; }
.scale.bottom { bottom: 5px; }
.cores { display: flex; align-items: flex-end; gap: 2px; height: 52px; }
.cores span { position: relative; flex: 1; height: 44px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.cores i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px; background: var(--c); transition: height 0.6s ease; }
.stacked { display: block; width: 100%; height: 8px; border-radius: 99px; background: var(--fill); }
.stacked rect { fill: var(--c); }
.connectivity { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; }
.connectivity i { aspect-ratio: 1; border-radius: 1.5px; background: var(--sys-green); }

.big-rate { display: grid; justify-items: center; gap: 2px; }
.big-rate strong { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.big-rate span { display: inline-flex; align-items: center; gap: 4px; }
.speed-result { display: grid; gap: 6px; }
.speed-result[hidden] { display: none; }
.status-badge { margin-left: auto; display: grid; place-items: center; width: 58px; height: 16px; border-radius: 4px; background: var(--sys-green); color: #fff; font-size: 10px; font-weight: 700; }
.toggle { display: flex; align-items: flex-start; gap: 6px; font-size: 10px; }
.toggle input { margin: 1px 0 0; accent-color: var(--sys-blue); }
.wide-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.14);
  cursor: pointer;
}
.wide-button:disabled { opacity: 0.6; cursor: progress; }
.wide-button:disabled .sym { animation: spin 1s linear infinite; }
.link-button { align-self: center; padding: 0; border: 0; background: none; color: var(--sys-blue); cursor: pointer; }

@media (prefers-color-scheme: light) {
  .wide-button { background: rgb(0 0 0 / 0.06); box-shadow: 0 0.5px 1px rgb(0 0 0 / 0.2); }
}

.p-table { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.p-table li { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.p-table .p-head { font-size: 10px; color: var(--fg2); }
.p-head > span:first-child { margin-right: auto; }
.p-name { margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch-col, .p-pair { width: 64px; text-align: right; flex: none; }
.swatch-col { display: flex; justify-content: flex-end; }
.p-table .sym { color: var(--fg2); }
.app-icon { width: 14px; height: 14px; border-radius: 3.5px; flex: none; }
.app-icon.xcode { background: linear-gradient(160deg, #6ac8ff, #1463d8); }
.app-icon.safari { background: radial-gradient(circle, #fff 0 18%, #34aadc 20% 62%, #e9f2fb 64%); }
.app-icon.docker { background: linear-gradient(160deg, #3fa9f5, #1d63ed); }
.app-icon.windowserver { background: linear-gradient(160deg, #b8b8c0, #6d6d75); }

.demo-hint {
  position: absolute;
  right: 40px;
  bottom: -34px;
  margin: 0;
  font-size: 13px;
  color: var(--text-faint);
}
.demo-hint::before { content: "↑ "; }

/* Sections */

h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
}

.section-lead {
  max-width: 40em;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--text-dim);
}

.features h2 { margin-bottom: 48px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover { transform: translateY(-3px); border-color: rgb(139 92 246 / 0.45); }

.card h3 { margin: 16px 0 8px; font-size: 20px; }
.card p { margin: 0; color: var(--text-dim); font-size: 15.5px; }

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  position: relative;
  box-shadow: 0 8px 24px -8px rgb(99 102 241 / 0.8);
}

.icon::after {
  content: "";
  position: absolute;
  inset: 12px;
  background: #fff;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.i-mac::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v11H3zM8 20h8M12 16v4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v11H3zM8 20h8M12 16v4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-ai::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.2 6.8L21 11l-6.8 2.2L12 20l-2.2-6.8L3 11l6.8-2.2z' fill='black'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.2 6.8L21 11l-6.8 2.2L12 20l-2.2-6.8L3 11l6.8-2.2z' fill='black'/%3E%3C/svg%3E"); }
.i-agents::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16M4 12h10M4 18h13' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16M4 12h10M4 18h13' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-web::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
.i-widgets::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='8' height='8' rx='2'/%3E%3Crect x='13' y='3' width='8' height='8' rx='2'/%3E%3Crect x='3' y='13' width='18' height='8' rx='2'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='8' height='8' rx='2'/%3E%3Crect x='13' y='3' width='8' height='8' rx='2'/%3E%3Crect x='3' y='13' width='18' height='8' rx='2'/%3E%3C/svg%3E"); }
.i-help::after { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v11H9l-5 4z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v11H9l-5 4z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Privacy */

.privacy-inner {
  padding: 56px;
  border-radius: 28px;
  background:
    radial-gradient(600px 300px at 0% 0%, rgb(139 92 246 / 0.25), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
}

.privacy h2 { text-align: left; }

.privacy ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-dim);
}

.privacy li { padding-left: 30px; position: relative; }
.privacy li strong { color: var(--text); display: block; }
.privacy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
}

/* Pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.plan-card.featured {
  border-color: rgb(139 92 246 / 0.6);
  box-shadow: 0 0 0 1px rgb(139 92 246 / 0.35), var(--shadow);
}

.plan-card h3 { margin: 0; font-size: 22px; }
.price { margin: 8px 0 20px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.price.soon { font-size: 22px; color: var(--text-faint); font-weight: 700; }

.plan-card ul { margin: 0 0 28px; padding: 0; list-style: none; flex: 1; color: var(--text-dim); font-size: 15.5px; }
.plan-card li { padding: 7px 0 7px 26px; position: relative; }
.plan-card li::before { content: "✓"; position: absolute; left: 0; color: var(--violet); font-weight: 800; }
.plan-card li strong { color: var(--text); }
.plan-card li em { font-style: normal; color: var(--text-faint); }
.plan-card .button { justify-content: center; }

.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* Changelog */

.releases {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--border);
}

.releases li { position: relative; padding: 0 0 28px 28px; }
.releases li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgb(139 92 246 / 0.8);
}
.rel-head { display: flex; align-items: baseline; gap: 12px; }
.rel-head strong { font-size: 18px; }
.rel-head time { color: var(--text-faint); font-size: 14px; }
.releases p { margin: 6px 0 0; color: var(--text-dim); }

/* FAQ */

.faq { max-width: 760px; margin: 0 auto; }
.faq h2 { margin-bottom: 36px; }

details {
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--text-faint); font-size: 22px; line-height: 1; transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: var(--text-dim); }

/* Story */

.story-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.story h2 { text-align: left; }
.story p { color: var(--text-dim); font-size: 18px; }

.fun-fact {
  margin: 32px 0 24px;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid rgb(139 92 246 / 0.35);
  background: radial-gradient(500px 200px at 0% 0%, rgb(139 92 246 / 0.2), transparent 70%), var(--surface);
  color: var(--text-dim);
}

.fun-fact strong { color: var(--text); }
.fun-fact em { font-style: normal; color: var(--text); font-weight: 600; }

.signature { font-style: italic; color: var(--text-faint); font-size: 16px; }

/* Subpages: contact and privacy */

.subpage { max-width: 720px; padding-top: 48px; padding-bottom: 96px; }
.subpage h1 { font-size: clamp(34px, 5vw, 52px); margin: 0 0 12px; }
.subpage .lead { margin: 0 0 32px; }

.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 8px; font-weight: 600; font-size: 15px; }
.contact-form .hint { font-weight: 400; color: var(--text-faint); }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.contact-form textarea { resize: vertical; min-height: 160px; }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgb(139 92 246 / 0.7);
  outline-offset: 1px;
}

.contact-form .button { justify-self: start; cursor: pointer; }
.form-note { margin: 0; font-size: 14px; color: var(--text-faint); }
.form-note a, .legal a { color: var(--text); }

/* Kept out of view instead of display:none so naive bots still fill it in. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 14px 18px; border-radius: 12px; font-weight: 600; }
.notice.success { background: rgb(52 211 153 / 0.15); border: 1px solid rgb(52 211 153 / 0.45); }
.notice.error { background: rgb(248 113 113 / 0.12); border: 1px solid rgb(248 113 113 / 0.45); }

.legal h2 { text-align: left; font-size: 24px; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--text-dim); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .updated { margin-top: 40px; font-size: 14px; color: var(--text-faint); }

/* Contact dialog */

.contact-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 36px 32px 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 40px 120px -20px rgb(20 10 60 / 0.8);
  overflow-y: auto;
}

.contact-dialog[open] { animation: dialog-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.contact-dialog::backdrop {
  background: rgb(8 6 24 / 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.contact-dialog[open]::backdrop { animation: fade-in 0.35s ease; }

@keyframes dialog-in {
  from { opacity: 0; translate: 0 18px; scale: 0.96; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover { color: var(--text); background: var(--surface-strong); }

.contact-title { margin: 0 0 8px; text-align: left; font-size: 30px; }
.contact-lead { margin: 0 0 20px; font-size: 17px; }
.contact-dialog .notice { margin: 0 0 18px; }

.contact-view.leaving { animation: view-out 0.3s ease forwards; }
.contact-success.entering { animation: view-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes view-out {
  to { opacity: 0; translate: 0 -12px; scale: 0.98; }
}

@keyframes view-in {
  from { opacity: 0; translate: 0 14px; scale: 0.97; }
}

.contact-success { text-align: center; padding: 28px 8px 12px; outline: none; }
.contact-success .success-title { margin: 18px 0 6px; font-size: 26px; font-weight: 800; color: var(--text); }
.contact-success p { color: var(--text-dim); margin: 0; }

.check { width: 76px; height: 76px; }
.check circle, .check path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.check circle { stroke: rgb(52 211 153 / 0.45); stroke-dasharray: 151; stroke-dashoffset: 151; }
.check path { stroke: var(--green); stroke-dasharray: 34; stroke-dashoffset: 34; }
.entering .check circle { animation: draw 0.6s ease forwards 0.1s; }
.entering .check path { animation: draw 0.35s ease forwards 0.55s; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.notice.shake { animation: shake 0.45s ease; }

@keyframes shake {
  20%, 60% { translate: -6px 0; }
  40%, 80% { translate: 6px 0; }
}

.notice:focus { outline: none; }

.submit { position: relative; }
.submit .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.submit.busy .spinner { display: inline-block; }
.submit:disabled { opacity: 0.85; cursor: progress; }

@keyframes spin {
  to { rotate: 360deg; }
}

/* reCAPTCHA's badge may be hidden when the form states that reCAPTCHA protects it, which the form note does. */
.grecaptcha-badge { visibility: hidden; }

/* 404 */

.lost { max-width: 640px; padding: 8vh 24px 96px; text-align: center; }
.lost-code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(110px, 22vw, 200px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 20px 60px rgb(139 92 246 / 0.45));
  will-change: translate;
}
.lost h1 { margin: 8px 0 12px; font-size: clamp(28px, 4.5vw, 40px); }
.lost .lead { margin: 0 auto 32px; }

.incident {
  margin: 0 auto 32px;
  max-width: 460px;
  padding: 18px 20px;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid rgb(248 113 113 / 0.35);
  background: radial-gradient(400px 160px at 0% 0%, rgb(248 113 113 / 0.14), transparent 70%), var(--surface);
  box-shadow: var(--shadow);
}
.incident-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.incident-head span { margin-left: auto; font-size: 13px; color: var(--text-faint); }
.incident dl { margin: 0; display: grid; gap: 8px; }
.incident dl div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; font-size: 14px; }
.incident dt { color: var(--text-faint); }
.incident dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.dot.down { background: #f87171; box-shadow: 0 0 10px #f87171; animation: pulse 1.4s ease-in-out infinite; }

.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 20px; }
.lost-en { font-size: 14px; color: var(--text-faint); }

@media (max-width: 600px) {
  .incident dl div { grid-template-columns: 1fr; gap: 2px; }
}

/* Final CTA and footer */

.final-cta { text-align: center; }
.final-cta img { border-radius: 22px; box-shadow: var(--shadow); }
.final-cta h2 { margin-top: 24px; }
.final-cta p { color: var(--text-dim); margin: 0 0 28px; }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 14px;
}

.footer p { margin: 0; }
.footer nav { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Responsive */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .hero-visual { min-height: 480px; }
  .grid, .plans { grid-template-columns: 1fr 1fr; }
  .privacy ul { grid-template-columns: 1fr; }
  .nav nav { display: none; }
  .nav .lang { margin-left: auto; }
}

@media (max-width: 600px) {
  section { padding: 64px 0; }
  .grid, .plans { grid-template-columns: 1fr; }
  .popover { right: 0; width: 100%; max-width: 300px; }
  .widget { width: 250px; }
  .mb-clock, [data-panel-button="gpu"], [data-panel-button="ram"] { display: none; }
  .demo-hint { display: none; }
  .privacy-inner { padding: 32px 24px; }
  .footer { flex-direction: column; }
}

/* Scroll reveal: only armed by app.js, so the page stays fully visible without JavaScript */

.reveal {
  opacity: 0;
  translate: 0 32px;
  scale: 0.98;
  transition: opacity 0.9s ease, translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), scale 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0s);
}

.reveal.in {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none; transition: none; }
  html { scroll-behavior: auto; }
}
