*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --surface-3: #1f1f1f;

  --border-soft: #1e1e1e;
  --border: #252525;
  --border-strong: #353535;

  --text: #ffffff;
  --text-dim: #a1a1a6;
  --text-mute: #8a8a8a;

  --accent: #00ff90;
  --accent-soft: rgba(0, 255, 144, 0.08);
  --accent-soft-2: rgba(0, 255, 144, 0.15);

  --mp-gg: #00ff90;
  --mp-ds: #64a8ff;
  --fn-static: #8a8a8a;
  --fn-following: #64a8ff;
  --fn-dynamic: #b892ff;
  --warn: #ffb43c;
  --danger: #ff5c5c;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 400ms;
  --easing: cubic-bezier(0.32, 0.72, 0.32, 1);

  --header-h: 64px;

  --control-h: 35px;
}
@media (pointer: coarse) {
  :root { --control-h: 44px; }
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1px);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

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

[id] { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }

.global-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.global-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 255, 144, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(100, 168, 255, 0.03) 0%, transparent 50%);
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  will-change: transform;
}

.bg-blob-1 {
  width: 1100px; height: 1100px;
  background: radial-gradient(circle, var(--mp-gg) 0%, transparent 65%);
  top: -400px; left: -300px;
  opacity: 0.14;
  animation: ambient1 16s ease-in-out infinite;
}
.bg-blob-2 {
  width: 1000px; height: 1000px;
  background: radial-gradient(circle, var(--mp-ds) 0%, transparent 65%);
  top: 60vh; right: -300px;
  opacity: 0.10;
  animation: ambient2 19s ease-in-out infinite;
}
.bg-blob-3 {
  width: 1100px; height: 1100px;
  background: radial-gradient(circle, var(--fn-dynamic) 0%, transparent 65%);
  top: 180vh; left: 10%;
  opacity: 0.07;
  animation: ambient3 22s ease-in-out infinite;
}

@keyframes ambient1 {
  0%, 100% { translate: 0 0; }
  33% { translate: 180px 120px; }
  66% { translate: 80px 220px; }
}
@keyframes ambient2 {
  0%, 100% { translate: 0 0; }
  33% { translate: -140px 140px; }
  66% { translate: -60px 240px; }
}
@keyframes ambient3 {
  0%, 100% { translate: 0 0; }
  33% { translate: 160px -120px; }
  66% { translate: 90px -200px; }
}

.page { position: relative; z-index: 1; }

.js .scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--easing), transform 0.9s var(--easing);
}
.js .scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.js .scroll-reveal-children > * { opacity: 0; }
@keyframes revealRise { from { transform: translateY(18px); opacity: 0; } }
.js .scroll-reveal-children > *.in-view {
  opacity: 1;
  animation: revealRise 0.7s var(--easing) var(--reveal-delay, 0s) backwards;
}
.js .plans.scroll-reveal-children[data-plans-pending] > * {
  opacity: 0;
  animation: none;
}

.js #how-it-works .step { opacity: 0; transform: translateX(-24px); }
#how-it-works .step:nth-child(1) { --step-delay: 0.08s; }
#how-it-works .step:nth-child(2) { --step-delay: 0.20s; }
#how-it-works .step:nth-child(3) { --step-delay: 0.32s; }
#how-it-works .step:nth-child(4) { --step-delay: 0.44s; }
.js #how-it-works.steps-revealed .step { opacity: 1; transform: translateX(0); }

@media print {
  .js .scroll-reveal,
  .js .scroll-reveal-children > *,
  .js #how-it-works .step {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

@media (hover: hover) {
  a:hover,
  button:hover,
  summary:hover,
  .btn:hover,
  .plan:hover,
  .step:hover,
  [role="button"]:hover {
    transition-duration: 300ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .scroll-reveal,
  .js .scroll-reveal-children > *,
  .js #how-it-works .step {
    opacity: 1 !important;
    transform: none !important;
  }
  .bg-blob { animation: none !important; transform: none !important; }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px) { .container { padding: 0 32px; } }
@media (min-width: 1024px) { .container { padding: 0 48px; } }

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #0a0a0a;
  border-bottom: 1px solid var(--border-soft);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.035em;
  font-family: 'Manrope Wordmark', 'Inter', system-ui, -apple-system, sans-serif;
  flex-shrink: 0;
}
.logo-mark { height: 20px; width: auto; display: block; flex-shrink: 0; }

.logo-text { display: none; }
@media (min-width: 640px) { .logo-text { display: inline; } }
.footer-brand .logo-text { display: inline; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--control-h);
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: box-shadow var(--duration-normal) var(--easing),
              background-color var(--duration-normal) var(--easing),
              border-color var(--duration-normal) var(--easing),
              color var(--duration-normal) var(--easing);
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
  line-height: 1;
}
.btn svg { flex-shrink: 0; }

.btn svg,
.feature-icon svg,
.security-icon svg,
.faq-icon svg {
  stroke-width: 1.8px;
}
.btn svg *,
.feature-icon svg *,
.security-icon svg *,
.faq-icon svg * {
  vector-effect: non-scaling-stroke;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-sm { padding: 0 14px; }

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

.btn-secondary {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  border-color: var(--border);
}

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

@media (hover: hover) {
  .btn-primary:hover { box-shadow: 0 0 16px rgba(0, 255, 144, 0.28), 0 8px 24px rgba(0, 255, 144, 0.18); }
  .btn-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }
  .btn-ghost:hover { color: var(--text); }
}
.btn-primary:active { box-shadow: none; }

.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 14px;
  border-radius: 10px;
}
@media (min-width: 640px) {
  .btn-lg { height: 50px; padding: 0 28px; font-size: 15px; border-radius: 12px; }
}

.nav-auth-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--duration-normal) var(--easing);
}
.nav-auth-link--strong {
  color: var(--text);
}
@media (hover: hover) {
  .nav-auth-link:hover { color: var(--text); }
  .nav-auth-link--strong:hover { color: var(--text-dim); }
}
.nav-auth-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-block { width: 100%; }

.hide-mobile { display: none; }
@media (min-width: 640px) { .hide-mobile { display: inline-flex; } }

.hero {
  position: relative;
  min-height: 100svh;
  padding: 48px 0 64px;
  display: flex;
  align-items: center;
}

.hero-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text);
  font-family: 'Manrope Wordmark', 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.035em;
  line-height: 1;
}
.hero-tagline {
  font-size: clamp(13px, 1.7vw, 15px);
  color: var(--text-mute);
  margin-bottom: clamp(14px, 1.8vw, 18px);
}

.hero h1 {
  font-size: clamp(30px, 8.2vw, 84px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: clamp(16px, 2.4vw, 22px);
}
.hero h1 .accent { color: var(--accent); }

.hero-subtitle {
  font-size: clamp(15px, 2.2vw, 20px);
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 auto clamp(28px, 4vw, 44px);
  max-width: 660px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
@media (min-width: 640px) { .hero-actions { gap: 14px; } }

.hero-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
}
.hero-note-accent { color: var(--text-dim); }

.js .hero-note-accent[data-trial-hero] {
  opacity: 0;
  transition: opacity 0.25s var(--easing);
}
.js .hero-note-accent[data-trial-hero].is-ready {
  opacity: 1;
}

.markets-strip {
  padding: 28px 0;
  background: #0f0f0f;
  position: relative;
}
.markets-strip-content { text-align: center; }
.markets-strip-label {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
  font-weight: 500;
}
.markets-strip-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.market-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-dim);
}
.market-logo-dot { width: 8px; height: 8px; border-radius: 50%; }
.market-logo-dot.gg { background: var(--mp-gg); box-shadow: 0 0 12px var(--mp-gg); }
.market-logo-dot.ds { background: var(--mp-ds); box-shadow: 0 0 12px var(--mp-ds); }

@media (min-width: 640px) {
  .markets-strip { padding: 40px 0; }
  .markets-strip-row { gap: 56px; }
}

section.section {
  padding: clamp(64px, 10vw, 140px) 0;
  position: relative;
}
.section-solid { background: var(--bg); position: relative; }
.section-elevated { background: #0f0f0f; }

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}
.section-eyebrow {
  font-size: clamp(11px, 1.4vw, 13px);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(26px, 5vw, 48px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.section-header p {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  line-height: 1.5;
}

:root:not(.js) .js-only { display: none; }
.js .no-js-only { display: none; }

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.feature {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transition:
    opacity 0.7s var(--easing) var(--reveal-delay, 0s),
    background-color var(--duration-normal) var(--easing),
    border-color var(--duration-normal) var(--easing),
    transform var(--duration-normal) var(--easing);
}
@media (min-width: 640px) { .feature { padding: 26px; } }

@media (hover: hover) {
  .feature:hover {
    border-color: var(--border);
    background: var(--surface-2);
    transform: translateY(-2px);
  }
}

@media (min-width: 640px) {
  .feature--full,
  .feature--wide { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .features > .feature:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .feature--full,
  .feature--wide {
    display: grid;
    align-items: center;
  }
  .feature--full {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 44px;
  }
  .feature--wide {
    grid-column: span 2;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
  }
  .feature--full .feature-demo,
  .feature--wide .feature-demo { margin-top: 0; }
}

.feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
  transition: background var(--duration-slow) var(--easing),
              box-shadow var(--duration-slow) var(--easing),
              transform var(--duration-slow) var(--easing);
}
.feature-icon svg { width: 21px; height: 21px; }
@media (hover: hover) {
  .feature:hover .feature-icon {
    background: rgba(0, 255, 144, 0.16);
    box-shadow: 0 0 24px rgba(0, 255, 144, 0.18);
    transform: scale(1.08);
  }
}

.feature h3 {
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature > p {
  color: var(--text-dim);
  line-height: 1.55;
  font-size: 14.5px;
}

.feature-head h3 {
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.feature-head p {
  color: var(--text-dim);
  line-height: 1.6;
  font-size: clamp(14.5px, 1.5vw, 15.5px);
  max-width: 46ch;
}

@media (max-width: 1023.98px) {
  .feature,
  .feature-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
  }
  .feature .feature-icon { margin-bottom: 0; }
  .feature > h3,
  .feature-head > h3 { margin-bottom: 0; }
  .feature > p,
  .feature-head > p,
  .feature > .feature-head,
  .feature > .feature-demo { grid-column: 1 / -1; }
  .feature > p,
  .feature-head > p { margin-top: 10px; }
}

.feature-demo { margin-top: 16px; }

.demo {
  background: none;
  padding: 0;
}

.demo-caption { font-size: 11.5px; color: var(--text-mute); margin-bottom: 12px; }
.demo-note {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-mute);
}

.demo-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 14px;
}

.demo-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  white-space: nowrap;
  transition: color var(--duration-normal) var(--easing);
}
@media (min-width: 640px) { .demo-tab { font-size: 13px; } }
@media (pointer: coarse) {
  .demo-tabs {
    row-gap: 12px;
  }
  .demo-tab::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    min-width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
  .logo {
    position: relative;
  }
  .logo::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    min-width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
  .footer-links {
    gap: 0;
  }
  .footer-links a {
    display: flex;
    align-items: center;
    min-height: 32px;
  }
  .footer-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
}
.demo-tab.is-active { color: var(--text); }
@media (hover: hover) { .demo-tab:not(.is-active):hover { color: var(--text-dim); } }
.demo-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.demo-chart { width: 100%; height: 100px; display: block; }
.chart-grid { stroke: var(--border-soft); stroke-width: 1; }
.chart-ref {
  fill: none;
  stroke: var(--text-mute);
  stroke-width: 1.5;
  stroke-dasharray: 7 4;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}
.chart-price {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: stroke var(--duration-normal) var(--easing);
}
.chart-floor {
  stroke: var(--text-mute);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.6;
  vector-effect: non-scaling-stroke;
}
.mode-static { stroke: var(--fn-static); background: var(--fn-static); }
.mode-following { stroke: var(--fn-following); background: var(--fn-following); }
.mode-dynamic { stroke: var(--fn-dynamic); background: var(--fn-dynamic); }

.demo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-mute);
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-item[hidden] { display: inline-flex; visibility: hidden; }
.legend-swatch { width: 14px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.legend-ref {
  background: repeating-linear-gradient(
    to right,
    var(--text-mute) 0 5px,
    transparent 5px 8px
  );
}
.legend-floor { background: none; height: 0; border-top: 2px dotted var(--text-mute); border-radius: 0; opacity: 0.7; }

.chain-path {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.chain-row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 14px;
}
.chain-row:last-child { padding-bottom: 0; }
.chain-path {
  max-width: 460px;
  --dot-size: 9px;
  --dot-top: 5px;
  --dot-gap: 4px;
}
.chain-row:not(:last-child)::before {
  content: '';
  position: absolute;
  left: calc((var(--dot-size) - 3px) / 2);
  top: calc(var(--dot-top) + var(--dot-size) + var(--dot-gap));
  bottom: calc(var(--dot-gap) - var(--dot-top));
  width: 3px;
  border-radius: 999px;
  background: var(--border-strong);
  opacity: 0.55;
}
.chain-dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: var(--dot-size); height: var(--dot-size);
  margin-top: var(--dot-top);
  border-radius: 50%;
  background: var(--border-strong);
  align-self: flex-start;
}
.chain-label {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chain-cur {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text-mute);
}
.chain-row--out .chain-dot { background: var(--accent); }
.chain-row--out .chain-label { color: var(--text); font-weight: 500; }
.chain-row--out .chain-cur { color: var(--accent); }

.how-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 1024px) {
  .how-layout { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.steps { display: flex; flex-direction: column; gap: 14px; }

.step {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition:
    opacity 0.7s var(--easing) var(--step-delay, 0s),
    transform 0.7s var(--easing) var(--step-delay, 0s),
    background-color var(--duration-normal) var(--easing),
    border-color var(--duration-normal) var(--easing);
}
@media (min-width: 640px) { .step { padding: 24px; } }
@media (hover: hover) {
  .step:hover { border-color: var(--border); background: var(--surface-2); }
}

.step-header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.step-number {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 12px;
}
.step h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.step p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  margin-left: 44px;
}

.terminal {
  display: none;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.7;
}
@media (min-width: 1024px) {
  .terminal { display: block; position: sticky; top: calc(var(--header-h) + 32px); }
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3a; }
.terminal-title { font-size: 11px; color: var(--text-mute); letter-spacing: 0.02em; }

.terminal-body {
  padding: 14px;
  height: 360px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
@media (min-width: 640px) { .terminal-body { padding: 20px; height: 500px; } }

.terminal-line {
  display: flex;
  gap: 12px;
  padding: 4px 0;
}
.terminal-line > * { min-width: 0; }
.terminal-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terminal-line-dynamic { opacity: 0; }

.terminal-time { color: var(--text-mute); flex-shrink: 0; }
.terminal-tag { font-weight: 500; flex-shrink: 0; }
.terminal-tag.sync { color: var(--mp-ds); }
.terminal-tag.chain { color: var(--fn-dynamic); }
.terminal-tag.recalc { color: var(--fn-dynamic); }
.terminal-tag.push { color: var(--accent); }
.terminal-tag.approve { color: var(--warn); }
.terminal-tag.delivery { color: var(--warn); }
.terminal-text { color: var(--text-dim); }
.terminal-num { color: var(--text); font-weight: 500; }
.terminal-mute { color: var(--text-mute); }

.terminal-body::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 60px;
  background: linear-gradient(180deg, #0d0d0d, transparent);
  pointer-events: none;
  z-index: 2;
}

.security-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 12px;
}
@media (min-width: 1024px) {
  .security-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 0; }
}

.security-item {
  transition: opacity 0.7s var(--easing) var(--reveal-delay, 0s);
}
.security-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.security-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.security-icon svg { width: 19px; height: 19px; }
.security-item h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.security-item p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.pricing-note {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
}

.plans {
  display: flex;
  gap: 12px;
  min-height: 402px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -20px;
  padding: 4px 20px 12px;
  scroll-padding-left: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.plans::-webkit-scrollbar { display: none; }
.plan {
  flex: 0 0 82%;
  max-width: 320px;
  scroll-snap-align: start;
}
@media (min-width: 640px) { .plan { flex-basis: 54%; } }
@media (min-width: 1100px) {
  .plans {
    display: grid;
    min-height: 386px;
    grid-template-columns: repeat(3, 320px);
    justify-content: center;
    gap: 20px;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .plan { flex: none; }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 30px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  color: inherit;
  transition: border-color var(--duration-normal) var(--easing),
              background-color var(--duration-normal) var(--easing);
}
.plan:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) {
  .plan:hover { border-color: var(--border); background: var(--surface-2); }
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.plan-badge {
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-soft-2);
  color: var(--accent);
  white-space: nowrap;
}
.plan-desc {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-mute);
  line-height: 1.5;
  min-height: 20px;
}

.plan-price {
  margin: 20px 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
}
.plan-price-value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan-price-period { font-size: 14px; color: var(--text-mute); }
.plan-price-yearly {
  width: 100%;
  font-size: 12.5px;
  color: var(--text-mute);
}
.plan-price-fallback {
  font-size: 15px;
  color: var(--text-dim);
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
}
.plan-features li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.45;
}
.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px; height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff90' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.plan-features li.is-off { color: var(--text-mute); }
.plan-features li.is-off::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid var(--border-soft);
  transition: opacity 0.7s var(--easing) var(--reveal-delay, 0s);
}
.faq-item summary {
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 500;
  color: var(--text);
  transition: color var(--duration-fast) var(--easing);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.faq-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: transform var(--duration-normal) var(--easing),
              color var(--duration-normal) var(--easing);
}
.faq-icon svg { width: 16px; height: 16px; display: block; }

.faq-item[open]:not(.is-closing) .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-item[open]:not(.is-closing) summary { color: var(--accent); }

.faq-answer {
  padding: 0 0 26px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 640px;
  font-size: 14.5px;
  overflow: hidden;
}
.faq-answer a {
  color: var(--text);
  font-weight: 500;
  transition: color var(--duration-normal) var(--easing);
}
@media (hover: hover) {
  .faq-answer a:hover { color: var(--text-dim); }
}

.cta {
  text-align: center;
  padding: clamp(72px, 11vw, 160px) 20px;
  position: relative;
}
.cta-content { max-width: 680px; margin: 0 auto; }
.cta h2 {
  font-size: clamp(21px, 6.2vw, 52px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  white-space: nowrap;
}
.cta p {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-dim);
  margin-bottom: 20px;
}

footer {
  padding: 40px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  position: relative;
}
@media (min-width: 640px) { footer { padding: 64px 0 calc(40px + env(safe-area-inset-bottom, 0px)); } }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
@media (min-width: 640px) and (max-width: 1023px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
  .footer-brand { grid-column: 1 / -1; max-width: 520px; }
}
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand { max-width: 320px; }
.footer-brand-tagline {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.5;
}
.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  color: var(--text-dim);
  font-size: 14px;
  transition: color var(--duration-fast) var(--easing);
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 8px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}
.footer-bottom.is-inline > div + div::before {
  content: '·';
  margin-right: 8px;
}
@media (min-width: 640px) {
  .footer-bottom { justify-content: space-between; text-align: left; }
  .footer-bottom.is-inline > div + div::before { content: none; }
}

body.legal-body { background: #0f0f0f; }
body.legal-body header { background: #0f0f0f; }

body.legal-body footer { padding: 0 0 calc(40px + env(safe-area-inset-bottom, 0px)); background: #0f0f0f; }

.hero-legal {
  position: relative;
  padding: 40px 0 28px;
}
@media (min-width: 640px) { .hero-legal { padding: 64px 0 36px; } }
@media (min-width: 1024px) { .hero-legal { padding: 84px 0 44px; } }

.legal-eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.hero-legal h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.08;
  margin-bottom: 16px;
  max-width: 16ch;
  overflow-wrap: anywhere;
}

.hero-legal .hero-subtitle {
  margin: 0;
  max-width: 620px;
  font-size: clamp(15px, 1.9vw, 18px);
  line-height: 1.55;
  color: var(--text-dim);
}

.legal-translation-note {
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--warn);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 640px;
}
.legal-translation-note a { color: var(--text); transition: color var(--duration-fast) var(--easing); }
@media (hover: hover) {
  .legal-translation-note a:hover { color: var(--text-dim); }
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.legal-meta span {
  font-size: 13px;
  color: var(--text-mute);
}
.legal-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--text-mute);
}

.legal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 88px;
}
@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 248px 1fr;
    gap: 64px;
    padding-bottom: 140px;
  }
}

.legal-toc {
  min-width: 0;
  align-self: start;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.legal-toc-title {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.legal-toc-list {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
}

.legal-toc-list li { counter-increment: toc; }
.legal-toc-list li + li { border-top: 1px solid var(--border-soft); }
.legal-toc-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  transition: color var(--duration-fast) var(--easing),
              background-color var(--duration-fast) var(--easing);
}
.legal-toc-list a::before {
  content: counter(toc) ".";
  flex-shrink: 0;
  min-width: 18px;
  color: var(--text-mute);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.legal-toc-list a::after {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
@media (hover: hover) {
  .legal-toc-list a:hover { background: var(--surface-2); }
}

@media (min-width: 1024px) {
  .legal-toc {
    position: sticky;
    top: calc(var(--header-h) + 28px);
    border: 0;
    border-radius: 0;
    background: none;
    overflow: visible;
  }
  .legal-toc-title {
    padding: 0 0 10px;
    border-bottom: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-mute);
  }
  .legal-toc-list li + li { border-top: 0; }
  .legal-toc-list a {
    min-height: 0;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-dim);
  }
  .legal-toc-list a::before { min-width: 18px; font-size: 12px; }
  .legal-toc-list a::after { content: none; }
  .legal-toc-list a:hover { background: none; color: var(--text); }
  .legal-toc-list a.is-active { color: var(--text); background: none; }
  .legal-toc-list a.is-active::before { color: var(--text-dim); }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .legal-toc-list a { padding: 5px 0; }
}

.legal-prose {
  max-width: 720px;
  min-width: 0;
  counter-reset: section;
}

.legal-prose > section.legal-section {
  counter-increment: section;
  padding-top: 44px;
  margin-top: 44px;
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal-prose > section.legal-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.legal-prose h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.legal-prose h2::before {
  content: counter(section) ".";
  flex-shrink: 0;
  min-width: 1.1em;
  color: var(--text);
  font-size: 0.85em;
  font-weight: 600;
}

.legal-prose h3[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

.legal-prose h3 {
  font-size: clamp(15px, 1.9vw, 17px);
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
  letter-spacing: -0.008em;
}

.legal-prose p {
  color: var(--text-dim);
  font-size: clamp(15px, 1.8vw, 16.5px);
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-prose ul,
.legal-prose ol:not(.legal-toc-list) {
  color: var(--text-dim);
  font-size: clamp(15px, 1.8vw, 16.5px);
  line-height: 1.7;
  margin: 0 0 18px;
  padding-left: 22px;
}
.legal-prose li { margin-bottom: 10px; }
.legal-prose li::marker { color: var(--border-strong); }
.legal-prose ol:not(.legal-toc-list) li::marker {
  color: var(--text-mute);
  font-size: 0.9em;
}

.legal-prose strong { color: inherit; font-weight: inherit; }
.legal-prose em { color: inherit; font-style: inherit; }

.legal-prose a {
  color: var(--text);
  transition: color var(--duration-fast) var(--easing);
}
@media (hover: hover) {
  .legal-prose a:hover { color: var(--text-dim); }
}

.legal-prose code {
  font: inherit;
  color: inherit;
  word-break: break-word;
}

.legal-callout {
  margin: 24px 0;
  font-size: clamp(15px, 1.8vw, 16.5px);
  line-height: 1.75;
  color: var(--text-dim);
}

.legal-callout strong { color: inherit; font-weight: inherit; }
.legal-callout p { color: inherit; font-size: inherit; margin-bottom: 16px; }
.legal-callout p:last-child { margin-bottom: 0; }
.legal-callout ul { color: inherit; font-size: inherit; margin-bottom: 16px; }
.legal-callout ul:last-child { margin-bottom: 0; }
.legal-callout a { color: var(--text); }

.legal-retention-term {
  margin: 30px 0 10px;
  font-size: clamp(15px, 1.9vw, 17px);
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--text);
}
.legal-retention-term:first-of-type { margin-top: 4px; }
.legal-prose .legal-li-label { color: var(--text-mute); }

.legal-note {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 13.5px;
  color: var(--text-mute);
  line-height: 1.65;
}
