/* The public pages (/, /pricing, /claude-pro, /docs, and in English under /en): see site.mjs. Light or dark by the system setting. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --line: #e5e7eb;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --code-bg: #f3f4f6;
  --pre-bg: #0f172a;
  --pre-text: #e2e8f0;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c10;
    --bg-2: #13141a;
    --line: #262833;
    --text: #f3f4f6;
    --text-2: #d1d5db;
    --muted: #9ca3af;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-soft: #1e1b4b;
    --code-bg: #1e2029;
    --pre-bg: #050608;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-wrap: break-word; background: var(--bg); color: var(--text); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -.02em; }
h2 { font-size: 24px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; color: var(--text-2); }
code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: .1em .35em; border-radius: 5px; word-break: break-word; }
pre { background: var(--pre-bg); color: var(--pre-text); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: 0 0 1em; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; word-break: normal; }
small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.mono { font-family: var(--mono); }

.button { display: inline-block; background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 10px; font-weight: 600; border: 1px solid var(--accent); }
.button:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.button.secondary:hover { background: var(--bg-2); color: var(--text); }
.button.small { padding: 6px 14px; font-size: 14px; }

.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: block; object-fit: cover; box-shadow: 0 2px 8px rgba(79, 70, 229, .35); }
.site-header nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.site-header nav a:not(.button) { color: var(--text-2); }
.site-header nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
/* The same page in the other language: a globe and the language's name, a pill in the header */
.lang-switch { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lang-switch::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5c2.6 2.6 3.9 5.8 3.9 9.5s-1.3 6.9-3.9 9.5M12 2.5C9.4 5.1 8.1 8.3 8.1 12s1.3 6.9 3.9 9.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5c2.6 2.6 3.9 5.8 3.9 9.5s-1.3 6.9-3.9 9.5M12 2.5C9.4 5.1 8.1 8.3 8.1 12s1.3 6.9 3.9 9.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.site-header .lang-switch { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; line-height: 1.6; }
.site-header .lang-switch:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--accent-soft), var(--bg)); text-align: center; }
.hero .lead { max-width: 720px; margin: 0 auto 28px; }
.lead { font-size: 18px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.page-head { padding: 48px 0 8px; background: linear-gradient(180deg, var(--accent-soft), var(--bg)); }
.section { padding: 32px 0; }
.more { margin-top: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.card p { margin: 0; font-size: 15px; }

.lineup { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.lineup-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--bg-2); }
.lineup-group ul { list-style: none; margin: 0; padding: 0; }
.lineup-group li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.lineup-group li:first-child { border-top: 0; }
.lineup-group li span { font-family: var(--mono); font-size: 12.5px; color: var(--muted); align-self: center; text-align: right; }

.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin-bottom: 18px; }
.steps li p { margin: 4px 0 8px; }

.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; }

.cta { text-align: center; padding: 56px 0; background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 24px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; background: var(--bg-2); font-weight: 600; white-space: nowrap; }
tbody th { font-weight: 500; color: var(--text-2); width: 40%; background: var(--bg-2); }
tbody tr:first-child th, tbody tr:first-child td { border-top: 0; }
thead + tbody tr:first-child td { border-top: 1px solid var(--line); }
small.official { text-decoration: line-through; }
/* /pricing's last column: how much less than the official price */
td.save { white-space: nowrap; vertical-align: middle; }
.save-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 13.5px; line-height: 1.7; }
.notes ul { padding-left: 1.2em; color: var(--text-2); }
.notes li { margin-bottom: 6px; }
.group-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.group-note code { font-size: 13px; }

.toc { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 8px; font-size: 15px; }
.docs .section { border-top: 1px solid var(--line); }
.docs .section:first-child { border-top: 0; }
.docs h2 { scroll-margin-top: 72px; }
.docs .section[id] { scroll-margin-top: 60px; }
/* 接口参考: an endpoint each, its method as a small tag */
.endpoint { margin-top: 28px; padding-top: 4px; scroll-margin-top: 64px; }
.endpoint h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.endpoint h3 code { font-size: 16px; }
.method { display: inline-block; min-width: 46px; padding: 2px 8px; border-radius: 6px; font: 600 12px/1.6 var(--mono); text-align: center; color: #fff; }
.method.get { background: #059669; }
.method.post { background: #4f46e5; }
.docs td code { white-space: nowrap; }
.docs td:not(:first-child) code { white-space: normal; }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  .site-header nav { gap: 12px; font-size: 14px; }
  .hero { padding: 48px 0 40px; }
  .lead { font-size: 16px; }
  th, td { padding: 8px 10px; }
}
/* Phones: the header on two rows, the name with the language and 登录 / 注册 on the first, the pages under them */
@media (max-width: 520px) {
  .site-header .wrap { flex-wrap: wrap; justify-content: flex-start; height: auto; padding-top: 10px; padding-bottom: 4px; gap: 0 14px; }
  .site-header .wrap::after { content: ""; order: 2; flex-basis: 100%; }
  .site-header nav { display: contents; }
  .site-header .brand { margin-right: auto; }
  .site-header nav a:not(.button):not(.lang-switch) { order: 3; padding: 4px 0; }
  .site-header nav .lang-switch, .site-header nav .button { order: 1; }
  .docs h2 { scroll-margin-top: 96px; }
  .docs .section[id] { scroll-margin-top: 84px; }
  .endpoint { scroll-margin-top: 88px; }
}
@media (max-width: 359px) {
  .site-header .wrap { gap: 0 10px; }
  .site-header .lang-switch { padding: 2px 8px; }
  .site-header nav .button { padding: 6px 10px; font-size: 13px; }
}

/* 充值活动's line at the top of the public pages */
.promo-bar { background: linear-gradient(90deg, #4f46e5, #7c3aed 55%, #db2777); color: #fff; font-size: 14px; }
.promo-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.promo-bar strong { font-weight: 700; }
.promo-bar-end { opacity: .85; font-size: 13px; }
.promo-bar a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.promo-bar a:hover { color: #fde68a; }

/* claude-pro: the tag, the page's head with the desktop app's screenshot, and its block on the home page */
.tag { display: inline-block; margin-bottom: 12px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.actions.start { justify-content: flex-start; }
.agent-promo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), var(--bg) 70%); }
.agent-promo h2 { margin-top: 0; }
.agent-promo p { color: var(--text-2); }
.agent-promo pre { margin: 0; }
@media (max-width: 760px) { .agent-promo { grid-template-columns: 1fr; padding: 20px; } }

/* claude-pro's desktop app: its screenshot in a window's frame (light, as the picture is) at the head of the page, and
   what it does in its section */
.app-window { max-width: 920px; margin: 40px auto 0; text-align: left; border: 1px solid #dcdad3; border-radius: 10px; overflow: hidden; background: #f6f5f1; box-shadow: 0 18px 48px rgba(15, 23, 42, .18); }
.app-window-bar { display: flex; align-items: center; gap: 8px; height: 32px; padding-left: 12px; background: #ebe9e4; color: #3d3a35; font-size: 12.5px; border-bottom: 1px solid #dcdad3; }
.app-window-bar .app-icon { width: 16px; height: 16px; flex: none; }
.app-window-controls { display: flex; margin-left: auto; }
.app-window-controls svg { width: 44px; height: 32px; padding: 11px 17px; fill: none; stroke: currentColor; stroke-width: 1; }
.app-window img { display: block; width: 100%; height: auto; }
.desktop-points { list-style: none; margin: 8px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 4px 28px; }
.desktop-points li { padding: 14px 0; border-top: 2px solid var(--accent-soft); }
.desktop-points p { margin: 4px 0 0; font-size: 15px; }
@media (max-width: 640px) { .app-window { margin-top: 28px; } .app-window-controls svg { width: 36px; padding: 11px 13px; } }
