:root {
  color-scheme: dark;
  --bg: #05080f;
  --bg-soft: #080e18;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0d1524;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #e8eef8;
  --muted: #8fa0b8;
  --faint: #607089;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.13);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.12);
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 22px;
  --shadow: 0 24px 80px -32px rgba(0, 0, 0, 0.9);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(34, 211, 238, 0.14), transparent 62%),
    radial-gradient(760px 480px at 92% 4%, rgba(52, 211, 153, 0.1), transparent 58%),
    radial-gradient(600px 520px at 50% 105%, rgba(99, 102, 241, 0.12), transparent 65%),
    linear-gradient(180deg, #060b14 0%, #05080f 52%, #04070c 100%);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre,
.mono {
  font-family: var(--mono);
  font-variant-ligatures: none;
}

code {
  font-size: 0.86em;
  color: #b7e8f5;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 6px;
  padding: 0.12em 0.42em;
}

::selection {
  background: rgba(34, 211, 238, 0.3);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand img {
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18), 0 8px 24px -12px rgba(34, 211, 238, 0.6);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand-text small {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modes {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.7);
}

.modes a {
  padding: 7px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.modes a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.modes a[aria-current="page"] {
  color: #04121a;
  font-weight: 600;
  background: linear-gradient(135deg, #67e8f9, #34d399);
  box-shadow: 0 6px 20px -8px rgba(34, 211, 238, 0.8);
}

.api-link {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.api-link span {
  color: var(--cyan);
}

.api-link:hover {
  color: var(--text);
}

main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding: clamp(44px, 7vw, 84px) 0 clamp(32px, 4vw, 52px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: #9ddbe8;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(52, 211, 153, 0.6);
  border-radius: 50%;
  animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  80%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #7dd3fc 0%, #67e8f9 38%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.lede code {
  white-space: nowrap;
}

.url-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.url-row > span {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.url-row a {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(13, 21, 36, 0.7);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.url-row a code {
  background: none;
  border: 0;
  color: #9fb3cc;
  font-size: 11.5px;
  padding: 7px 10px;
  display: block;
}

.url-row a:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateY(-1px);
}

.url-row a[aria-current="true"] {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.09);
}

.url-row a[aria-current="true"] code {
  color: #a5f3fc;
}

.hero-visual {
  position: relative;
}

.visual-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(34, 211, 238, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(16, 26, 44, 0.9), rgba(8, 13, 24, 0.92));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.visual-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, black, transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.visual-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.visual-head code {
  border: 0;
  background: none;
  padding: 0;
  color: #93a7c0;
  font-size: 11px;
}

.traffic {
  display: inline-flex;
  gap: 5px;
}

.traffic i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
}

.traffic i:first-child {
  background: #f87171;
}

.traffic i:nth-child(2) {
  background: #fbbf24;
}

.traffic i:nth-child(3) {
  background: #34d399;
}

.lock {
  margin-left: auto;
  color: var(--green);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.flow {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 8px;
}

.flow-node {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
}

.flow-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.07);
  color: #8fe7f5;
  font-family: var(--mono);
  font-size: 10.5px;
}

.flow-node strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.flow-node small {
  display: block;
  margin-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
}

.flow-line {
  width: 1px;
  height: 18px;
  margin-left: 15px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.4), rgba(34, 211, 238, 0.04));
}

.visual-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.ok-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 56px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 27, 46, 0.78), rgba(8, 13, 23, 0.86));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
}

.stage {
  padding: clamp(20px, 3vw, 28px);
}

.stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.kicker {
  margin: 0 0 6px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
}

.stage h2 {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.stage-desc {
  max-width: 440px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.stage-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.status-pill[data-state="busy"] {
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.3);
  background: var(--cyan-soft);
}

.status-pill[data-state="busy"] .status-dot {
  background: var(--cyan);
  animation: blink 1s ease-in-out infinite;
}

.status-pill[data-state="ok"] {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.34);
  background: var(--green-soft);
}

.status-pill[data-state="ok"] .status-dot {
  background: var(--green);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.status-pill[data-state="error"] {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.34);
  background: var(--red-soft);
}

.status-pill[data-state="error"] .status-dot {
  background: var(--red);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.ttl {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.ttl b {
  color: var(--muted);
  font-weight: 500;
}

.challenge-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding: 9px 13px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  background: rgba(5, 10, 19, 0.55);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.challenge-strip code {
  border: 0;
  background: none;
  padding: 0;
  color: #9fb3cc;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.strip-sep {
  width: 1px;
  height: 12px;
  margin: 0 2px;
  background: var(--line);
}

.alert {
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-left: 3px solid var(--red);
  border-radius: 11px;
  background: var(--red-soft);
  animation: slide-in 0.25s ease;
}

.alert strong {
  display: block;
  color: #fecdd3;
  font-size: 12.5px;
}

.alert p {
  margin: 3px 0 0;
  color: #e7aeb8;
  font-size: 12.5px;
  line-height: 1.6;
  word-break: break-word;
}

@keyframes slide-in {
  from {
    transform: translateY(-4px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.panels {
  margin-top: 22px;
}

.panel {
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.standard-copy {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 14, 26, 0.55);
}

.glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 21px;
}

.standard-copy h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
}

.standard-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.hint {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.65;
}

.hint-strong {
  margin: 0 0 12px;
  color: #b9c8dc;
  font-size: 12.5px;
}

.turnstile-slot {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.turnstile-slot:empty {
  display: none;
}

.turnstile-slot.is-silent {
  width: min(100%, 320px);
  min-height: 0;
  margin: 10px auto 0;
}

.widget-note {
  margin: 12px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Slider puzzle */

.slider-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: #081020;
  aspect-ratio: 16 / 9;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.slider-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.slider-stage.is-aligned {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2), 0 12px 50px -20px rgba(52, 211, 153, 0.45);
}

.slider-stage.is-wrong {
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }
  40%,
  60% {
    transform: translateX(4px);
  }
}

.slider-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(4, 9, 18, 0.66);
  color: rgba(226, 232, 240, 0.72);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  backdrop-filter: blur(6px);
}

.slider-track {
  position: relative;
  height: 46px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 9, 18, 0.8);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(52, 211, 153, 0.3));
  transition: background 0.2s ease;
}

.slider-stage.is-aligned ~ .slider-track .slider-fill {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.3), rgba(52, 211, 153, 0.55));
}

.slider-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 40px;
  border: 1px solid rgba(165, 243, 252, 0.4);
  border-radius: 12px;
  background: linear-gradient(180deg, #1b3a4d, #122536);
  color: #a5f3fc;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  transform: translateY(-50%);
  box-shadow: 0 8px 22px -10px rgba(34, 211, 238, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: grab;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.slider-thumb:active {
  cursor: grabbing;
}

.slider-thumb:hover {
  border-color: rgba(34, 211, 238, 0.7);
}

.slider-stage.is-aligned ~ .slider-track .slider-thumb {
  border-color: rgba(52, 211, 153, 0.75);
  background: linear-gradient(180deg, #143d32, #0f2b27);
  color: #a7f3d0;
}

.feedback {
  min-height: 22px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 12px;
}

.feedback[data-tone="warn"] {
  color: #fcd34d;
}

.feedback[data-tone="ok"] {
  color: #6ee7b7;
}

.feedback[data-tone="error"] {
  color: #fda4af;
}

/* Press verification */

.press-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.press-head .hint-strong {
  margin: 0;
}

.prompt-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.08);
  color: #c9f7ff;
  font-size: 16px;
  line-height: 1.35;
}

.prompt-chip b {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: rgba(34, 211, 238, 0.16);
  color: #8fe7f5;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
}

.press-stage {
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(520px 260px at 18% 0%, rgba(34, 211, 238, 0.08), transparent 70%),
    radial-gradient(420px 280px at 92% 100%, rgba(52, 211, 153, 0.07), transparent 70%),
    linear-gradient(180deg, #0b1626, #070d18);
  aspect-ratio: 16 / 10;
  min-height: 300px;
}

.press-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
  pointer-events: none;
}

.press-stage.is-wrong {
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.press-char {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(50px, 11.5%, 66px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(30, 45, 70, 0.82), rgba(14, 24, 40, 0.9));
  color: #dbeafe;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.press-char:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: linear-gradient(180deg, rgba(38, 60, 88, 0.9), rgba(16, 30, 48, 0.94));
}

.press-char:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.press-char.is-picked {
  border-color: rgba(52, 211, 153, 0.65);
  background: linear-gradient(180deg, rgba(24, 72, 61, 0.92), rgba(13, 42, 38, 0.95));
  color: #d1fae5;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.22), 0 12px 30px -16px rgba(52, 211, 153, 0.5);
}

.press-char.is-picked::after {
  content: attr(data-order);
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: linear-gradient(135deg, #67e8f9, #34d399);
  color: #04121a;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.press-char:disabled {
  cursor: default;
}

/* Actions */

.stage-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  border-color: rgba(34, 211, 238, 0.4);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.2), rgba(34, 211, 238, 0.1));
  color: #a5f3fc;
}

.btn.primary:hover {
  border-color: rgba(34, 211, 238, 0.7);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.28), rgba(34, 211, 238, 0.14));
}

.btn.ghost {
  border-color: var(--line);
  background: rgba(148, 163, 184, 0.04);
  color: var(--muted);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.endpoint {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

/* Side column */

.side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.result,
.how,
.endpoints {
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.badge[data-state="success"] {
  border-color: rgba(52, 211, 153, 0.4);
  background: var(--green-soft);
  color: #6ee7b7;
}

.badge[data-state="error"] {
  border-color: rgba(251, 113, 133, 0.4);
  background: var(--red-soft);
  color: #fda4af;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.result-grid > div {
  min-width: 0;
  padding: 10px 12px;
  background: rgba(7, 12, 22, 0.92);
}

.result-grid dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-grid dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: #cbd8e8;
  font-family: var(--mono);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code {
  max-height: 270px;
  margin: 14px 0 0;
  overflow: auto;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #050a13;
  color: #93b4c8;
  font-size: 10.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.code::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code::-webkit-scrollbar-thumb {
  border: 2px solid #050a13;
  border-radius: 8px;
  background: #26364b;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.steps li > span {
  flex: 0 0 auto;
  padding-top: 1px;
  color: rgba(34, 211, 238, 0.66);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.steps strong {
  display: block;
  font-size: 12.5px;
  font-weight: 550;
}

.steps p {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.65;
}

.endpoint-row + .endpoint-row {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.endpoint-row code {
  display: inline-block;
  border: 0;
  background: none;
  padding: 0;
  color: #9ddbe8;
  font-size: 10.5px;
  word-break: break-all;
}

.endpoint-row p {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 11.5px;
}

.tiny {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer a {
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--text);
}

.noscript {
  margin: 20px;
  padding: 14px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  background: var(--amber-soft);
  color: #fde68a;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 560px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .result {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
  }

  .modes {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .modes a {
    flex: 1;
    text-align: center;
    padding: 7px 8px;
  }

  .api-link {
    margin-left: auto;
  }

  main {
    width: calc(100% - 28px);
  }

  .hero {
    padding-top: 36px;
  }

  .lede {
    font-size: 14px;
  }

  .stage-head {
    flex-direction: column;
    gap: 12px;
  }

  .stage-meta {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .side {
    grid-template-columns: 1fr;
  }

  .result {
    grid-column: auto;
  }

  .press-stage {
    min-height: 260px;
  }

  .endpoint {
    display: none;
  }

  .footer {
    width: calc(100% - 36px);
  }
}

@media (max-width: 460px) {
  .brand-text small {
    display: none;
  }

  .url-row a code {
    font-size: 10.5px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .press-char {
    width: 15%;
    border-radius: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
