:root {
  color-scheme: dark;
  --bg: #08080c;
  --card: #111117;
  --line: #22222b;
  --text: #b9b9c2;
  --strong: #f6f6f8;
  --muted: #7d7d88;
  --mint: #7ee2b0;
  --sky: #8cc8ff;
  --violet: #c4a6ff;
  --teal: #8cd4cc;
  --grad: linear-gradient(100deg, var(--mint), var(--sky) 50%, var(--violet));
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

:lang(zh-Hant) { --sans: "Inter", ui-sans-serif, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
:lang(zh-Hans) { --sans: "Inter", ui-sans-serif, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
:lang(ja) { --sans: "Inter", ui-sans-serif, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif; }

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 78% -10%, rgba(140, 200, 255, 0.14), transparent 60%),
    radial-gradient(700px 500px at 10% 10%, rgba(126, 226, 176, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
p, ul, ol { margin: 0; }
h1, h2, h3 { color: var(--strong); margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* top bar */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px max(24px, calc((100vw - 1160px) / 2));
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--strong);
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark-dot {
  width: 14px;
  height: 18px;
  border-radius: 4px;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(140, 200, 255, 0.5);
}

.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav a:hover { color: var(--strong); }

.top-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.lang select {
  appearance: none;
  min-height: 36px;
  padding: 0 30px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237d7d88' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--strong);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--strong);
  color: #0a0a0e;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 rgba(140, 200, 255, 0);
}

.button:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(140, 200, 255, 0.3); }

.button.ghost { background: transparent; color: var(--strong); border-color: var(--line); }
.button.ghost:hover { background: var(--card); box-shadow: none; }

.button.small { min-height: 36px; padding: 0 16px; font-size: 13px; }
.button.large { min-height: 56px; padding: 0 34px; font-size: 17px; }

a:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
}

/* hero */

main { width: min(1160px, 100% - 48px); margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: 48px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 13px;
}

.live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(126, 226, 176, 0.6);
  animation: ping 2s infinite;
}

h1 {
  margin: 24px 0 22px;
  font-size: clamp(48px, 7.4vw, 96px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

h1 span { display: block; }

:lang(zh-Hant) h1, :lang(zh-Hans) h1, :lang(ja) h1 {
  font-size: clamp(34px, 9.6vw, 88px);
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.glow {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { max-width: 30em; font-size: clamp(17px, 1.5vw, 19px); color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

.chips li::before { content: "✓"; margin-right: 7px; color: var(--mint); }

/* phone */

.stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.stage::before {
  content: "";
  position: absolute;
  width: 120%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 200, 255, 0.22), rgba(196, 166, 255, 0.08) 40%, transparent 68%);
  filter: blur(10px);
}

.phone {
  position: relative;
  width: min(330px, 100%);
  padding: 18px 16px 20px;
  border-radius: 40px;
  background: linear-gradient(180deg, #16161d, #0f0f14);
  border: 1px solid #2a2a34;
  box-shadow:
    0 0 0 6px #0c0c10,
    0 0 0 7px #24242c,
    0 40px 90px rgba(0, 0, 0, 0.6);
  transform: rotateY(-8deg) rotateX(4deg);
  animation: float 6s ease-in-out infinite;
  --agent: var(--sky);
}

.phone[data-agent="devin"] { --agent: var(--violet); }
.phone[data-agent="opencode"] { --agent: var(--mint); }
.phone[data-agent="copilot"] { --agent: var(--teal); }

.phone-bar { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px; }
.phone-brand { color: var(--strong); font-weight: 600; font-size: 14px; }

.latency {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(126, 226, 176, 0.12);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 11px;
}

.tabs { display: flex; gap: 6px; margin: 16px 0 18px; }

.tab {
  flex: 1;
  padding: 7px 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}

.phone[data-agent="cursor"] .tab[data-agent="cursor"],
.phone[data-agent="devin"] .tab[data-agent="devin"],
.phone[data-agent="opencode"] .tab[data-agent="opencode"],
.phone[data-agent="copilot"] .tab[data-agent="copilot"] {
  background: var(--agent);
  border-color: transparent;
  color: #0a0a0e;
  font-weight: 600;
}

.bubble {
  max-width: 85%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  animation: rise 0.5s ease both;
}

.bubble.you { margin-left: auto; background: #24242e; color: var(--strong); border-bottom-right-radius: 6px; }
.bubble.agent { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-bottom-left-radius: 6px; animation-delay: 0.15s; }

.permit {
  position: relative;
  margin-top: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #15151c;
  border: 1px solid color-mix(in srgb, var(--agent) 45%, transparent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--agent) 18%, transparent);
  animation: rise 0.5s ease 0.3s both;
}

.permit-label { color: var(--muted); font-size: 12px; }
.cmd { margin-top: 4px; color: var(--strong); font-family: var(--mono); font-size: 15px; }

.permit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

.btn {
  padding: 9px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  transition: transform 0.15s;
}

.btn.yes { background: var(--strong); color: #0a0a0e; font-weight: 600; border-color: transparent; }

.approved {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--agent) 92%, #000);
  color: #0a0a0e;
  font-weight: 700;
  font-size: 16px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.3s, transform 0.3s;
}

.approved::before { content: "✓"; }

.permit.pressed .btn.yes { transform: scale(0.94); }
.permit.done .approved { opacity: 1; transform: scale(1); }

/* works with */

.works {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 40px;
  padding: 28px 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.works ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 40px; }

.works li {
  color: var(--strong);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-transform: none;
}

.works li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: 2px;
}

.works [data-agent="cursor"]::before { background: var(--sky); }
.works [data-agent="devin"]::before { background: var(--violet); }
.works [data-agent="opencode"]::before { background: var(--mint); }
.works [data-agent="copilot"]::before { background: var(--teal); }

/* sections */

.block { padding: 120px 0 0; }

h2 {
  max-width: 18em;
  margin: 0 auto 56px;
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: center;
}

:lang(zh-Hant) h2, :lang(zh-Hans) h2, :lang(ja) h2 { letter-spacing: 0; line-height: 1.25; }

h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 8px; }

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

.card {
  padding: 32px 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  transition: transform 0.3s, border-color 0.3s;
}

.card:hover { transform: translateY(-4px); border-color: #34343f; }

.icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--grad);
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #0a0a0e;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.when {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--strong);
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.when .icon { margin-bottom: 0; }

.card.urgent {
  border-color: rgba(255, 122, 122, 0.35);
  background: linear-gradient(180deg, rgba(255, 122, 122, 0.08), rgba(255, 255, 255, 0.01));
  box-shadow: 0 20px 60px rgba(255, 122, 122, 0.08);
}

.card.urgent .icon { background: linear-gradient(135deg, #ffb27a, #ff7a7a); }
.card.urgent .when { color: #ffb0a8; }

.card p:not(.when), .steps p, .facts p { color: var(--muted); }

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.steps li { position: relative; padding: 0 8px; text-align: center; counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--strong);
  font-size: 24px;
  font-weight: 700;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  left: calc(50% + 48px);
  width: calc(100% - 96px + 20px);
  height: 1px;
  background: linear-gradient(90deg, var(--line), var(--sky), var(--line));
}

/* privacy */

.privacy { position: relative; text-align: center; }

.big-zero {
  font-size: clamp(140px, 22vw, 260px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 60px rgba(140, 200, 255, 0.25));
}

.privacy h2 { margin-top: 12px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  text-align: left;
}

.facts div { padding-top: 20px; border-top: 1px solid var(--line); }

/* pricing */

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

.plan {
  position: relative;
  padding: 32px 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--card);
}

.plan.featured {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 20px 60px rgba(140, 200, 255, 0.12);
}

.badge {
  position: absolute;
  top: -12px;
  left: 28px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--grad);
  color: #0a0a0e;
  font-size: 12px;
  font-weight: 700;
}

.plan-name { color: var(--muted); font-size: 14px; }

.price {
  margin: 10px 0 14px;
  color: var(--strong);
  font-size: 52px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.03em;
}

.price span { margin-left: 8px; color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; }

.note { margin-top: 24px; color: var(--muted); font-size: 14px; text-align: center; }

/* faq */

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

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  color: var(--strong);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); }

/* final */

.final {
  margin: 120px 0 0;
  padding: 88px 24px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(140, 200, 255, 0.18), transparent 70%),
    var(--card);
  text-align: center;
}

.final h2 { margin-bottom: 32px; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1160px, 100% - 48px);
  margin: 0 auto;
  padding: 40px 0;
  color: var(--muted);
  font-size: 13px;
}

.plan-cta { width: 100%; margin-top: 24px; }

/* sub pages */

.nav a[aria-current="page"] { color: var(--strong); }

main.narrow { width: min(760px, 100% - 48px); }

.page-hero { padding: 80px 0 48px; text-align: center; }
.page-hero h1 { margin: 0 0 16px; font-size: clamp(38px, 6vw, 64px); }
.page-hero .lede { margin: 0 auto; }

.tip { margin-top: 10px; color: var(--muted); font-size: 14px; }
.warn { min-height: 1.4em; color: #ff9a8f; font-size: 14px; }

/* legal pages */
.legal { padding-bottom: 60px; }
.legal h2 { margin: 40px 0 10px; font-size: 20px; }
.legal p, .legal li { color: var(--muted); line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--strong); }

.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--strong); }

.guide { list-style: none; padding: 0; counter-reset: guide; display: grid; gap: 16px; }

.guide li {
  position: relative;
  padding: 28px 28px 28px 92px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--card);
  counter-increment: guide;
}

.guide li::before {
  content: counter(guide);
  position: absolute;
  left: 28px;
  top: 26px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad);
  color: #0a0a0e;
  font-weight: 700;
}

.guide h2 {
  margin: 0 0 6px;
  max-width: none;
  font-size: 21px;
  letter-spacing: -0.01em;
  text-align: left;
}

.guide p { color: var(--muted); }
.guide .actions { margin-top: 18px; }
.guide .button { min-height: 42px; font-size: 14px; }

.buy { display: grid; gap: 28px; padding-bottom: 24px; }
.buy fieldset { margin: 0; padding: 0; border: 0; }

.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }

.pick-body {
  display: block;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pick-body .plan-name, .pick-body .price { display: block; }
.pick-body .price { margin: 8px 0 0; font-size: 40px; }

.pick input:checked + .pick-body {
  border-color: transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box;
  border: 1px solid transparent;
  box-shadow: 0 16px 50px rgba(140, 200, 255, 0.14);
}

.pick input:focus-visible + .pick-body { outline: 2px solid var(--sky); outline-offset: 3px; }

.field label { color: var(--strong); font-weight: 600; }

.machines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }

.machine {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0d0d12;
  color: var(--strong);
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.machine:focus { outline: none; border-color: var(--sky); }
.machine::placeholder { color: #45454f; letter-spacing: 0.06em; text-transform: none; }

.buy .button.large { width: 100%; }
.buy .note { margin-top: -12px; }

.keybox {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box;
  text-align: center;
}

.keybox code {
  display: block;
  padding: 16px;
  border-radius: 14px;
  background: #0d0d12;
  color: var(--strong);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
  text-align: left;
}

.keybox .actions { justify-content: center; margin-top: 24px; }
.keybox a { color: var(--sky); }

.recover { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.recover h2 { font-size: 20px; margin: 0 0 6px; }
.recover-row { display: flex; gap: 10px; margin-top: 14px; }
.recover-row input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0d0d12;
  color: var(--strong);
  font: inherit;
}
.recover-row input:focus { outline: none; border-color: var(--sky); }

/* motion */

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(126, 226, 176, 0.6); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(126, 226, 176, 0); }
}

@keyframes float {
  0%, 100% { transform: rotateY(-8deg) rotateX(4deg) translateY(0); }
  50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-10px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

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

/* responsive */

@media (max-width: 900px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 40px 0 64px; text-align: center; gap: 56px; }
  .lede { margin: 0 auto; }
  .actions, .chips { justify-content: center; }
  .phone { transform: none; animation: none; }
  .cards, .steps, .facts, .plans { grid-template-columns: 1fr; }
  .steps { gap: 40px; }
  .steps li:not(:last-child)::after { display: none; }
  .plans { gap: 28px; }
  .block { padding-top: 88px; }
  h2 { margin-bottom: 40px; }
}

@media (max-width: 520px) {
  .top { gap: 12px; padding: 12px 16px; }
  .top .button.small { display: none; }
  main, main.narrow, footer { width: calc(100% - 32px); }
  .plan-pick, .machines { grid-template-columns: 1fr; }
  .recover-row { flex-direction: column; }
  .guide li { padding: 24px 20px 24px 76px; }
  .guide li::before { left: 20px; top: 22px; }
  .guide .actions .button { width: 100%; }
  .actions .button { width: 100%; }
  .final { padding: 64px 20px; border-radius: 24px; }
  footer { flex-direction: column; align-items: center; }
}
