/* ---------------------------------------------------
   Arrow Docs landing page (overrides/home.html)
   Loaded only on the homepage, so selectors on Material chrome are safe here.
------------------------------------------------------ */

:root {
  --ah-brand: #ea6e25;
  --ah-brand-3: #f0b232;
  --ah-green: #06c270;
  --ah-green-2: #76ffc6;
  --ah-red: #ee4d37;
  --ah-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ah-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --ah-body: "DM Sans", system-ui, sans-serif;
  --ah-mono: "JetBrains Mono", ui-monospace, monospace;
  --ah-chrome: 160px; /* how far the hero backdrop reaches up behind the header */
}

/* Theme tokens follow Material's palette toggle (data-md-color-scheme on <body>).
   Terminal-style surfaces (console, snippets, live feed) always use the dark set. */
:root,
[data-md-color-scheme="slate"],
.ah-console,
.ah .ah-snippet,
.ah-feed {
  --ah-ink: 255 255 255;
  --ah-bg: #0a0a0b;
  --ah-bg-2: #111113;
  --ah-surface: #141416;
  --ah-surface-2: #1a1a1d;
  --ah-stroke: rgb(255 255 255 / 0.08);
  --ah-stroke-2: rgb(255 255 255 / 0.14);
  --ah-text: #f4f4f5;
  --ah-muted: rgb(244 244 245 / 0.62);
  --ah-dim: rgb(244 244 245 / 0.4);
  --ah-heading: #ffffff;
  --ah-brand-2: #ff8744;
  --ah-glass: rgb(10 10 11 / 0.7);
  --ah-shadow: rgb(0 0 0 / 0.85);
  --ah-install-bg: rgb(20 20 22 / 0.75);
  --ah-logo-filter: none;
  --ah-slow: #ff9a8a;
}

[data-md-color-scheme="default"] {
  --ah-ink: 10 10 11;
  --ah-bg: #faf9f7;
  --ah-bg-2: #f3f1ed;
  --ah-surface: #ffffff;
  --ah-surface-2: #ffffff;
  --ah-stroke: rgb(10 10 11 / 0.09);
  --ah-stroke-2: rgb(10 10 11 / 0.16);
  --ah-text: #18181b;
  --ah-muted: rgb(24 24 27 / 0.7);
  --ah-dim: rgb(24 24 27 / 0.52);
  --ah-heading: #0b0b0c;
  --ah-brand-2: #d9591a;
  --ah-glass: rgb(250 249 247 / 0.78);
  --ah-shadow: rgb(60 35 15 / 0.22);
  --ah-install-bg: rgb(255 255 255 / 0.85);
  --ah-logo-filter: invert(1);
  --ah-slow: #d43d27;
}

/* Material's own chrome colours, mapped onto the same tokens */
[data-md-color-scheme] {
  --md-footer-bg-color: var(--ah-bg);
  --md-footer-bg-color--dark: var(--ah-bg);
  --md-footer-fg-color: var(--ah-text);
  --md-footer-fg-color--light: var(--ah-muted);
  --md-footer-fg-color--lighter: var(--ah-dim);
}

/* ============ Material chrome on the landing page ============ */
/* At the top the header is transparent so the hero glow and grid run up behind it;
   once the page scrolls (html.ah-scrolled, set by home.js) it turns into frosted glass. */
body {
  background: var(--ah-bg);
  transition: background-color 0.3s ease;
}

.md-header {
  background: transparent;
  color: var(--ah-text);
  box-shadow: none;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, -webkit-backdrop-filter 0.35s ease, backdrop-filter 0.35s ease;
}

.md-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 135, 68, 0.35) 30%, rgb(var(--ah-ink) / 0.1) 70%, transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.md-header--shadow {
  box-shadow: none;
}

.ah-scrolled .md-header {
  background: var(--ah-glass);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 10px 30px -18px var(--ah-shadow);
}

.ah-scrolled .md-header::after {
  opacity: 1;
}

.md-tabs {
  background: transparent;
  color: var(--ah-text);
}

.md-tabs__link {
  opacity: 0.6;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.md-tabs__item--active .md-tabs__link,
.md-tabs__link:hover {
  color: var(--ah-brand-2);
  opacity: 1;
}

.md-header .md-search__form {
  background: rgb(var(--ah-ink) / 0.05);
  box-shadow: inset 0 0 0 1px var(--ah-stroke);
}

.md-header .md-search__form:hover {
  background: rgb(var(--ah-ink) / 0.09);
}

.md-header .md-search__input,
.md-header .md-search__icon,
.md-header .md-header__button {
  color: var(--ah-text);
}

.md-header .md-search__input::placeholder {
  color: var(--ah-dim);
}

.md-main,
.md-container {
  background: transparent;
}

.md-main__inner.md-grid {
  max-width: none;
  margin: 0;
}

.md-footer {
  border-top: 1px solid var(--ah-stroke);
}

.md-header__button.md-logo img {
  filter: var(--ah-logo-filter);
}

/* ============ Base ============ */
.ah {
  position: relative;
  width: 100%;
  font-family: var(--ah-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ah-text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overflow-x: clip;
  overflow-y: visible;
}

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

.ah a {
  color: inherit;
}

.ah code {
  font-family: var(--ah-mono);
  font-size: 0.86em;
  padding: 0.1em 0.4em;
  border-radius: 5px;
  background: rgb(var(--ah-ink) / 0.06);
  color: var(--ah-brand-2);
}

.ah pre,
.ah code {
  font-variant-ligatures: none;
}

.ah pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.ah-wrap {
  width: min(1200px, 100% - 32px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Faint grid over the whole page */
.ah::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--ah-chrome)) 0 0;
  background-image:
    linear-gradient(rgb(var(--ah-ink) / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--ah-ink) / 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 45%, #000 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 45%, #000 100%);
  pointer-events: none;
  z-index: 0;
}

/* ============ Hero ============ */
.ah-hero {
  position: relative;
  padding: clamp(56px, 9vw, 112px) 0 clamp(72px, 9vw, 120px);
  isolation: isolate;
}

.ah-hero::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--ah-chrome)) -10% auto;
  height: calc(90% + var(--ah-chrome));
  background:
    radial-gradient(ellipse 50% 60% at 30% 12%, rgba(234, 110, 37, 0.2), transparent 62%),
    radial-gradient(ellipse 35% 45% at 85% 25%, rgba(240, 178, 50, 0.08), transparent 60%),
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(234, 110, 37, 0.08), transparent 70%);
  z-index: -2;
  pointer-events: none;
  animation: ah-breathe 9s ease-in-out infinite;
}

@keyframes ah-breathe {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.ah-hero__chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
}

.ah-hero__mark {
  position: absolute;
  right: -4%;
  top: 6%;
  width: min(46vw, 620px);
  z-index: -1;
  fill: none;
  stroke: rgba(234, 110, 37, 0.22);
  stroke-width: 0.6;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ah-draw 2.6s var(--ah-ease) 0.3s forwards, ah-float 12s ease-in-out 3s infinite;
}

.ah-hero__mark path:first-child {
  fill: rgba(234, 110, 37, 0);
  animation: ah-fill 1.6s ease 2.2s forwards;
}

@keyframes ah-draw { to { stroke-dashoffset: 0; } }
@keyframes ah-fill { to { fill: rgba(234, 110, 37, 0.035); } }
@keyframes ah-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 8px); }
}

.ah-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}

.ah-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--ah-stroke-2);
  border-radius: 999px;
  background: rgb(var(--ah-ink) / 0.03);
  font-size: 13px;
  font-weight: 600;
  color: var(--ah-muted);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ah-eyebrow:hover {
  border-color: rgba(234, 110, 37, 0.55);
  color: var(--ah-text);
}

.ah-eyebrow__arrow {
  color: var(--ah-brand-2);
  transition: transform 0.2s ease;
}

.ah-eyebrow:hover .ah-eyebrow__arrow {
  transform: translate(2px, -2px);
}

.ah-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ah-green);
  box-shadow: 0 0 0 0 rgba(6, 194, 112, 0.6);
  animation: ah-ping 2s ease-out infinite;
}

@keyframes ah-ping {
  0% { box-shadow: 0 0 0 0 rgba(6, 194, 112, 0.6); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(6, 194, 112, 0); }
}

.ah .ah-title {
  margin: 22px 0 20px;
  font-family: var(--ah-display);
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ah-heading);
}

.ah-title__line {
  display: block;
}

.ah-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em) rotate(2deg);
  filter: blur(6px);
  animation: ah-word 0.9s var(--ah-ease) forwards;
  animation-delay: calc(0.12s + var(--i, 0) * 0.07s);
}

@keyframes ah-word {
  to { opacity: 1; transform: none; filter: blur(0); }
}

.ah-grad {
  background: linear-gradient(90deg, var(--ah-brand-2), var(--ah-brand) 40%, var(--ah-brand-3) 75%, var(--ah-brand-2));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ah-word 0.9s var(--ah-ease) forwards, ah-slide 6s ease-in-out 1s infinite;
  animation-delay: calc(0.12s + var(--i, 0) * 0.07s), 1s;
}

@keyframes ah-slide {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.ah-rise {
  opacity: 0;
  transform: translateY(16px);
  animation: ah-rise 0.9s var(--ah-ease) forwards;
  animation-delay: calc(0.6s + var(--i, 0) * 0.1s);
}

@keyframes ah-rise {
  to { opacity: 1; transform: none; }
}

.ah-lead {
  max-width: 34rem;
  margin: 0 0 30px;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  color: var(--ah-muted);
}

.ah-lead strong {
  color: var(--ah-text);
  font-weight: 600;
}

/* ============ Buttons ============ */
.ah-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ah-ctas--center {
  justify-content: center;
}

.ah .ah-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--ah-stroke-2);
  background: rgb(var(--ah-ink) / 0.04);
  color: var(--ah-text);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s var(--ah-ease), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ah .ah-btn:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--ah-ink) / 0.3);
  background: rgb(var(--ah-ink) / 0.07);
}

.ah .ah-btn--brand {
  position: relative;
  overflow: hidden;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ah-brand-2), var(--ah-brand));
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(234, 110, 37, 0.6), inset 0 1px 0 rgb(var(--ah-ink) / 0.3);
}

.ah .ah-btn--brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgb(var(--ah-ink) / 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ah-ease);
}

.ah .ah-btn--brand:hover {
  background: linear-gradient(135deg, var(--ah-brand-2), var(--ah-brand));
  box-shadow: 0 14px 38px -8px rgba(234, 110, 37, 0.75), inset 0 1px 0 rgb(var(--ah-ink) / 0.3);
}

.ah .ah-btn--brand:hover::after {
  transform: translateX(120%);
}

.ah .ah-btn--quiet {
  border-color: transparent;
  background: none;
  color: var(--ah-muted);
}

.ah .ah-btn--quiet:hover {
  background: none;
  border-color: transparent;
  color: var(--ah-text);
}

.ah-btn img {
  display: block;
}

.ah :focus-visible {
  outline: 2px solid var(--ah-brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ Install chip ============ */
.ah-install {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  max-width: 100%;
  width: fit-content;
  padding: 6px 6px 6px 6px;
  border: 1px solid var(--ah-stroke);
  border-radius: 12px;
  background: var(--ah-install-bg);
}

.ah-install__tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: rgb(var(--ah-ink) / 0.04);
}

.ah-install__tabs button,
.ah-install__copy {
  font: 600 12px/1 var(--ah-mono);
  color: var(--ah-dim);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 9px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.ah-install__tabs button[aria-selected="true"] {
  background: rgba(234, 110, 37, 0.18);
  color: var(--ah-brand-2);
}

.ah .ah-install__cmd {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  background: none;
  font-size: 13px;
  color: var(--ah-text);
}

.ah-install__prompt {
  color: var(--ah-green);
}

.ah-install__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid var(--ah-stroke);
}

.ah-install__copy:hover {
  color: var(--ah-text);
  background: rgb(var(--ah-ink) / 0.05);
}

.ah-install__copy svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ============ Console ============ */
.ah-console {
  --i: 3;
  position: relative;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 26, 29, 0.92), rgba(14, 14, 16, 0.96));
  border: 1px solid var(--ah-stroke-2);
  box-shadow:
    0 40px 90px -30px var(--ah-shadow),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 80px -20px rgba(234, 110, 37, 0.25);
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ah-console::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 135, 68, 0.8), transparent);
  animation: ah-scan 5s ease-in-out infinite;
}

@keyframes ah-scan {
  0%, 100% { transform: translateX(-60%); opacity: 0; }
  50% { transform: translateX(60%); opacity: 1; }
}

.ah-console__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ah-stroke);
}

.ah-lights {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ah-lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3a3e;
}

.ah-lights i:nth-child(1) { background: #ff5f57; }
.ah-lights i:nth-child(2) { background: #febc2e; }
.ah-lights i:nth-child(3) { background: #28c840; }

.ah-console__tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.ah-console__tabs button {
  flex-shrink: 0;
  font: 600 12px/1 var(--ah-mono);
  color: var(--ah-dim);
  background: none;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 7px 10px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ah-console__tabs button:hover {
  color: var(--ah-text);
}

.ah-console__tabs button[aria-selected="true"] {
  color: var(--ah-text);
  border-color: var(--ah-stroke-2);
  background: rgb(var(--ah-ink) / 0.05);
}

.ah .ah-console__code {
  margin: 0;
  padding: 18px 20px 14px;
  height: calc(15 * 1.75em + 32px);
  overflow: hidden;
  background: none;
  font: 400 12.5px/1.75 var(--ah-mono);
  color: #d4d4d8;
  white-space: pre;
  tab-size: 4;
}

.ah-console__code .ah-ln {
  display: block;
  animation: ah-ln 0.25s ease both;
}

@keyframes ah-ln {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}

.ah-caret {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--ah-brand-2);
  animation: ah-blink 1s steps(1) infinite;
}

@keyframes ah-blink {
  50% { opacity: 0; }
}

.ah-console__resp {
  position: relative;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--ah-stroke);
  background: rgba(6, 194, 112, 0.035);
  opacity: 0.25;
  filter: saturate(0);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.ah-console__resp.is-on {
  opacity: 1;
  filter: none;
}

.ah .ah-console__json {
  margin: 10px 0 0;
  background: none;
  font: 400 12.5px/1.65 var(--ah-mono);
  color: #d4d4d8;
  white-space: pre;
  overflow-x: auto;
}

.ah-console__badge {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 3px 8px;
  border-radius: 6px;
  font: 700 11px/1.3 var(--ah-mono);
  color: var(--ah-green-2);
  background: rgba(6, 194, 112, 0.14);
  border: 1px solid rgba(6, 194, 112, 0.35);
}

.ah-route {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 70px;
  font: 500 11px/1 var(--ah-mono);
  color: var(--ah-dim);
  white-space: nowrap;
}

.ah-route__track {
  position: relative;
  flex: 1;
  min-width: 18px;
  height: 1px;
  background: var(--ah-stroke-2);
}

.ah-route__track b {
  position: absolute;
  left: 0;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ah-brand-2);
  box-shadow: 0 0 10px var(--ah-brand-2);
  opacity: 0;
}

.ah-console__resp.is-on .ah-route__track b {
  animation: ah-packet 0.5s var(--ah-ease) forwards;
}

.ah-console__resp.is-on .ah-route__track:nth-of-type(2) b {
  animation-delay: 0.35s;
}

@keyframes ah-packet {
  0% { left: 0; opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% - 5px); opacity: 0; }
}

/* Syntax tokens (console, snippets) */
.t-k { color: #ffb38a; }
.t-s { color: #9fe6a0; }
.t-f { color: #7cc7ff; }
.t-c { color: #6b6b73; }
.t-n { color: #f0b232; }
.t-m { color: var(--ah-brand-2); font-weight: 700; }
.t-p { color: #a1a1aa; }

.ah-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 24px;
  height: 38px;
  margin-left: -12px;
  border: 1.5px solid var(--ah-stroke-2);
  border-radius: 14px;
  opacity: 0;
  animation: ah-rise 1s ease 1.8s forwards;
}

.ah-scroll span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ah-brand-2);
  animation: ah-wheel 1.8s ease-in-out infinite;
}

@keyframes ah-wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ Sections ============ */
.ah-section {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0;
}

.ah-section + .ah-section {
  border-top: 1px solid rgb(var(--ah-ink) / 0.04);
}

.ah-head {
  max-width: 680px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

.ah-head--left {
  margin: 0;
  text-align: left;
}

.ah-kicker {
  margin: 0 0 14px;
  font: 700 12px/1 var(--ah-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ah-brand-2);
}

.ah .ah-head h2,
.ah .ah-cta h2 {
  margin: 0 0 16px;
  font-family: var(--ah-display);
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ah-heading);
}

.ah-head > p:not(.ah-kicker) {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ah-muted);
}

.ah-head strong {
  color: var(--ah-text);
}

.ah-js .ah-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ah-ease), transform 0.9s var(--ah-ease);
  transition-delay: var(--d, 0ms);
}

.ah-js .ah-reveal.is-in {
  opacity: 1;
  transform: none;
}

.ah-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-weight: 700;
  color: var(--ah-brand-2) !important;
  text-decoration: none;
}

.ah-more span {
  transition: transform 0.2s ease;
}

.ah-more:hover span {
  transform: translateX(4px);
}

.ah .ah-link-btn {
  font: 600 13px/1 var(--ah-body);
  color: var(--ah-muted);
  background: none;
  border: 1px solid var(--ah-stroke-2);
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ah .ah-link-btn:hover {
  color: var(--ah-text);
  border-color: rgba(234, 110, 37, 0.6);
}

/* ============ Latency race ============ */
.ah-race {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--ah-stroke);
  border-radius: 20px;
  background: linear-gradient(180deg, rgb(var(--ah-ink) / 0.025), rgb(var(--ah-ink) / 0.01));
}

.ah-race__scale {
  display: flex;
  justify-content: space-between;
  margin: 0 96px 10px 168px;
  font: 500 11px/1 var(--ah-mono);
  color: var(--ah-dim);
}

.ah-lane {
  display: grid;
  grid-template-columns: 152px 1fr 80px;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}

.ah-lane + .ah-lane {
  border-top: 1px dashed rgb(var(--ah-ink) / 0.06);
}

.ah-lane__label strong {
  display: block;
  font-family: var(--ah-display);
  font-size: 15px;
  color: var(--ah-heading);
}

.ah-lane__label span {
  font-size: 12.5px;
  color: var(--ah-dim);
}

.ah-lane__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgb(var(--ah-ink) / 0.05);
}

.ah-lane__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(234, 110, 37, 0.35), var(--ah-brand-2));
}

.ah-lane__head {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 135, 68, 0.35), 0 0 20px var(--ah-brand-2);
  opacity: 0;
}

.ah-lane--other .ah-lane__fill {
  background: linear-gradient(90deg, rgba(238, 77, 55, 0.15), rgba(238, 77, 55, 0.6));
}

.ah-lane--other .ah-lane__head {
  box-shadow: 0 0 0 4px rgba(238, 77, 55, 0.25), 0 0 16px rgba(238, 77, 55, 0.6);
}

.ah-lane__time {
  text-align: right;
  font: 700 18px/1 var(--ah-mono);
  color: var(--ah-brand-2);
  font-variant-numeric: tabular-nums;
}

.ah-lane--other .ah-lane__time {
  color: var(--ah-slow);
}

.ah-lane.is-done .ah-lane__time {
  animation: ah-pop 0.4s var(--ah-ease);
}

@keyframes ah-pop {
  50% { transform: scale(1.15); }
}

.ah-race__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ah-stroke);
  font-size: 13px;
  color: var(--ah-dim);
}

.ah-race__foot a {
  color: var(--ah-muted);
}

/* ============ Lifecycle flow ============ */
.ah-flow {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ah-flow__steps {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ah-flow__steps::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 30px;
  bottom: 30px;
  width: 1px;
  background: linear-gradient(180deg, var(--ah-stroke-2), var(--ah-stroke-2));
}

.ah .ah-flow__steps li {
  margin: 0;
  padding: 0;
}

.ah-flow__steps button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  margin: 0 0 4px;
  text-align: left;
  font: inherit;
  color: var(--ah-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.ah-flow__steps button:hover {
  color: var(--ah-text);
  background: rgb(var(--ah-ink) / 0.025);
}

.ah-flow__steps button[aria-selected="true"] {
  color: var(--ah-text);
  background: rgba(234, 110, 37, 0.07);
  border-color: rgba(234, 110, 37, 0.3);
}

.ah-flow__n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font: 700 12px/1 var(--ah-mono);
  color: var(--ah-dim);
  background: var(--ah-bg);
  border: 1px solid var(--ah-stroke-2);
  transition: all 0.3s ease;
}

.ah-flow__steps button[aria-selected="true"] .ah-flow__n,
.ah-flow__steps button.is-past .ah-flow__n {
  color: #fff;
  background: var(--ah-brand);
  border-color: var(--ah-brand);
  box-shadow: 0 0 18px rgba(234, 110, 37, 0.55);
}

.ah-flow__steps button.is-past .ah-flow__n {
  background: rgba(234, 110, 37, 0.25);
  box-shadow: none;
}

.ah-flow__steps strong {
  display: block;
  font-family: var(--ah-display);
  font-size: 15px;
}

.ah-flow__steps small {
  display: block;
  font-size: 12.5px;
  color: var(--ah-dim);
}

.ah-flow__panels {
  position: relative;
  min-height: 380px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--ah-stroke);
  border-radius: 18px;
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(234, 110, 37, 0.08), transparent 70%),
    var(--ah-surface);
  overflow: hidden;
}

.ah-flow__progress {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgb(var(--ah-ink) / 0.04);
}

.ah-flow__progress b {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--ah-brand), var(--ah-brand-3));
}

.ah-panel {
  animation: ah-panel 0.5s var(--ah-ease);
}

.ah-panel[hidden] {
  display: none;
}

@keyframes ah-panel {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.ah .ah-panel h3,
.ah .ah-card h3 {
  margin: 0 0 10px;
  font-family: var(--ah-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ah-heading);
}

.ah-panel > p,
.ah-card > p:not(.ah-kicker) {
  margin: 0 0 18px;
  color: var(--ah-muted);
  max-width: 62ch;
}

.ah .ah-snippet {
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--ah-stroke);
  background: #0c0c0e;
  font: 400 13px/1.8 var(--ah-mono);
  color: #d4d4d8;
  white-space: pre;
  overflow-x: auto;
}

.ah .ah-snippet--sm {
  font-size: 12.5px;
}

.ah-panel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.ah .ah-panel__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ah-text);
  text-decoration: none;
  border: 1px solid var(--ah-stroke-2);
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ah .ah-panel__links a::after {
  content: "→";
  color: var(--ah-brand-2);
  transition: transform 0.2s ease;
}

.ah .ah-panel__links a:hover {
  border-color: rgba(234, 110, 37, 0.6);
  background: rgba(234, 110, 37, 0.08);
}

.ah .ah-panel__links a:hover::after {
  transform: translateX(3px);
}

/* ============ HFT feed ============ */
.ah-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.ah-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.ah .ah-specs li {
  flex: 1 1 120px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--ah-stroke);
  border-radius: 12px;
  background: rgb(var(--ah-ink) / 0.02);
}

.ah-specs strong {
  display: block;
  font: 800 1.4rem/1.1 var(--ah-display);
  color: var(--ah-heading);
}

.ah-specs span {
  font-size: 12.5px;
  color: var(--ah-dim);
}

.ah-feed {
  border: 1px solid var(--ah-stroke-2);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--ah-surface-2), var(--ah-surface));
  box-shadow: 0 30px 80px -30px var(--ah-shadow);
  overflow: hidden;
}

.ah-feed__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ah-stroke);
  font: 500 12px/1 var(--ah-mono);
  color: var(--ah-dim);
}

.ah-feed__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ah-text);
}

.ah-feed__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ah-green);
  animation: ah-ping 2s ease-out infinite;
}

.ah-feed__mode b {
  color: var(--ah-brand-2);
}

.ah-feed__control {
  display: grid;
  grid-template-columns: auto 1fr 76px;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ah-stroke);
  font: 500 12px/1 var(--ah-mono);
  color: var(--ah-dim);
}

.ah-feed__control output {
  text-align: right;
  font-weight: 700;
  color: var(--ah-brand-2);
  font-variant-numeric: tabular-nums;
}

.ah-feed input[type="range"] {
  --p: 22%;
  width: 100%;
  height: 4px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ah-brand) var(--p), rgb(var(--ah-ink) / 0.1) var(--p));
  cursor: pointer;
}

.ah-feed input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 4px rgba(234, 110, 37, 0.35), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.2s ease;
}

.ah-feed input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 4px rgba(234, 110, 37, 0.35), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.ah-feed input[type="range"]:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 7px rgba(234, 110, 37, 0.35), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.ah-feed__rows {
  padding: 6px 8px;
  font: 500 13px/1 var(--ah-mono);
  font-variant-numeric: tabular-nums;
}

.ah-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.9fr 1.1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 8px;
  transition: background 0.6s ease;
}

.ah-row + .ah-row {
  border-top: 1px solid rgb(var(--ah-ink) / 0.04);
}

.ah-row__sym {
  color: var(--ah-text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-row__sym small {
  color: var(--ah-dim);
  font-weight: 500;
}

.ah-row__ltp,
.ah-row__chg,
.ah-row__vol {
  text-align: right;
}

.ah-row__ltp {
  color: #fff;
}

.ah-row__vol {
  color: var(--ah-dim);
}

.ah-row.is-up { background: rgba(6, 194, 112, 0.1); transition: none; }
.ah-row.is-down { background: rgba(238, 77, 55, 0.1); transition: none; }
.ah-up { color: var(--ah-green); }
.ah-down { color: var(--ah-red); }

.ah-feed__foot {
  padding: 12px 18px;
  border-top: 1px solid var(--ah-stroke);
  font: 500 11.5px/1 var(--ah-mono);
  color: var(--ah-dim);
}

/* ============ Doc map ============ */
.ah-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ah-pillar {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--ah-stroke);
  border-radius: 18px;
  background: var(--ah-surface);
  overflow: hidden;
  transition: opacity 0.9s var(--ah-ease), transform 0.9s var(--ah-ease), border-color 0.3s ease;
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms;
}

.ah-pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px 220px at var(--mx) var(--my), rgba(234, 110, 37, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ah-pillar:hover {
  border-color: rgba(234, 110, 37, 0.4);
}

.ah-pillar:hover::before {
  opacity: 1;
}

.ah-pillar > * {
  position: relative;
}

.ah-pillar__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.ah-pillar__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(234, 110, 37, 0.12);
  border: 1px solid rgba(234, 110, 37, 0.3);
}

.ah-pillar__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ah-brand-2);
  stroke-width: 2;
  stroke-linecap: round;
}

.ah-tag {
  font: 600 11.5px/1 var(--ah-mono);
  color: var(--ah-dim);
  padding: 6px 9px;
  border: 1px solid var(--ah-stroke);
  border-radius: 999px;
}

.ah .ah-pillar h3 {
  margin: 0 0 8px;
  font: 800 1.35rem/1.2 var(--ah-display);
  letter-spacing: -0.02em;
  color: var(--ah-heading);
}

.ah-pillar > p {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--ah-muted);
}

.ah-pillar ul {
  flex: 1;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.ah .ah-pillar li {
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid rgb(var(--ah-ink) / 0.05);
  font-size: 14.5px;
  color: var(--ah-dim);
}

.ah .ah-pillar li a {
  color: var(--ah-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ah .ah-pillar li a:hover {
  color: var(--ah-brand-2);
}

.ah .ah-pillar__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ah-brand-2);
  text-decoration: none;
}

.ah-pillar__cta span {
  transition: transform 0.2s ease;
}

.ah-pillar__cta:hover span {
  transform: translateX(4px);
}

/* ============ Checklist + agents ============ */
.ah-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
}

.ah-card {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--ah-stroke);
  border-radius: 18px;
  background: var(--ah-surface);
}

.ah-card--agents {
  background:
    radial-gradient(500px 260px at 100% 100%, rgba(240, 178, 50, 0.07), transparent 70%),
    var(--ah-surface);
}

.ah-checks {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ah .ah-checks li {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid rgb(var(--ah-ink) / 0.05);
  color: var(--ah-muted);
  font-size: 15px;
}

.ah-checks strong {
  color: var(--ah-text);
}

.ah-checks a {
  color: var(--ah-brand-2) !important;
}

.ah-checks i {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1.5px solid var(--ah-stroke-2);
  transition: background 0.3s ease, border-color 0.3s ease;
  transition-delay: var(--d, 0ms);
}

.ah-checks i::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.35s var(--ah-ease);
  transition-delay: var(--d, 0ms);
}

.ah-checks.is-in i {
  background: var(--ah-green);
  border-color: var(--ah-green);
}

.ah-checks.is-in i::after {
  transform: rotate(45deg) scale(1);
}

/* ============ Pricing + final CTA ============ */
.ah-final {
  padding-bottom: clamp(72px, 10vw, 140px);
}

.ah-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 820px;
  margin: 0 auto clamp(64px, 9vw, 110px);
  border: 1px solid var(--ah-stroke);
  border-radius: 18px;
  background: var(--ah-surface);
  overflow: hidden;
}

.ah-pricing div {
  padding: 26px 20px;
  text-align: center;
}

.ah-pricing div + div {
  border-left: 1px solid var(--ah-stroke);
}

.ah-pricing strong {
  display: block;
  font: 800 clamp(1.8rem, 3.5vw, 2.5rem)/1.1 var(--ah-display);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ah-heading) 30%, var(--ah-brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ah-pricing span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ah-dim);
}

.ah-cta {
  position: relative;
  text-align: center;
}

.ah-cta__mark {
  display: block;
  width: 64px;
  margin: 0 auto 28px;
  fill: var(--ah-brand);
  filter: drop-shadow(0 0 24px rgba(234, 110, 37, 0.55));
  animation: ah-launch 3.2s var(--ah-ease) infinite;
}

@keyframes ah-launch {
  0%, 60%, 100% { transform: translate(0, 0); opacity: 1; }
  75% { transform: translate(28px, -28px); opacity: 0; }
  76% { transform: translate(-28px, 28px); opacity: 0; }
  90% { transform: translate(0, 0); opacity: 1; }
}

.ah .ah-cta h2 {
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.ah-cta > p {
  margin: 0 auto 28px;
  max-width: 36rem;
  color: var(--ah-muted);
  font-size: 1.05rem;
}

.ah .ah-support {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--ah-dim);
}

.ah-support a {
  color: var(--ah-brand-2) !important;
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .ah-hero__grid,
  .ah-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .ah-hero__mark {
    width: 70vw;
    opacity: 0.6;
  }

  .ah-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .ah-flow__steps {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .ah-flow__steps::before {
    display: none;
  }

  .ah-flow__steps li {
    flex-shrink: 0;
  }

  .ah-flow__steps small {
    display: none;
  }

  .ah-pillars,
  .ah-duo {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .ah-install {
    width: 100%;
  }

  .ah-install__copy span {
    display: none;
  }

  .ah .ah-console__code {
    font-size: 10.5px;
    height: calc(15 * 1.75em + 28px);
    padding: 14px;
  }

  .ah-console__resp {
    padding: 12px 14px;
  }

  .ah-race__scale {
    display: none;
  }

  .ah-lane {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .ah-lane__track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .ah-lane__label {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .ah-race__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .ah-row {
    grid-template-columns: 1.4fr 1fr 0.9fr;
  }

  .ah-row__vol {
    display: none;
  }

  .ah-pricing {
    grid-template-columns: 1fr;
  }

  .ah-pricing div + div {
    border-left: 0;
    border-top: 1px solid var(--ah-stroke);
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .ah *,
  .ah *::before,
  .ah *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .ah-js .ah-reveal {
    opacity: 1;
    transform: none;
  }

  .ah-hero__chart {
    display: none;
  }
}
