/* ClawMatrix 静态站点统一样式：无构建链、无外部资源。 */

:root {
  --brand: #07c05f;
  --brand-strong: #049b38;
  --accent: #07c05f;
  --accent-soft: #e9f8ec;
  --bg: #f5f6f7;
  --surface: #ffffff;
  --line: #e7e9ec;
  --ink: #1f2329;
  --muted: #4e5969;
  --muted-light: #86909c;
  --success: #07c05f;
  --success-soft: #e9f8ec;
  --danger: #d54941;
  --danger-soft: #fdecec;
  --warning: #c2660f;
  --warning-soft: #fdf1e3;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(100% - 40px, 1100px);
  margin-inline: auto;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #06b04d, #07c05f);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(7, 192, 95, 0.25);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}

.nav-account {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.nav-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 3px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.nav-avatar-btn:hover {
  background: #f0f1f3;
}

.nav-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b04d, #07c05f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
}

.nav-account-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  display: none;
  min-width: 210px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
}

/* 头像到菜单之间的空隙也算菜单的命中区域，鼠标下滑不会误关 */
.nav-account-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-account.is-open .nav-account-menu {
  display: block;
}

.nav-account-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  padding: 6px 10px 10px;
  border-bottom: 1px solid var(--line);
}

.nav-account-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.nav-account-mail {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.nav-account-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-account-item:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.nav-account-item.is-danger {
  color: #c0392b;
}

.nav-account-item.is-danger:hover {
  background: #fdecea;
}

.nav-badge {
  font-style: normal;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 1px;
}

@media (max-width: 760px) {
  .nav-account {
    border-left: 0;
    padding-left: 0;
  }

  .nav-account-menu {
    right: 0;
  }
}

.nav-link:hover {
  background: #f0f1f3;
  color: var(--ink);
  text-decoration: none;
}

.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

.nav-link.danger {
  color: var(--danger);
}

/* ---------- 导航下拉面板（参照 bigmodel.cn 顶栏） ---------- */
.nav-item {
  position: relative;
  display: inline-flex;
}

.nav-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
}

.nav-caret {
  flex: none;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.15s ease;
}

.nav-item.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 176px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(31, 35, 41, 0.12);
  z-index: 60;
}

/* 悬停桥：触发器与面板之间的空隙也归面板，避免鼠标移过去时面板消失 */
.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-item.is-open .nav-dropdown {
  display: flex;
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
}

.nav-dropdown-link:hover {
  background: #f0f1f3;
  color: var(--ink);
  text-decoration: none;
}

.nav-dropdown-link.is-active {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

/* 分组式两栏面板（文档菜单） */
.nav-dropdown.wide {
  flex-direction: row;
  gap: 30px;
  min-width: 420px;
  padding: 16px;
}

.nav-dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-group-title {
  padding: 4px 12px 6px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* 锚点跳转不被 sticky 顶栏遮住 */
article.card[id] {
  scroll-margin-top: 84px;
}

@media (max-width: 760px) {
  .nav-dropdown {
    position: static;
    transform: none;
    min-width: 0;
    box-shadow: none;
    border: 0;
    padding: 4px 0 4px 12px;
  }

  .nav-dropdown.wide {
    flex-direction: column;
    gap: 8px;
  }

  .nav-dropdown-link {
    white-space: normal;
  }
}

/* ---------- 排版 ---------- */
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 56px;
  text-align: center;
  background:
    radial-gradient(620px 340px at 18% 0%, rgba(7, 192, 95, 0.1), transparent 70%),
    radial-gradient(520px 300px at 82% 12%, rgba(31, 35, 41, 0.05), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f5f6f7 100%);
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hero .lead {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-note {
  margin-top: 18px;
  color: var(--muted-light);
  font-size: 13px;
}

.page-head {
  padding: 54px 0 8px;
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.page-head .lead {
  max-width: 760px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--muted);
  font-size: 14px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.1);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #06b04d;
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
}

.btn-ghost:hover {
  background: #fff;
  border-color: #d7dbe0;
}

.btn-subtle {
  background: var(--accent-soft);
  color: var(--ink);
}

.btn-subtle:hover {
  background: #e9f8ec;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f8cbc7;
}

.btn-danger:hover {
  background: #fdecec;
}

.btn-sm {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

/* ---------- 卡片与网格 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card.flat {
  box-shadow: none;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h3 {
  font-size: 19px;
  line-height: 1.35;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stack {
  display: grid;
  gap: 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.spread {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- 产品与价格 ---------- */
.product-card {
  padding: 26px;
}

.product-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.product-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-title h3 {
  font-size: 21px;
}

.product-sub {
  color: var(--muted);
  font-size: 13px;
}

.product-audience {
  color: var(--muted);
  font-size: 13px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.plan.is-highlight {
  border-color: #b7e3c9;
  background: linear-gradient(180deg, #f7f8f9, #fafbfc);
  box-shadow: 0 1px 2px rgba(7, 192, 95, 0.08);
}

.plan-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.price {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.price small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.price-note {
  min-height: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* 定价卡片：首月活动价 / 原价划线 / 版本限制（与官网首页同一套口径） */
.price-promo {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: middle;
}

.price-was {
  min-height: 18px;
  color: var(--muted-light);
  font-size: 12px;
  text-decoration: line-through;
}

/* 年付活动：首年送月（买 12 送 1）；与首月活动价并列展示 */
.price-annual {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
.price-annual b {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-strong);
}
.price-annual span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.plan-limit {
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.plan-limit b { margin-right: 7px; color: var(--muted-light); font-weight: 600; }

.feature-list {
  display: grid;
  gap: 7px;
  font-size: 13.5px;
  color: #4e5969;
}

.feature-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.feature-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.plan .btn {
  margin-top: auto;
}

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f2f3f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-ok {
  background: var(--success-soft);
  color: var(--success);
}

.badge-coming {
  background: #f2f3f5;
  color: var(--muted-light);
}

.badge-warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-brand {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- 定价页 ---------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #eceef1;
}

.tab {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(31, 35, 41, 0.1);
}

.slider-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.slider-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.seat-value {
  min-width: 34px;
  text-align: center;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}

.quote-box {
  padding: 18px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2fbf5, #fafbfc);
  border: 1px solid #e9f8ec;
}

.quote-label {
  color: var(--muted);
  font-size: 12.5px;
}

.quote-amount {
  margin-top: 4px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.quote-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.liveclaw-line {
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.seat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.seat-quick button {
  min-width: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.seat-quick button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 表格 ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  white-space: nowrap;
}

th {
  padding: 11px 14px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:hover td {
  background: #fafbfc;
}

td.wrap {
  white-space: normal;
  min-width: 180px;
}

.matrix td.yes {
  color: var(--success);
  font-weight: 700;
}

.matrix td.no {
  color: var(--muted-light);
}

/* ---------- 表单 ---------- */
.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > label,
.field-label {
  color: #4e5969;
  font-size: 13.5px;
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dbe0;
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(7, 192, 95, 0.14);
}

.textarea {
  resize: vertical;
  min-height: 104px;
  line-height: 1.6;
}

.field-help {
  color: var(--muted);
  font-size: 12.5px;
}

.form-error {
  display: none;
  padding: 10px 12px;
  border: 1px solid #f8cbc7;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

.form-error.is-visible {
  display: block;
}

.form-note {
  display: none;
  padding: 10px 12px;
  border: 1px solid #d7dbe0;
  border-radius: 9px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 13px;
}

.form-note.is-visible {
  display: block;
}

.form-note code {
  color: var(--ink);
  font-weight: 700;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.checkbox input {
  margin-top: 4px;
  accent-color: var(--accent);
}

/* ---------- 登录 / 注册 ---------- */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: var(--bg, #f5f6f7);
  border: 1px solid var(--line, #e7e9ec);
}

.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted, #4e5969);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.auth-tab:hover {
  color: var(--ink, #1f2329);
}

.auth-tab.is-active {
  background: var(--surface, #fff);
  color: var(--brand, #07c05f);
  box-shadow: 0 1px 2px rgba(31, 35, 41, .08);
}

/* 计费周期切换：月付 / 年付（年付首年送 1 个月） */
.period-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--bg, #f5f6f7);
  border: 1px solid var(--line, #e7e9ec);
}
.period-switch__btn {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted, #4e5969);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.period-switch__btn:hover {
  color: var(--ink, #1f2329);
}
.period-switch__btn.is-active {
  background: var(--surface, #fff);
  color: var(--brand, #07c05f);
  box-shadow: 0 1px 2px rgba(31, 35, 41, .08);
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 34px;
  border-radius: var(--radius);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(145deg, #049b38, #06b04d);
  color: #fff;
  box-shadow: var(--shadow);
}

.auth-aside h2 {
  font-size: 24px;
  line-height: 1.3;
}

.auth-aside p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.auth-aside ul {
  display: grid;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13.5px;
}

.auth-aside li {
  display: flex;
  gap: 9px;
}

.auth-aside li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: #b7e3c9;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f2f3f5;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.step-num {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e7e9ec;
  color: #4e5969;
  font-size: 11px;
}

.step.is-active {
  background: var(--accent-soft);
  color: var(--ink);
}

.step.is-active .step-num {
  background: var(--accent);
  color: #fff;
}

.intent-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.intent-option {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.intent-option strong {
  display: block;
  font-size: 14px;
}

.intent-option span {
  color: var(--muted);
  font-size: 12.5px;
}

.intent-option.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

/* ---------- 下载页 ---------- */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.segment.is-active {
  border-color: var(--ink);
  background: var(--brand);
  color: #fff;
}

.release-list {
  display: grid;
  gap: 12px;
}

.release {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.release-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.release-version {
  font-size: 17px;
  font-weight: 700;
}

.hash {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f8f9;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  white-space: normal;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 24px;
  border: 1px dashed #d7dbe0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eef0f3;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

/* ---------- 工作台 ---------- */
/* 任务引擎选择（智能体 + 知识库） */
.engine-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.engine-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.engine-label {
  flex: 0 0 52px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.engine-row .select {
  flex: 1;
  min-width: 160px;
  padding: 7px 10px;
}

.kb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.kb-chips .chip {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-chips .chip.on {
  border-color: var(--ink);
  background: var(--brand);
  color: #fff;
}

/* 最近任务列表 */
.task-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.task-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.task-item:hover {
  border-color: var(--ink);
}

.task-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* 产物区：执行态与结果态 */
.run-state {
  display: grid;
  gap: 12px;
}

.run-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.spin {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 999px;
  animation: cd-spin 0.8s linear infinite;
}

@keyframes cd-spin {
  to {
    transform: rotate(360deg);
  }
}

.run-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.run-steps li {
  padding: 6px 10px;
  border-radius: 8px;
  background: #f2f3f5;
  color: var(--muted);
  font-size: 12.5px;
}

.answer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.answer-body {
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.65;
}

.answer-body h4 {
  font-size: 14.5px;
  margin-top: 6px;
}

.answer-body ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.answer-body code {
  padding: 1px 6px;
  border-radius: 6px;
  background: #eef0f3;
  font-size: 12.5px;
}

.ref-block {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.ref-block h4 {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.ref-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-list li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  display: grid;
  gap: 3px;
}

.ref-list strong {
  font-size: 12.5px;
}

.ref-list span {
  font-size: 12px;
  color: var(--muted);
}

.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 0 10px;
}

.work-head h1 {
  font-size: 24px;
  letter-spacing: -0.01em;
}

.tenant-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tenant-box .select {
  width: auto;
  min-width: 190px;
  padding: 7px 10px;
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
  gap: 22px;
  align-items: start;
  padding: 12px 0 40px;
}

.prompt-card {
  padding: 22px;
}

.prompt-card h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.prompt-card .textarea {
  min-height: 132px;
  border: 0;
  background: #fafbfc;
  font-size: 15.5px;
  margin-top: 14px;
}

.prompt-card .textarea:focus {
  background: #fff;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.template-card {
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  font-size: 13px;
  color: #4e5969;
}

.template-card:hover {
  border-color: #b7e3c9;
  background: #fafbfc;
}

.template-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13.5px;
}

.template-card span {
  color: var(--muted);
  font-size: 12px;
}

.cap-card {
  margin-top: 22px;
}

.cap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cap-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
  font-size: 13px;
}

.cap-dot {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.output-card {
  position: sticky;
  top: 84px;
}

.output-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 230px;
  padding: 26px;
  border: 1px dashed #d7dbe0;
  border-radius: 12px;
  background: #fafbfc;
  color: var(--muted);
  text-align: center;
  font-size: 13.5px;
}

.scenario-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.scenario-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.scenario-card h4 {
  font-size: 14px;
}

.scenario-card p {
  color: var(--muted);
  font-size: 12px;
}

.scenario-card.is-disabled {
  opacity: 0.6;
  background: #f7f8f9;
}

.children-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.child-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #f7f8f9;
  font-size: 13px;
}

/* ---------- 指标 / 用量 ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.metric-card {
  padding: 24px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  margin-top: 8px;
  font-size: 38px;
  line-height: 1.15;
}

.metric-value {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.metric-foot {
  margin-top: 6px;
  color: var(--muted-light);
  font-size: 12.5px;
}

/* ---------- 席位 ---------- */
.seat-bar {
  display: grid;
  gap: 10px;
}

.seat-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef1;
}

.seat-meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #07c05f, #7ed6a6);
}

.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.kv-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}

.kv-label {
  color: var(--muted);
  font-size: 12px;
}

.kv-value {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
}

.notice {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--warning-soft);
  border: 1px solid #f5d9a8;
  color: #a84b0e;
  font-size: 13px;
}

.notice-danger {
  background: var(--danger-soft);
  border-color: #f8cbc7;
  color: var(--danger);
}

.notice-info {
  background: var(--accent-soft);
  border-color: #cdeedb;
  color: var(--ink);
}

/* ---------- 弹层 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 35, 41, 0.48);
}

.modal-card {
  width: min(100%, 540px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(31, 35, 41, 0.2);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h3 {
  font-size: 19px;
}

.modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
}

/* ---------- 后台 ---------- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-card {
  padding: 20px;
}

.admin-card h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.admin-card .table-wrap {
  border: 0;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-form .input,
.inline-form .select {
  width: auto;
  min-width: 96px;
  padding: 6px 8px;
  font-size: 13px;
}

.json-box {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fafbfc;
  color: #4e5969;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 提示 ---------- */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  box-shadow: 0 10px 26px rgba(31, 35, 41, 0.14);
  animation: toast-in 0.18s ease-out;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-text {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 30px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 12.5px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-layout,
  .work-layout,
  .slider-card {
    grid-template-columns: 1fr;
  }

  .output-card {
    position: static;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    padding: 10px 0;
    flex-direction: column;
    gap: 6px;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
  }

  .grid-2,
  .grid-3,
  .plan-grid,
  .plan-grid.four,
  .metric-grid,
  .kv,
  .template-grid,
  .cap-list,
  .intent-switch {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 54px 0 40px;
  }

  .page-head {
    padding-top: 40px;
  }

  .card,
  .product-card,
  .metric-card,
  .prompt-card {
    padding: 18px;
  }

  .work-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast-container {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 首页 AI 聊天框（对接官网知识库 bot） ===== */

.hero-chat {
  padding: 64px 0 56px;
}

.chat-greet h1 {
  margin-top: 14px;
}

.chat-card {
  max-width: 760px;
  margin: 34px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px;
  text-align: left;
}

.chat-log {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 6px 14px;
}

.chat-msg {
  display: flex;
}

.chat-msg.user {
  justify-content: flex-end;
}

.chat-msg-body {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg.user .chat-msg-body {
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.assistant .chat-msg-body {
  background: var(--accent-soft);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.chat-msg-body.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.chat-msg-body.is-typing::after {
  content: '…';
  animation: chat-blink 1s ease-in-out infinite;
}

/* 客服回答里的 Markdown 管道表（产品/价格类问题几乎必用）。
   气泡默认 82% 宽 + pre-wrap，直接把表格塞进去会被挤成竖条，所以表格单独放宽并可横向滚动。 */
.chat-msg.assistant .chat-msg-body:has(.chat-table-wrap) {
  max-width: 100%;
}

.chat-table-wrap {
  max-width: 100%;
  margin: 8px 0;
  overflow-x: auto;
}

.chat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  /* 客服气泡只有 hero 面板那么宽，产品/价格表常有 5 列。固定布局让列宽均分、长文本换行，
     否则表格按内容撑开会横向溢出，访客只能看到右半边。 */
  table-layout: fixed;
}

.chat-table th,
.chat-table td {
  border: 1px solid rgba(31, 35, 41, 0.14);
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.chat-table th {
  background: rgba(31, 35, 41, 0.05);
  font-weight: 600;
}

@keyframes chat-blink {
  0%,
  100% {
    opacity: 0.2;
  }

  50% {
    opacity: 1;
  }
}

.chat-input {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(7, 192, 95, 0.12);
}

.chat-input textarea {
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  min-height: 48px;
  max-height: 160px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
}

.chat-input textarea::placeholder {
  color: var(--muted-light);
}

.chat-input-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.chat-hint {
  color: var(--muted-light);
  font-size: 12px;
}

.chat-send {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.chat-send:hover {
  background: var(--brand);
}

.chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.chat-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13.5px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chat-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .chat-card {
    padding: 10px;
    border-radius: 18px;
  }

  .chat-msg-body {
    max-width: 92%;
  }
}

/* ---------- 定价页功能清单 ---------- */
.feature-columns {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 28px;
  font-size: 14px;
}
