/* deepseek-harness-cloud design system.
   Kinship with the upstream desktop site (dshdesktop.cn): brand blue #2663c9,
   blue-tinted near-white ground, 10px radius, quiet borders, Noto Sans SC.
   Tokens on :root; dark via prefers-color-scheme redefining tokens only. */

:root {
  --bg: #f6fbff;
  --bg-soft: #eef4fb;
  --card: #ffffff;
  --fg: #151b24;
  --muted: #5c6673;
  --faint: #8a94a1;
  --border: #e3e8ef;
  --border-strong: #cfd8e3;
  --brand: #2663c9;
  --brand-strong: #1d52ad;
  --brand-weak: #e9f0fb;
  --brand-fg: #ffffff;
  --ok: #178a50;
  --ok-weak: #e5f5ec;
  --warn: #b57c0a;
  --warn-weak: #fdf3dd;
  --danger: #d3232f;
  --danger-weak: #fdeaea;
  --shadow-sm: 0 1px 2px rgba(21, 27, 36, .05);
  --shadow-md: 0 2px 6px rgba(21, 27, 36, .05), 0 12px 32px -12px rgba(21, 27, 36, .14);
  --shadow-screen: 0 1px 2px rgba(21, 27, 36, .1), 0 32px 80px -24px rgba(21, 27, 36, .38);
  --radius: 10px;
  --radius-lg: 16px;
  --nav-bg: rgba(246, 251, 255, .82);
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
          "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1319;
    --bg-soft: #121924;
    --card: #161e29;
    --fg: #e7ecf3;
    --muted: #9aa6b4;
    --faint: #6e7a88;
    --border: #232d3a;
    --border-strong: #31405e;
    --brand: #4d84e0;
    --brand-strong: #6b9aec;
    --brand-weak: rgba(77, 132, 224, .14);
    --brand-fg: #ffffff;
    --ok: #3fbf7f;
    --ok-weak: rgba(63, 191, 127, .12);
    --warn: #d9a441;
    --warn-weak: rgba(217, 164, 65, .12);
    --danger: #ef5f66;
    --danger-weak: rgba(239, 95, 102, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
    --shadow-screen: 0 1px 2px rgba(0, 0, 0, .4), 0 32px 80px -24px rgba(0, 0, 0, .7);
    --nav-bg: rgba(14, 19, 25, .82);
  }
}

/* ---------- base ---------- */

* { box-sizing: border-box; margin: 0; }

/* the hidden attribute always wins, even over display:flex components */
[hidden] { display: none !important; }

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

body {
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }

h1, h2, h3, h4 { line-height: 1.3; text-wrap: balance; font-weight: 600; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 560px; margin: 0 auto; padding: 0 24px; }

.muted { color: var(--muted); }
.small, .footnote { font-size: 13px; }
.center { text-align: center; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(11, 28, 56, .94), rgba(11, 28, 56, .74));
  border-bottom: 1px solid rgba(122, 165, 240, .18);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
}

.nav-row { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-name { font-size: 16.5px; font-weight: 650; letter-spacing: .1px; }
/* Top-level items are padded pills, not bare text, so the hover target matches
   the dropdown trigger beside it and the row reads as one control strip. */
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav > a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.site-nav > a:not(.btn) {
  padding: 7px 11px; border-radius: 9px;
  transition: color .15s ease, background .15s ease;
}
.site-nav > a:not(.btn):hover { color: var(--fg); background: var(--brand-weak); }
.site-nav > a.active { color: var(--fg); }
.site-nav a.btn { color: var(--brand-fg); }
.site-nav a.btn:hover { color: var(--brand-fg); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius);
  padding: 9px 18px; font: 500 14.5px/1.4 var(--font);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--brand-fg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-fg); }
.btn-ghost { background: var(--card); color: var(--fg); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--faint); color: var(--fg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-sm { padding: 6px 14px; font-size: 13.5px; }
.btn-lg { padding: 12px 26px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn .btn-icon { display: inline-flex; }

/* ---------- dark ripple hero (deliberately single-look; kin to dshdesktop.cn) ---------- */

.hero-dark {
  position: relative;
  background: #0b1c38;   /* explicit ground behind the canvas */
  color: #eef3fb;
  overflow: hidden;
}
.hero-dark #hero-waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(#000 55%, transparent);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
}
.hero-dots {
  position: absolute; left: 4%; bottom: 10%; width: 260px; height: 180px; pointer-events: none;
  background-image: radial-gradient(rgba(190, 212, 248, .5) 1.1px, transparent 1.1px);
  background-size: 14px 14px;
  mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent);
  opacity: .35;
}

.hero-dark-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  align-items: center; gap: 40px;
  padding-top: 96px; padding-bottom: 96px; min-height: 560px;
}

.hero-badge-dark {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(122, 165, 240, .14); color: #a8c4f2;
  border: 1px solid rgba(148, 184, 244, .3);
  border-radius: 999px; padding: 5px 14px;
  font-size: 13px; font-weight: 500; margin-bottom: 22px;
}
.hero-copy h1 {
  color: #fff;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 700; letter-spacing: -.5px; line-height: 1.16;
  margin-bottom: 18px;
}
.hero-sub-dark { color: rgba(226, 235, 249, .78); font-size: clamp(15px, 1.5vw, 17px); max-width: 480px; margin-bottom: 14px; }
.hero-note-dark {
  display: flex; align-items: center; gap: 7px;
  color: rgba(196, 210, 233, .55); font-size: 13px; margin-bottom: 26px;
}
.hero-actions-dark { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-hero {
  background: #fff; color: #10203c; border-color: transparent;
  padding: 12px 24px; font-size: 15px; font-weight: 600; border-radius: 12px;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5);
}
.btn-hero:hover { background: #e8eefb; color: #10203c; }
.btn-hero-ghost {
  background: rgba(255, 255, 255, .07); color: #dbe6f7;
  border-color: rgba(255, 255, 255, .22); border-radius: 10px;
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, .13); color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero-actions-sub { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-free-note { color: rgba(196, 210, 233, .55); font-size: 13px; }

.hero-shot { position: relative; min-width: 0; }
.hero-shot img {
  display: block; width: 146%; max-width: none; height: auto;
  border-radius: 14px;
  border: 1px solid rgba(140, 170, 220, .25);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .75), 0 2px 8px rgba(0, 0, 0, .4);
}

@media (max-width: 900px) {
  .hero-dark-inner { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 56px; text-align: center; }
  .hero-copy h1 { font-size: clamp(30px, 8vw, 40px); }
  .hero-sub-dark { margin-inline: auto; }
  .hero-note-dark, .hero-actions-dark, .hero-actions-sub { justify-content: center; }
  .hero-shot img { width: 100%; border-radius: 12px; }
  .hero-dots { display: none; }
}

/* ---------- hero ---------- */

.hero { padding: 84px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto;  height: 130%;
  background:
    radial-gradient(42% 55% at 50% 12%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-weak); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: 999px; padding: 5px 14px;
  font-size: 13px; font-weight: 500; margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700; letter-spacing: -.5px; line-height: 1.18;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--brand); white-space: nowrap; }

.hero-sub {
  font-size: clamp(15px, 1.6vw, 17px); color: var(--muted);
  max-width: 620px; margin: 0 auto 30px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-note { font-size: 13.5px; margin-bottom: 6px; }
.hero-disclaimer { font-size: 12.5px; color: var(--faint); }

/* screenshot frame */
.screen-wrap { margin: 44px auto 0; max-width: 960px; position: relative; }
.screen-frame {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-screen);
  background: #10151c;   /* matches the dark app chrome so edges blend */
  line-height: 0;
}
.screen-frame img { width: 100%; height: auto; display: block; }

/* ---------- sections ---------- */

.section { padding: 76px 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(24px, 3vw, 30px); text-align: center; margin-bottom: 10px; letter-spacing: -.3px; }
.section-lede { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 40px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.feature { transition: border-color .15s, box-shadow .15s, transform .15s; }
.feature:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-weak);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { stroke: var(--brand); }
.feature h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ---------- steps ---------- */

.steps { margin: 36px 0 40px; counter-reset: step; }
.step { position: relative; padding: 0 12px; }
.step-num {
  width: 40px; height: 40px; margin: 0 auto 14px;
  border-radius: 999px; background: var(--brand); color: var(--brand-fg);
  font: 600 17px/40px var(--mono); text-align: center;
  box-shadow: 0 0 0 6px var(--brand-weak);
}
.step p { color: var(--muted); font-size: 14.5px; max-width: 240px; margin: 0 auto; }
@media (min-width: 621px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 20px; left: calc(50% + 34px); right: calc(-50% + 34px);
    border-top: 2px dashed var(--border-strong);
  }
}

/* ---------- pricing ---------- */

.price-teaser, .price-card { text-align: center; position: relative; display: flex; flex-direction: column; }
.price-teaser h3, .price-card h3 { font-size: 17px; }
.price { font-size: 40px; font-weight: 700; margin: 10px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.price .currency { font-size: 20px; font-weight: 600; vertical-align: 12px; margin-right: 2px; }
.price .per { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.price-sub { color: var(--muted); font-size: 13px; min-height: 20px; }

ul.plain { list-style: none; padding: 0; margin: 16px 0 22px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; flex: 1; }
ul.plain li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }

.highlight { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow-md); }
.ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: var(--brand-fg);
  font-size: 12px; font-weight: 600; padding: 3px 14px; border-radius: 999px;
  box-shadow: var(--shadow-sm); white-space: nowrap;
}

.billing-toggle { display: flex; justify-content: center; gap: 4px; margin: 20px 0 30px; }
.billing-toggle button {
  border: 1px solid var(--border-strong); background: var(--card); color: var(--muted);
  padding: 7px 20px; font: 500 14px var(--font); cursor: pointer;
}
.billing-toggle button:first-child { border-radius: 999px 0 0 999px; }
.billing-toggle button:last-child { border-radius: 0 999px 999px 0; }
.billing-toggle button.active { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: var(--radius-lg);
  color: #fff; text-align: center; padding: 52px 32px;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, .82); margin-bottom: 24px; }
.cta-band .btn-ghost { background: #fff; color: var(--brand); border-color: transparent; }
.cta-band .btn-ghost:hover { background: #f0f4fb; color: var(--brand-strong); }

/* ---------- forms / auth ---------- */

.auth-wrap { padding: 64px 0 90px; }
.auth-card { max-width: 400px; margin: 0 auto; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .lede { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

label { display: block; font-size: 13.5px; font-weight: 500; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number] {
  width: 100%; padding: 10px 13px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: 400 14.5px var(--font);
  transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
input::placeholder { color: var(--faint); }

.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 18px; gap: 2px; }
.tabs button {
  background: none; border: none; color: var(--muted);
  padding: 9px 14px; font: 500 14.5px var(--font); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--faint); font-size: 12.5px; margin: 18px 0;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

.btn-col { display: grid; gap: 10px; }

.form-error { color: var(--danger); font-size: 13.5px; min-height: 20px; margin-top: 10px; }
.form-ok { color: var(--ok); font-size: 13.5px; }

.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }

/* activation code */
.act-code {
  font: 600 30px/1.2 var(--mono); letter-spacing: 5px; text-align: center;
  background: var(--bg); border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 18px 10px; margin: 16px 0;
}
.device-meta { color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 18px; }

/* ---------- console ---------- */

.console-wrap { padding: 44px 0 90px; }
.page-title { font-size: 24px; margin-bottom: 22px; letter-spacing: -.3px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat-value .unit { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
}
.badge-brand { background: var(--brand-weak); color: var(--brand); }
.badge-ok { background: var(--ok-weak); color: var(--ok); }
.badge-warn { background: var(--warn-weak); color: var(--warn); }
.badge-muted { background: var(--bg-soft); color: var(--muted); }
.badge-danger { background: var(--danger-weak); color: var(--danger); }

.table-scroll { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
table.data th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px;
  border-bottom: 1px solid var(--border); padding: 8px 12px; white-space: nowrap;
}
table.data td {
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: color-mix(in srgb, var(--brand) 3%, transparent); }

.section-card { margin-bottom: 18px; }
.section-card h2 { font-size: 16.5px; margin-bottom: 14px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.danger-zone h2 { color: var(--danger); }

.banner {
  border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin-bottom: 18px;
  border: 1px solid;
}
.banner-ok { background: var(--ok-weak); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.banner-warn { background: var(--warn-weak); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

/* ---------- download page ---------- */

.dl-wrap { padding: 64px 0 90px; text-align: center; }
.dl-wrap h1 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 10px; letter-spacing: -.4px; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 20px; justify-content: center; margin: 40px 0 26px; }
@media (max-width: 720px) { .dl-grid { grid-template-columns: minmax(0, 340px); } }
.dl-card { text-align: center; }
.dl-icon { width: 56px; height: 56px; margin: 6px auto 14px; color: var(--brand); }
.dl-icon svg { width: 100%; height: 100%; }
.dl-card h3 { font-size: 18px; margin-bottom: 4px; }
.dl-card .muted { font-size: 13px; margin-bottom: 18px; }
.dl-tips { max-width: 560px; margin: 8px auto 0; text-align: left; }
.dl-tips summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.dl-tips p { font-size: 13px; color: var(--muted); margin: 8px 0 0 14px; }

/* ---------- legal ---------- */

.legal-wrap { padding: 52px 0 90px; }
.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body h1 { font-size: 26px; margin-bottom: 18px; }
.legal-body h2 { font-size: 19px; margin: 30px 0 10px; }
.legal-body h3 { font-size: 16px; margin: 22px 0 8px; }
.legal-body p, .legal-body li { color: var(--muted); font-size: 14.5px; }
.legal-body ul, .legal-body ol { padding-left: 22px; margin: 10px 0; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.legal-body th, .legal-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.legal-body th { background: var(--bg-soft); }
.legal-body blockquote { border-left: 3px solid var(--brand); padding: 4px 16px; margin: 14px 0; background: var(--bg-soft); border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 52px 0 32px; margin-top: 0; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 28px; margin-bottom: 34px; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-size: 13px; color: var(--fg); margin-bottom: 12px; font-weight: 600; }
.footer-col a { display: block; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--fg); }
.footer-brand { margin-bottom: 6px; }
.footer-col p { font-size: 13.5px; }
.footer-legal {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint);
}
.footer-legal a { color: var(--faint); }
.footer-legal a:hover { color: var(--muted); }
.footer-disclaimer { font-size: 12.5px; color: var(--faint); margin-top: 10px; }

/* ---------- toast ---------- */

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--fg); color: var(--bg);
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow-md); z-index: 100;
}

/* ---------- qr ---------- */

.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px 0; }
.qr-box canvas { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: #fff; }

/* ---------- responsive nav ---------- */

@media (max-width: 640px) {
  .site-nav { gap: 16px; }
  .site-nav a:not(.btn) { font-size: 13.5px; }
  .hero { padding: 56px 0 30px; }
  .section { padding: 56px 0; }
}

/* ---------- page-vocabulary layer (classes the templates already use) ---------- */

.auth-title { font-size: 22px; margin-bottom: 18px; }
.reg-link { cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 500; }
.tab-panel { margin-top: 4px; }
form .btn-block { margin-top: 16px; }

.device-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin: 14px 0 18px; display: grid; gap: 8px;
}
.device-line { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.device-line code { font-family: var(--mono); background: var(--brand-weak); color: var(--brand); padding: 0 8px; border-radius: 6px; }
.notice {
  background: var(--warn-weak); color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px;
}
.btn-row { display: flex; gap: 12px; justify-content: center; margin: 8px 0 10px; flex-wrap: wrap; }
.btn-danger-ghost { background: var(--card); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-danger-ghost:hover { background: var(--danger-weak); color: var(--danger); }
.big-ok {
  width: 64px; height: 64px; margin: 8px auto 16px; border-radius: 999px;
  background: var(--ok-weak); color: var(--ok);
  font: 700 30px/64px var(--font); text-align: center;
}

.console-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.console-head h1 { font-size: 24px; letter-spacing: -.3px; }
.stat { text-align: left; }
.stat-unit { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-wrap th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; border-bottom: 1px solid var(--border); padding: 8px 12px; white-space: nowrap; }
.table-wrap td { padding: 9px 12px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.table-wrap tr:last-child td { border-bottom: none; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
.plan-grid, .pack-grid { margin-top: 26px; }
.plan, .pack { text-align: center; display: flex; flex-direction: column; }
.pack .price { font-size: 30px; }
.tier { font-size: 17px; font-weight: 600; }
.tag { display: inline-block; background: var(--brand-weak); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-left: 6px; }
.buy-btn { margin-top: auto; }

.cycle-toggle { display: inline-flex; margin: 18px auto 8px; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.cycle-toggle button { border: none; background: var(--card); color: var(--muted); padding: 7px 22px; font: 500 14px var(--font); cursor: pointer; }
.cycle-toggle button.active { background: var(--brand); color: var(--brand-fg); }

.form-narrow { max-width: 400px; }

.modal { position: fixed; inset: 0; background: rgba(10, 14, 20, .55); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 28px; max-width: 420px; width: 100%; }

.legal-nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; font-size: 13.5px; }
.legal-nav a { color: var(--muted); }
.legal-nav a.active, .legal-nav a:hover { color: var(--brand); }
.legal-doc { max-width: 760px; margin: 0 auto; }
.legal-doc h1 { font-size: 26px; margin-bottom: 18px; }
.legal-doc h2 { font-size: 19px; margin: 30px 0 10px; }
.legal-doc h3 { font-size: 16px; margin: 22px 0 8px; }
.legal-doc p, .legal-doc li { color: var(--muted); font-size: 14.5px; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; margin: 10px 0; }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.legal-doc th, .legal-doc td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.legal-doc th { background: var(--bg-soft); }
.legal-doc blockquote { border-left: 3px solid var(--brand); padding: 4px 16px; margin: 14px 0; background: var(--bg-soft); border-radius: 0 var(--radius) var(--radius) 0; }

.faq { max-width: 720px; margin: 30px auto 0; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 14.5px; }
.faq p { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* homepage: dark glass nav so the bar sits naturally on the ripple hero */

.brand,
.brand:hover { color: #fff; }
/* Direct child only. As a descendant selector this outranked the dropdown's own
   colours and painted the menu's text near-white on its white card. */
.site-nav > a:not(.btn) { color: rgba(220, 231, 247, .78); }
.site-nav > a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, .12); }
.site-nav > a.active { color: #fff; }

/* ---------- workspace starting spinner ---------- */
.spinner {
  width: 34px; height: 34px; border-radius: 999px;
  border: 3px solid var(--brand-weak); border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Information architecture aligned to the AgentsDance reference: a nav of
   dropdown sections, a hero whose primary control is a composer (not a button
   pair), and a pricing page with a billing-period switch. The visual identity
   stays ours — the blue ripple, not the reference's warm neutrals.
   ========================================================================== */

/* ---------- nav dropdowns ----------
   Geometry lifted from the AgentsDance header so the two products feel like one
   family: 8px panel padding, 16px corner, one 12px-padded row per item, a 36px
   icon tile, 13.5px semibold title over a 12px grey description. The palette
   stays ours — the tile and the hover carry the ripple blue, not warm beige. */
.nav-group { position: relative; }
.nav-group > button {
  display: inline-flex; align-items: center; gap: 4px;
  margin: -7px 0; padding: 7px 11px; border: 0; border-radius: 9px;
  background: none; cursor: pointer;
  color: var(--muted); font: 500 14.5px var(--font);
  transition: color .15s ease, background .15s ease;
}
.nav-group > button:hover,
.nav-group[data-open="true"] > button { color: var(--fg); background: var(--brand-weak); }
.nav-group > button svg { width: 13px; height: 13px; transition: transform .18s ease; }
.nav-group[data-open="true"] > button svg { transform: rotate(180deg); }

.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  width: 420px; padding: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 34, 66, .16), 0 2px 8px rgba(15, 34, 66, .06);
  display: grid; grid-template-columns: 1fr; gap: 1px;
}
.nav-menu[hidden] { display: none; }
/* The pointer has to cross the 10px gap between trigger and panel. Without this
   bridge the group's :hover ends mid-travel and the menu shuts before a click. */
.nav-menu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav-menu-2col { width: 660px; grid-template-columns: 1fr 1fr; column-gap: 4px; }

.nav-menu a {
  display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: start;
  padding: 12px; border-radius: 12px; color: var(--fg);
  transition: background .14s ease;
}
.nav-menu a:hover { background: var(--brand-weak); }
/* Both coordinates are explicit: strong/span claim column 2, so auto-placement
   would otherwise push the tile out of column 1 and stack it above the title. */
.nav-ico {
  grid-column: 1; grid-row: 1 / span 2; align-self: start;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 9%, var(--card));
  color: var(--fg);
}
.nav-menu strong { grid-column: 2; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--fg); }
/* :not(.nav-ico) is load-bearing — the icon tile is itself a <span>, and the
   plain `.nav-menu span` form outranks `.nav-ico` on specificity, so it dragged
   the tile into column 2 and stacked it above the title. */
.nav-menu span:not(.nav-ico) { grid-column: 2; margin-top: 2px; font-size: 12px; line-height: 1.55; color: var(--faint); }

/* The landing page paints nav text near-white for the dark hero; the panel is
   its own light surface, so it takes the normal ink back. */
.nav-group > button { color: rgba(220, 231, 247, .78); }
.nav-group > button:hover,
.nav-group[data-open="true"] > button { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-menu a,
.nav-menu strong { color: var(--fg); }
.nav-menu span:not(.nav-ico) { color: var(--faint); }
/* Hide the product/solutions menus on a phone — but NOT the account menu.
   Blanket-hiding .nav-group took 控制台 / 团队 / 退出登录 with it, leaving a
   signed-in phone user with no way to reach their account or sign out. */
@media (max-width: 860px) { .nav-group:not(.nav-group-end) { display: none; } }

/* ---------- right-hand account control ----------
   The nav row itself is state-independent; everything that changes when you
   sign in lives here, so the logged-in header is the logged-out header plus an
   avatar rather than a different arrangement of links. */
.nav-account { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-signin { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav-signin:hover { color: var(--fg); }
.nav-avatar-btn { padding: 4px 6px 4px 4px; gap: 3px; margin: 0; }
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
}
.nav-group-end .nav-menu { left: auto; right: 0; width: 260px; }
.nav-menu-compact a { grid-template-columns: 1fr; }
.nav-menu-compact strong, .nav-menu-compact span:not(.nav-ico) { grid-column: 1; }
.nav-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.nav-menu-head strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--fg); }
.nav-menu-head span { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.nav-menu-quiet strong { color: var(--muted) !important; font-weight: 500 !important; }
.nav-signin { color: rgba(220, 231, 247, .78); }
.nav-signin:hover { color: #fff; }
.nav-menu-head strong { color: var(--fg); }
@media (max-width: 470px) { .nav-signin { display: none; } }


/* ---------- hero composer (the homepage's primary control) ---------- */
/* The hero was a two-column grid (copy | screenshot). Leading with a composer
   makes it one centred column, so the grid is explicitly undone here rather
   than left to fight the new layout. */
.hero-dark-inner.hero-center {
  display: block; max-width: 820px; margin: 0 auto; text-align: center;
  /* Trimmed from 104px: with the download row added, the closing line landed
     exactly on the fold and read as a rendering fault rather than as content
     continuing below. */
  padding-top: 76px; padding-bottom: 64px;
}
.hero-center { text-align: center; }
.hero-center h1 {
  font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -1.4px;
  font-weight: 700; color: #fff; text-wrap: balance;
}
.hero-center .hero-sub-dark { margin: 16px auto 0; max-width: 620px; font-size: clamp(15px, 1.6vw, 17.5px); }

.composer {
  margin: 30px auto 0; max-width: 720px; text-align: left;
  background: rgba(255, 255, 255, .97); border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px; box-shadow: 0 18px 48px -18px rgba(4, 14, 32, .6);
  padding: 16px 16px 12px; transition: box-shadow .2s ease;
}
.composer:focus-within { box-shadow: 0 22px 60px -18px rgba(4, 14, 32, .72); }
.composer textarea {
  width: 100%; min-height: 56px; max-height: 200px; resize: none; border: 0; outline: 0;
  background: none; color: var(--fg); font: 15.5px/1.6 var(--font);
}
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.composer-hint { color: var(--faint); font-size: 12.5px; }
.composer-send {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: var(--brand); color: #fff; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.composer-send:hover { background: var(--brand-strong); transform: translateY(-1px); }
.composer-send:disabled { background: var(--border-strong); cursor: not-allowed; transform: none; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 18px auto 0; max-width: 760px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: rgba(233, 240, 251, .92);
  font-size: 13.5px; cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.chip:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .38); color: #fff; }

.hero-checks {
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center;
  margin: 26px auto 0; color: rgba(214, 227, 245, .8); font-size: 13.5px;
}
.hero-checks span { display: inline-flex; align-items: center; gap: 7px; }
.hero-checks svg { width: 14px; height: 14px; color: #5fd39a; flex: none; }

/* ---------- pricing period switch ---------- */
.period-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card);
}
.period-switch button {
  border: 0; border-radius: 999px; padding: 8px 18px; background: none; cursor: pointer;
  color: var(--muted); font: 500 14px var(--font);
}
.period-switch button[aria-pressed="true"] { background: var(--fg); color: #fff; }
.save-badge { color: var(--ok); font-weight: 600; font-size: 13px; margin-left: 6px; }

.price-was { color: var(--faint); text-decoration: line-through; font-size: 17px; font-weight: 500; margin-left: 6px; }
.off-badge {
  display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 6px;
  background: var(--ok-weak); color: var(--ok); font-size: 12px; font-weight: 650;
}
.plan-note { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
.plan-popular { position: relative; border-color: var(--brand); }
.plan-flag {
  position: absolute; inset: -1px -1px auto -1px; padding: 6px; border-radius: 15px 15px 0 0;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 650; text-align: center;
}
.plan-popular .plan-body { padding-top: 34px; }

/* ---------- split-screen auth (reference layout, our palette) ---------- */
.auth-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 100vh; }
.auth-aside {
  position: relative; overflow: hidden; padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #0b1c38; color: #fff;
}
.auth-aside #hero-waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 {
  font-size: clamp(26px, 3vw, 36px); line-height: 1.18; letter-spacing: -.6px; font-weight: 700;
  max-width: 420px;
}
.auth-points { display: grid; gap: 20px; margin-top: 26px; max-width: 430px; }
.auth-point { display: flex; gap: 12px; }
.auth-point .tick {
  width: 20px; height: 20px; flex: none; border-radius: 999px; margin-top: 2px;
  display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #8fd7b0;
}
.auth-point b { display: block; font-size: 14.5px; font-weight: 600; }
.auth-point span { display: block; margin-top: 3px; color: rgba(214, 227, 245, .72); font-size: 13px; line-height: 1.6; }
.auth-aside footer { color: rgba(214, 227, 245, .5); font-size: 12.5px; }

.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-panel { width: 100%; max-width: 400px; }
.auth-panel .card { padding: 30px 28px; }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin: 18px 0 22px; }
.auth-tabs button {
  border: 0; background: none; padding: 0 0 10px; cursor: pointer; margin-bottom: -1px;
  color: var(--muted); font: 500 14.5px var(--font); border-bottom: 2px solid transparent;
}
.auth-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--brand); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--faint); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-back { text-align: center; margin-top: 18px; }
.auth-back a { color: var(--muted); font-size: 13.5px; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ---------- workspace paywall ---------- */
.paywall { max-width: 560px; margin: 0 auto; text-align: center; }
.paywall .offer {
  margin: 24px 0; padding: 26px; border: 1px solid var(--brand);
  border-radius: var(--radius-lg); background: var(--brand-weak);
}
.paywall .offer .price { font-size: 42px; font-weight: 700; letter-spacing: -1px; color: var(--fg); }
.paywall .offer .per { color: var(--muted); font-size: 15px; }
.paywall ul { text-align: left; max-width: 360px; margin: 20px auto 0; display: grid; gap: 10px; }
.paywall li { display: flex; gap: 9px; color: var(--muted); font-size: 14px; }
.paywall li svg { width: 15px; height: 15px; color: var(--ok); flex: none; margin-top: 3px; }

/* ---------- section eyebrow (reference pattern: pill label above headline) ---------- */
.eyebrow {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--brand-weak); color: var(--brand); font-size: 12.5px; font-weight: 650;
  letter-spacing: .3px; margin-bottom: 14px;
}

/* screen-reader-only label (composer, form controls) */
.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;
}

/* ---------- content lists used by the marketing sections ---------- */
.check-list { display: grid; gap: 9px; margin-top: 14px; }
.check-list li {
  position: relative; padding-left: 24px; color: var(--muted); font-size: 14.5px; line-height: 1.65;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 8px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.check-list li b { color: var(--fg); font-weight: 600; }

.step-list { counter-reset: step; display: grid; gap: 12px; margin-top: 14px; }
.step-list li {
  counter-increment: step; position: relative; padding-left: 34px;
  color: var(--muted); font-size: 14.5px; line-height: 1.7;
}
.step-list li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center;
  background: var(--brand-weak); color: var(--brand); font-size: 12.5px; font-weight: 700;
}
.step-list li b { color: var(--fg); font-weight: 600; }

.code-block {
  margin-top: 14px; padding: 14px 16px; overflow-x: auto;
  background: #0f1a2e; border-radius: var(--radius);
  color: #d7e3f6; font: 13px/1.75 var(--mono);
}
.code-block code { color: inherit; background: none; padding: 0; }

/* marketing cards read as sections, not compact feature tiles */
.section .card.feature { padding: 28px 30px; text-align: left; }
.section .card.feature h2 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.3px; margin-bottom: 10px; }
.section .card.feature > p { color: var(--muted); font-size: 15px; line-height: 1.75; }

/* inline text button (invite flow, table row actions) — reads as a link, not a control */
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--brand); font: inherit; text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--brand-strong); }

/* usage meter — machine time reads like CI minutes, not like money */
.meter {
  display: block; height: 6px; margin-top: 8px; border-radius: 999px;
  background: var(--bg-soft); overflow: hidden;
}
.meter > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #4d8ae8);
  transition: width .3s ease;
}
.meter.is-full > span { background: var(--warn); }

/* inline cap editor in the team table — reads as a field, stays compact */
.cap-input {
  width: 88px; padding: 5px 8px; border: 1px solid var(--border-strong);
  border-radius: 7px; background: var(--card); color: var(--fg);
  font: 13px var(--mono); font-variant-numeric: tabular-nums;
}
.cap-input:focus { border-color: var(--brand); outline: none; }
.table-wrap { overflow-x: auto; }



/* ---------- pricing cards (structure mirrors the AgentsDance reference so
   entitlements and copy stay portable between the two products) ---------- */
.tier-pill {
  display: inline-block; padding: 2px 9px; border: 2.5px solid var(--fg);
  border-radius: 9px; font-size: 13px; font-weight: 800; letter-spacing: .3px;
  color: var(--fg); text-transform: lowercase;
}
.tier-plain { font-size: 17px; font-weight: 700; color: var(--faint); }
.tier-tagline { margin-top: 9px; color: var(--faint); font-size: 12.5px; line-height: 1.5; min-height: 38px; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.price-now { font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1; color: var(--fg); }
.price-row .per { color: var(--faint); font-size: 12.5px; }
.plan .btn { margin-top: 18px; }
.plan .plain { margin-top: 18px; }
.plan .plain li { text-align: left; }


/* ---------- per-tier model list (every plan can use every model; credits are
   the only gate, so the list is identical and the multiplier is the price) --- */
.model-list { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.model-list summary {
  cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none;
}
.model-list summary::-webkit-details-marker { display: none; }
.model-list summary::before { content: "▸ "; color: var(--faint); }
.model-list[open] summary::before { content: "▾ "; }
.model-rows { max-height: 260px; overflow-y: auto; margin-top: 10px; }
.model-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 4px 0; font-size: 12.5px;
}
.model-row b { font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-row span { color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }

/* ---------- hero: the two doors (cloud above, desktop here) ---------- */
/* ---------- hero download row (every build, one click) ----------
   Modelled on the reference desktop site: solid light buttons on the dark hero,
   platform mark + build name, with the GitHub link and the real download count
   sitting quietly underneath. */
.hero-dl { margin: 28px auto 0; max-width: 760px; }
.hero-dl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 18px; border-radius: 12px;
  background: #fff; color: #14213d; border: 1px solid rgba(255, 255, 255, .6);
  transition: transform .15s ease, box-shadow .15s ease;
}
.dl-btn:hover { color: #14213d; transform: translateY(-1px); box-shadow: 0 12px 28px -12px rgba(4, 14, 32, .8); }
.dl-btn span { display: flex; flex-direction: column; line-height: 1.25; }
.dl-btn b { font-size: 14px; font-weight: 650; }
.dl-btn i { font-style: normal; font-size: 11.5px; color: #5c6673; margin-top: 1px; }
.hero-dl-foot {
  margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 8px 22px; font-size: 12.5px; color: rgba(214, 227, 245, .72);
}
.dl-link, .dl-count { display: inline-flex; align-items: center; gap: 6px; }
.dl-link { color: rgba(214, 227, 245, .82); }
.dl-link:hover { color: #fff; }
.dl-count b { color: #fff; font-weight: 650; }

/* ---------- model strip on the homepage ---------- */
.model-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px 20px; max-height: 300px; overflow-y: auto; margin-top: 22px;
  padding: 16px 18px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}

/* ---------- 个人成品 (what the agent built) ----------
   Cards, not a bullet list: these are finished things the user asked for, and a
   list of blue underlined filenames reads like a directory index — which is
   literally what it was. The tile colour encodes type so a deck, a page and a
   script are separable at a glance. */
.works-grid {
  margin-top: 26px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.work-card {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 13px;
  padding: 14px 15px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card); color: var(--fg);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.work-card:hover {
  color: var(--fg); border-color: var(--border-strong);
  box-shadow: var(--shadow-md); transform: translateY(-1px);
}
.work-ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 9%, var(--card)); color: var(--brand);
}
.work-ico-deck { background: color-mix(in srgb, #d97706 12%, var(--card)); color: #b45309; }
.work-ico-doc  { background: color-mix(in srgb, #0891b2 12%, var(--card)); color: #0e7490; }
.work-ico-img  { background: color-mix(in srgb, #7c3aed 12%, var(--card)); color: #6d28d9; }
.work-ico-dir  { background: color-mix(in srgb, var(--muted) 14%, var(--card)); color: var(--muted); }
.work-body { min-width: 0; }
.work-body strong {
  display: block; font-size: 14px; font-weight: 600; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.work-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--faint); }
.work-go { color: var(--faint); flex: none; }
.work-card:hover .work-go { color: var(--brand); }
.works-sub { margin-top: 38px; font-size: 17px; font-weight: 650; }

.works-empty {
  border: 1px dashed var(--border-strong); border-radius: 16px;
  padding: 46px 24px; text-align: center; color: var(--muted);
}
.works-empty svg { color: var(--faint); }
.works-empty h3 { margin-top: 12px; font-size: 17px; font-weight: 650; color: var(--fg); }
.works-empty p { margin: 6px 0 18px; font-size: 13.5px; }

/* ---------- GitHub star badge ----------
   Sits beside the wordmark, reads as metadata rather than as a control. Only
   rendered when the repo is publicly visible (see app/github_stars.py). */
.star-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  margin-left: 2px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted); font-size: 12px; line-height: 1.6;
}
.star-badge:hover { color: var(--fg); border-color: var(--border-strong); }
.star-badge b { font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; }
.star-badge {
  border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08);
  color: rgba(220, 231, 247, .8);
}
.star-badge:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }
.star-badge b { color: #fff; }

/* ---------- anchor landing ----------
   The header is sticky, so an in-page jump put the target's first line under
   it: clicking 「云端 Harness」 landed with the card's own label hidden behind
   the bar. scroll-margin-top reserves the header height plus breathing room so
   the whole card starts below it. Applied to every jump target, not just the
   ones reported — every dropdown entry had the same fault. */
:target,
[id]:target,
.card[id], section[id], div[id].feature {
  scroll-margin-top: 88px;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- consistent chrome on every page ----------
   The ripple blue used to live only on the homepage, so every inner page read
   as a different product. The header now carries it everywhere, with a short
   gradient beneath so the dark bar resolves into the page instead of ending in
   a hard seam. The homepage's own canvas sits on top of this and hides it. */
body:not([data-page="landing"]) .site-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 140px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 28, 56, .40), rgba(11, 28, 56, 0));
}
body:not([data-page="landing"]) .section:first-of-type { position: relative; z-index: 1; }

/* ---------- phone header ----------
   The row is brand + links + two CTA buttons + account. On a 390px phone that
   needs 637px, so the browser scaled the whole page down: the header background
   stopped covering the viewport, the buttons hung off the right edge, and every
   table below inherited the widened viewport. Nothing here is a table bug — the
   header was the only thing overflowing.

   Order of sacrifice on a narrow screen: nav links (they are in the footer and
   the dropdowns are already hidden), then button padding, then the wordmark —
   the two ways into the product are the last thing to give up. */
@media (max-width: 760px) {
  .nav-row { gap: 12px; height: 58px; }
  .site-nav > a:not(.btn) { display: none; }
  .nav-account { gap: 8px; }
  .nav-account .btn-sm { padding: 7px 11px; font-size: 13px; white-space: nowrap; }
  .brand-name { font-size: 15px; }
}
@media (max-width: 470px) {
  /* The wordmark is 22 characters; at this width it costs more than it earns.
     The logo mark still links home and the <title> still names the site. */
  .brand-name { display: none; }
  .nav-account .btn-sm { padding: 7px 9px; font-size: 12.5px; }
}

/* ---------- language switch ----------
   Sits with the account controls, deliberately quieter than them: switching
   language is a preference, not an action someone came here to perform. */
.lang-switch {
  flex: none; padding: 5px 9px; border-radius: 7px;
  border: 1px solid var(--rule, rgba(255, 255, 255, .2));
  color: rgba(220, 231, 247, .8); font-size: 12.5px; font-weight: 600;
  letter-spacing: .02em; line-height: 1.3;
}
.lang-switch:hover { color: #fff; border-color: rgba(255, 255, 255, .45); }
@media (max-width: 470px) { .lang-switch { padding: 5px 7px; font-size: 12px; } }

/* ---------- currency picker ----------
   Lives beside the pricing page's monthly/yearly toggle, on the light page
   surface — NOT in the dark nav, so it takes none of `.nav-group`'s colours.
   It reuses .nav-menu for the panel (and the [data-nav-group] open/close
   behaviour) but has to declare its own positioning context, which .nav-group
   would otherwise have supplied. */
.cycle-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; margin: 18px 0 8px;
}
/* The toggle centres itself with auto margins when it stands alone; inside the
   row those margins fight the flex centring and push the picker to the edge. */
.cycle-row .cycle-toggle { margin: 0; }

.cur-picker { position: relative; }
.cur-picker > button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--card);
  color: var(--muted); font: 500 14px var(--font);
  transition: color .15s ease, border-color .15s ease;
}
.cur-picker > button:hover,
.cur-picker[data-open="true"] > button { color: var(--fg); border-color: var(--brand); }
.cur-picker > button svg { width: 12px; height: 12px; transition: transform .18s ease; }
.cur-picker[data-open="true"] > button svg { transform: rotate(180deg); }
.cur-picker .cur-code { white-space: nowrap; }
.nav-menu-cur { width: 176px; left: 50%; transform: translateX(-50%); padding: 6px; text-align: left; }
.nav-menu-cur a {
  grid-template-columns: 16px auto 1fr; column-gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 9px;
}
/* Each row is its own grid, so an `auto` first column would size to that row's
   own symbol and the codes would step in and out. Fixed column, symbol
   right-aligned: every glyph ends at the same edge, a fixed gap from the code. */
.nav-menu-cur b {
  grid-column: 1; justify-self: end; white-space: nowrap;
  font-size: 13.5px; font-weight: 600; color: var(--fg);
}
/* The generic `.nav-menu span:not(.nav-ico)` rule pins spans to column 2 and
   greys them; these are labels in their own right, so both are restated. */
.nav-menu-cur span:not(.nav-ico) {
  grid-column: 2; margin-top: 0; font-size: 13px; font-weight: 600; color: var(--fg);
}
.nav-menu-cur em {
  grid-column: 3; justify-self: end; font-style: normal;
  font-size: 11px; color: var(--faint);
}
/* Hover and selected must not look alike. The shared `.nav-menu a:hover` paints
   --brand-weak, the exact fill the selected row uses, so a pointer resting
   anywhere in the list made it read as two currencies chosen at once. Hover
   goes neutral; selected keeps the brand fill AND takes brand ink, so it is
   still obvious once the pointer leaves. */
.nav-menu-cur a:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.nav-menu-cur a.active,
.nav-menu-cur a.active:hover { background: var(--brand-weak); }
.nav-menu-cur a.active b,
.nav-menu-cur a.active span:not(.nav-ico) { color: var(--brand); font-weight: 700; }
@media (max-width: 470px) {
  .cur-picker > button { padding: 6px 10px; font-size: 13px; }
}

/* ---------- pricing ribbon ----------
   .ribbon is absolutely positioned but its card was `static`, so it resolved
   against the page and floated up under the header instead of sitting on the
   Pro card. Present in both languages — it predates the translation work. */
.card.plan { position: relative; }

/* CTA buttons carry a mark, the way Cloudflare's do — the icon says which of
   the two ways in this is before the label is read. */
.nav-account .btn-sm { display: inline-flex; align-items: center; gap: 6px; }
.nav-account .btn-sm svg { flex: none; opacity: .9; }

/* Android card supports QR installation without transferring through a desktop.
   二维码由 tinyQR 在前端画, 不产生额外请求。 */
.dl-qr { margin-top: 14px; text-align: center; }
.dl-qr canvas { border-radius: 8px; background: #fff; padding: 6px; box-shadow: 0 1px 4px rgb(15 23 42 / 10%); }
.dl-qr-note { margin-top: 6px; font-size: 13px; }

/* A visitor bounced here by a quota gate needs the reason before the prices. */
.gate-notice {
  max-width: 640px; margin: 14px auto 0; padding: 11px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-radius: 12px; background: var(--brand-weak);
  color: var(--fg); font-size: 14px; line-height: 1.6; text-align: center;
}

.works-asleep {
  max-width: 720px; margin: 22px auto 0; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  color: var(--muted); font-size: 13.5px; line-height: 1.6; text-align: center;
}

/* API keys */
.key-form { display: flex; gap: 8px; margin: 12px 0 4px; }
.key-form input { flex: 1; min-width: 0; }
.key-reveal { margin: 12px 0; padding: 12px 14px; border-radius: 10px;
  background: #f0f7ff; border: 1px solid #cfe3ff; }
.key-reveal-note { margin: 0 0 8px; font-size: 13px; color: #1b4a8a; }
.key-reveal-row { display: flex; gap: 8px; align-items: center; }
.key-reveal-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  font-size: 13px; padding: 6px 8px; background: #fff; border-radius: 6px; }
.key-usage { margin-top: 6px; padding: 12px; border-radius: 8px; background: #0f172a;
  color: #e2e8f0; font-size: 12.5px; overflow-x: auto; }
td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* ---------- 云空间 (/apps): 16 产品卡片网格 ---------- */
.apps-hero { padding-bottom: 26px; }
.apps-count { margin-top: 10px; }
.apps-grid { gap: 16px; }
.app-card { display: flex; flex-direction: column; padding: 20px; text-decoration: none; color: inherit; }
.app-card h3 { font-size: 15.5px; margin: 12px 0 2px; }
.app-card p { color: var(--muted); font-size: 13px; line-height: 1.55; flex: 1; margin-top: 8px; }
.app-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.app-icon { width: 40px; height: 40px; border-radius: 10px; }
.app-cat { color: var(--muted); font-size: 11.5px; letter-spacing: .3px; text-transform: uppercase; }
.app-card.is-soon { opacity: .62; }
.app-card.is-soon:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }
.app-badge { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.app-badge.live { color: var(--ok); background: var(--ok-weak); }
.app-badge.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.app-badge.soon { color: var(--muted); border: 1px solid var(--border); }
.app-enter { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--brand); font-size: 13.5px; font-weight: 600; }
.app-card.is-live:hover .app-enter svg { transform: translateX(3px); }
.app-enter svg { transition: transform .15s; }

/* 主页旗舰区块: 左 DSH 深色面板 (composer 是为深色底设计的, 面板沿用 hero 的
   底色让它原样好看), 右 ComfyUI 浅色卡。 */
.flag-grid { align-items: stretch; }
.flag-panel { background: linear-gradient(160deg, #0d1930, #132648 70%, #16305c);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-lg);
  padding: 30px 28px; color: #e8eefb; display: flex; flex-direction: column; }
.flag-panel h3 { font-size: 21px; margin: 10px 0 8px; color: #fff; }
.flag-panel > p { color: #b8c7e4; font-size: 14.5px; line-height: 1.65; }
.flag-panel .composer { margin: 20px 0 0; max-width: none; }
.flag-panel .chips { justify-content: flex-start; margin: 14px 0 0; max-width: none; }
.flag-card { display: flex; flex-direction: column; padding: 30px 28px; }
.flag-card h3 { font-size: 21px; margin: 10px 0 8px; }
.flag-card > p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.flag-models { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.flag-models span { font-size: 12.5px; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); background: var(--card); }

/* ---------- 首屏即货架: hero 里的 16 格紧凑瓦片, 一屏装完 ---------- */
.hero-fit .hero-dark-inner.hero-center { max-width: 1120px; padding-top: 44px; padding-bottom: 40px; }
.hero-fit .hero-center h1 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.8px; }
.hero-fit .hero-center .hero-sub-dark { max-width: 780px; font-size: clamp(14px, 1.35vw, 15.5px); margin-top: 12px; }
.hero-fit .hero-checks { margin-top: 18px; font-size: 12.5px; gap: 6px 22px; }
.hero-fit .hero-note-dark { font-size: 12px; }
.hero-apps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin: 26px auto 0; text-align: left;
}
.hero-app {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10);
  color: #eaf0fb; text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s;
}
.hero-app svg { flex: none; color: #8fb0e8; }
.hero-app .ha-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hero-app .ha-txt b { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-app .ha-txt i { font-style: normal; font-size: 11px; color: #93a7cc; }
.hero-app .ha-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .22); margin-left: auto; flex: none; }
.hero-app .ha-dot.on { background: #5fd39a; box-shadow: 0 0 8px rgba(95, 211, 154, .75); }
.hero-app:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .24); transform: translateY(-1px); }
.hero-app.soon { opacity: .58; }
.hero-app.soon:hover { opacity: .8; }
@media (max-width: 900px) { .hero-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 首屏撑满视口: 高个子屏幕上 hero 内容之后不能露出下一节的白底 —— 深蓝一直
   铺到折叠线, 内容在其中垂直居中。矮屏上 min-height 不生效, 照常滚动。 */
.hero-fit .hero-dark-inner.hero-center {
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; justify-content: center; width: 100%;
}
