@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #0e1116;
  --ink-2: #353c49;
  --muted: #646c7a;
  --line: #e2e5ea;
  --line-2: #eef0f3;
  --accent: #ff5a1f;
  --accent-ink: #c2410c;
  --accent-soft: #fff0e8;
  --ok: #0d7a52;
  --ok-soft: #e1f3ea;
  --wait: #2f55d4;
  --wait-soft: #e8edfd;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --head: "Inter Tight", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 17, 22, .04), 0 18px 40px -22px rgba(14, 17, 22, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0; color: var(--ink); }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(246, 247, 249, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--head); letter-spacing: -0.02em; text-decoration: none; }
.mark { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav .lang-switch { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262c36; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c5cad3; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #ff7341; }

/* Type */
.display { font-size: clamp(42px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 700; text-wrap: balance; }
.h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -0.035em; text-wrap: balance; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.narrow { max-width: 760px; }

/* Hero */
.hero { padding: 64px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero-copy .lead { margin-top: 24px; max-width: 540px; }
.signup { position: relative; margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 540px; }
.signup input[type="email"] { flex: 1 1 240px; min-width: 0; height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid #cfd4dc; background: var(--surface); font: 400 16px/1 var(--sans); color: var(--ink); }
.signup input[type="email"]::placeholder { color: #9aa1ad; }
.signup input[type="email"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 90, 31, .22); }
.form-msg { flex-basis: 100%; font-size: 15px; font-weight: 500; min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.is-ok { color: var(--ok); }
.form-msg.is-err { color: #b42318; }
.form-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.signup.is-done input, .signup.is-done button, .signup.is-done .picks { display: none; }

/* Schedule mock */
.sched { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.sched-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line-2); }
.sched-title { font: 700 17px/1.3 var(--head); letter-spacing: -0.01em; }
.sched-meta { margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.pill { flex: none; padding: 6px 10px; border-radius: 999px; font: 600 12.5px/1 var(--sans); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.sched-src { display: flex; gap: 12px; align-items: center; padding: 14px 22px; background: #fbfbfc; border-bottom: 1px solid var(--line-2); }
.src-meta { min-width: 0; }
.src-meta b { display: block; font-size: 14.5px; font-weight: 600; }
.src-meta span { font-size: 13px; color: var(--muted); }
.thumbs { display: flex; gap: 6px; flex: none; margin-left: auto; }
.thumb { width: 44px; height: 44px; border-radius: 9px; }
.thumb-video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: linear-gradient(145deg, #1b2030, #3a2a4f); color: #fff; font: 500 10.5px/1 var(--mono); }
.thumb-video svg { width: 12px; height: 12px; }
.thumb-img { background: linear-gradient(160deg, #ffd6c2 0%, #ff8a5c 55%, #ff5a1f 100%); }
.plist { list-style: none; margin: 0; padding: 4px 0; }
.plist li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 22px; }
.plist li + li { border-top: 1px solid var(--line-2); }
.p-name { font-size: 13.5px; font-weight: 600; }
.p-text { font-size: 14.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-when { display: flex; align-items: center; gap: 10px; }
.p-when b { font: 500 13px/1 var(--mono); color: var(--ink); white-space: nowrap; }
.p-when .st { min-width: 74px; text-align: center; }
.st { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; }
.st-ok { background: var(--ok-soft); color: var(--ok) !important; }
.st-wait { background: var(--wait-soft); color: var(--wait) !important; }

/* Sections */
.section { padding: 104px 0; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

.steps { list-style: none; counter-reset: step; margin: 36px 0 0; padding: 0; display: grid; gap: 22px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; color: var(--ink-2); line-height: 1.55; }
.steps li b { color: var(--ink); font-weight: 600; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font: 700 15px/1 var(--head); }

.tz-card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.card-label { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tz { margin-top: 22px; padding: 0 2px; }
.tz-track { position: relative; height: 66px; border-bottom: 2px solid var(--ink); background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%); }
.tz-mark { position: absolute; bottom: -7px; left: calc(var(--at) * 100%); display: grid; justify-items: start; gap: 2px; padding-left: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.2; white-space: nowrap; transform: translateX(-6px); padding-bottom: 20px; }
.tz-mark::after { content: ""; position: absolute; left: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.tz-mark b { font: 600 12px/1 var(--mono); color: var(--ink); }
.tz-axis { display: flex; justify-content: space-between; margin-top: 10px; font: 500 11.5px/1 var(--mono); color: var(--muted); }
.tz-axis span:last-child { text-align: right; }
.tz-table { width: 100%; margin-top: 26px; border-collapse: collapse; font-size: 14.5px; }
.tz-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 0 8px 8px 0; border-bottom: 1px solid var(--line); }
.tz-table td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.tz-table td:last-child, .tz-table th:last-child { text-align: right; padding-right: 0; font-family: var(--mono); font-size: 13.5px; }
.callout { margin-top: 22px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.callout b { color: var(--ink); }

.ways { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ways-2 { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
.band .way { background: var(--bg); }
.hero-copy .lead b { color: var(--ink); font-weight: 600; }

.gen { margin-top: 44px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.gen .steps { margin-top: 8px; }
.gen-card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 6px 24px; }
.gen-row { padding: 18px 0; }
.gen-row + .gen-row { border-top: 1px solid var(--line); }
.gen-src { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.gen-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.gen-ico svg { width: 18px; height: 18px; }
.gen-src b { display: block; font-size: 15px; font-weight: 600; }
.gen-src span:not(.gen-ico) { font-size: 13.5px; color: var(--muted); }
.gen-brief { margin-top: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 15px; color: var(--ink-2); }
.drafts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.drafts li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.drafts p { font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.d-tag { padding: 5px 7px; border-radius: 7px; background: var(--bg); border: 1px solid var(--line); font: 500 12px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.section:not(.band) .tz-card { background: var(--surface); }
.section:not(.band) .tz-card .callout { background: var(--bg); }
.way { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.way-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 20px; }
.way-icon svg { width: 22px; height: 22px; }
.way p { margin-top: 10px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }

.h2 + .lead { margin-top: 18px; }
.ptable { width: 100%; background: var(--surface); margin-top: 40px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 16px; }
.ptable thead th { background: var(--bg); text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ptable tbody th { text-align: left; font: 700 16px/1.3 var(--head); padding: 16px 20px; width: 16%; }
.ptable td { padding: 16px 20px; color: var(--ink-2); }
.ptable tbody tr + tr th, .ptable tbody tr + tr td { border-top: 1px solid var(--line-2); }
.table-foot { margin-top: 18px; font-size: 15.5px; color: var(--ink-2); }

.facts { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.facts > div { border-top: 2px solid var(--ink); padding-top: 20px; }
.facts p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }

.api-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.api-grid .lead { margin-top: 20px; }
.code-stack { display: grid; gap: 14px; min-width: 0; }
.code { background: var(--ink); border-radius: var(--radius); padding: 16px 20px 18px; overflow-x: auto; }
.code-label { font: 600 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #8b93a3; margin-bottom: 12px; }
.code pre { margin: 0; font: 500 13px/1.65 var(--mono); color: #e7eaf0; }
.code .s { color: #ffb38f; }
.code .k { color: #9ec1ff; }

/* Join */
.join { background: var(--ink); color: #fff; padding: 104px 0; }
.join-inner { max-width: 760px; text-align: center; }
.join .h2 { color: #fff; }
.join .lead { color: #c3c8d2; margin-top: 16px; }
.signup-full { max-width: 620px; margin: 36px auto 0; display: block; }
.picks { border: 0; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.picks legend { width: 100%; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: #c3c8d2; }
.picks label { position: relative; cursor: pointer; }
.picks input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.picks span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid #3a414d; color: #e3e6ec; font-size: 14.5px; font-weight: 500; transition: background .15s, border-color .15s; }
.picks input:checked + span { background: #fff; color: var(--ink); border-color: #fff; }
.picks input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 700; color: var(--accent-ink); }
.picks input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup-row { display: flex; gap: 10px; }
.signup-full input[type="email"] { border-color: transparent; }
.join .form-msg { margin-top: 14px; text-align: center; }
.join .form-msg.is-ok { color: #7ee2b0; }
.join .form-msg.is-err { color: #ffb4a8; }
.join .form-note { color: #9aa2b0; margin-top: 16px; }
.join .form-note a { color: #fff; }

/* Footer */
.site-footer { padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer nav a { text-decoration: none; color: var(--ink-2); }
.site-footer nav a:hover { color: var(--ink); }

/* Legal and simple pages */
.page { padding: 72px 0 104px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.04em; }
.page .updated { margin-top: 12px; font-size: 14px; color: var(--muted); }
.page h2 { margin-top: 44px; font-size: 22px; letter-spacing: -0.02em; line-height: 1.3; }
.page p, .page li { color: var(--ink-2); }
.page p { margin-top: 14px; }
.page ul { margin: 14px 0 0; padding-left: 22px; }
.page li + li { margin-top: 6px; }
.page .actions { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }
.page .signup { margin-top: 18px; }

/* Responsive */
@media (max-width: 1020px) {
  .hero-grid, .split, .api-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 48px; }
  .hero-copy .lead, .signup { max-width: 620px; }
  .ways, .ways-2, .facts, .gen { grid-template-columns: 1fr; }
  .gen { gap: 36px; }
  .ways { gap: 14px; }
  .facts { gap: 28px; }
  .nav a:not(.btn):not(.lang-switch) { display: none; }
  .nav { gap: 10px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .site-header .wrap { height: 60px; }
  .brand { font-size: 17px; gap: 8px; }
  .mark { width: 24px; height: 24px; }
  .site-header .btn-sm { height: 34px; padding: 0 10px; font-size: 13px; }
  .nav .lang-switch { padding: 5px 8px; font-size: 13px; }
  .section, .join { padding: 72px 0; }
  .hero { padding: 36px 0 64px; }
  .display { font-size: clamp(38px, 11vw, 50px); }
  .lead { font-size: 17px; }
  .signup { flex-direction: column; }
  .signup input[type="email"] { flex: none; width: 100%; }
  .signup .btn { width: 100%; }
  .signup-row { flex-direction: column; }
  .sched-head, .sched-src, .plist li { padding-left: 16px; padding-right: 16px; }
  .plist li { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .p-text { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .p-when .st { min-width: 0; }
  .tz-card { padding: 20px 16px; }
  .tz-mark { font-size: 11.5px; }
  .tz-table { font-size: 13.5px; }
  .tz-table td, .tz-table th { white-space: nowrap; }
  .tz-table td:nth-child(2), .tz-table th:nth-child(2) { display: none; }
  .ptable, .ptable tbody, .ptable tr, .ptable th, .ptable td { display: block; width: 100%; }
  .ptable { border: 0; overflow: visible; }
  .ptable thead { display: none; }
  .ptable tbody tr { border: 1px solid var(--line); border-radius: 14px; padding: 6px 0; background: var(--surface); }
  .ptable tbody tr + tr { margin-top: 10px; }
  .ptable tbody tr + tr th, .ptable tbody tr + tr td { border-top: 0; }
  .ptable tbody th { padding: 12px 16px 4px; width: auto; }
  .ptable td { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 6px 16px; font-size: 15px; }
  .ptable td::before { content: attr(data-label); color: var(--muted); font-size: 13.5px; }
  .ptable tbody tr td:last-child { padding-bottom: 12px; }
  .code pre { font-size: 12px; }
  .gen-card { padding: 4px 16px; }
  .drafts li { grid-template-columns: auto 1fr; }
  .drafts p { grid-column: 1 / -1; grid-row: 2; }
  .drafts .st { justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Chinese pages: CJK glyphs need no negative tracking */
:lang(zh) .display, :lang(zh) .h2, :lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; }
:lang(zh) .display { font-size: clamp(38px, 4.2vw, 58px); line-height: 1.2; }
.nw { display: inline-block; }
@media (max-width: 680px) { :lang(zh) .display { font-size: clamp(32px, 9.6vw, 40px); } }
:lang(zh) .h2 { line-height: 1.25; }
