/* 企浪 v2.2 — 极简清透、3 秒一眼看懂的专业外贸 UI */

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-subtle: #f4f3ef;
  --surface-hover: #fbfaf7;
  --sheet-bg: #f6f5f1;
  --sheet-border: #e6e3dc;

  --ink: #18181b;
  --ink-secondary: #52525b;
  --ink-muted: #71717a;

  --border: #e7e5e0;
  --border-strong: #d4d1c9;

  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-soft: #fff7ed;
  --accent-border: #fed7aa;

  --ok: #059669;
  --ok-soft: #ecfdf5;
  --ok-border: #a7f3d0;

  --plat-alibaba-bg: #fff7ed;
  --plat-alibaba-text: #c2410c;
  --plat-1688-bg: #fef2f2;
  --plat-1688-text: #b91c1c;
  --plat-amazon-bg: #eff6ff;
  --plat-amazon-text: #1d4ed8;
  --plat-accio-bg: #f0fdf4;
  --plat-accio-text: #15803d;

  --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-sm: 0 2px 8px -2px rgba(24, 24, 27, 0.06);
  --shadow-md: 0 10px 28px -10px rgba(24, 24, 27, 0.1);
  --shadow-lg: 0 24px 60px -16px rgba(24, 24, 27, 0.22);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --topbar-h: 64px;
  --max-w: 1120px;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-subtle: #1f242e;
  --surface-hover: #1c2029;
  --sheet-bg: #12151b;
  --sheet-border: #262c38;

  --ink: #f4f4f5;
  --ink-secondary: #a1a1aa;
  --ink-muted: #71717a;

  --border: #252a35;
  --border-strong: #353c4c;

  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --accent-border: rgba(249, 115, 22, 0.32);

  --ok: #34d399;
  --ok-soft: rgba(16, 185, 129, 0.14);
  --ok-border: rgba(16, 185, 129, 0.3);

  --plat-alibaba-bg: rgba(249, 115, 22, 0.15);
  --plat-alibaba-text: #fdba74;
  --plat-1688-bg: rgba(239, 68, 68, 0.15);
  --plat-1688-text: #fca5a5;
  --plat-amazon-bg: rgba(59, 130, 246, 0.16);
  --plat-amazon-text: #93c5fd;
  --plat-accio-bg: rgba(34, 197, 94, 0.15);
  --plat-accio-text: #86efac;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 10px -2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 28px 70px -12px rgba(0, 0, 0, 0.72);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-subtle);
  color: var(--ink);
}

mark.hl {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 2px;
  border-radius: 3px;
}

/* ==================== 顶部导航栏 ==================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 34%, transparent);
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.top-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.top-nav-item:hover {
  color: var(--ink);
}

.top-nav-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.top-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.top-nav-item.active .top-nav-badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.top-nav-badge.has-items {
  background: var(--accent);
  color: #ffffff;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-pill {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.lang-pill-btn {
  border: none;
  background: transparent;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: all 0.15s ease;
}

.lang-pill-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.popover-anchor {
  position: relative;
}

.popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 268px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 60;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}

.setting-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.seg-btn {
  border: none;
  background: transparent;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.popover-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.setting-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.setting-foot-title {
  font-size: 12.5px;
  font-weight: 600;
}

.setting-foot-desc {
  font-size: 12px;
  color: var(--ink-muted);
}

.text-danger-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
}

.text-danger-btn:hover {
  background: var(--accent-soft);
}

/* ==================== 按钮与徽章系统 ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 9px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 28%, transparent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.copy-btn.copied {
  border-color: var(--ok-border);
  background: var(--ok-soft);
  color: var(--ok);
}

.plat-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.plat-alibaba { background: var(--plat-alibaba-bg); color: var(--plat-alibaba-text); }
.plat-1688    { background: var(--plat-1688-bg);    color: var(--plat-1688-text); }
.plat-amazon  { background: var(--plat-amazon-bg);  color: var(--plat-amazon-text); }
.plat-accio   { background: var(--plat-accio-bg);   color: var(--plat-accio-text); }

.badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-full);
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-border);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-neutral {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

/* ==================== 页面主容器 & 首页 Hero ==================== */

.page-container {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.hero-center {
  text-align: center;
  max-width: 680px;
  margin: 4px auto 32px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 13px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero-sub {
  margin: 0 auto 24px;
  max-width: 560px;
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.search-box {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  display: inline-flex;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 44px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.search-kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear:hover {
  background: var(--border);
  color: var(--ink);
}

/* ==================== 智能关联搜索下拉 & 跨模块联想条 ==================== */

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 55;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
  max-height: 430px;
  overflow-y: auto;
}

.sd-section {
  padding: 4px 0;
}

.sd-section + .sd-section {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.sd-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0 6px 6px;
}

.sd-hot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 4px;
}

.sd-hot-chip {
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.14s ease;
}

.sd-hot-chip:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.sd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  transition: background 0.12s ease;
}

.sd-item:hover {
  background: var(--surface-subtle);
}

.sd-item-main {
  min-width: 0;
  flex: 1;
}

.sd-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-item-sub {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-type-pill {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
}

.sd-type-pill.is-skill {
  background: var(--plat-accio-bg);
  color: var(--plat-accio-text);
}

.sd-type-pill.is-agent {
  background: var(--accent-soft);
  color: var(--accent);
}

.related-matches-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.related-matches-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.related-matches-label {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.search-hot-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ==================== 筛选条（主平台 + 业务场景） ==================== */

.filter-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-primary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.pill-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.pill-num {
  font-size: 11.5px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.view-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.view-switch-btn {
  border: none;
  background: transparent;
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.view-switch-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.filter-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.chip-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.chip-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.chip-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

.result-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.sort-link {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
}

.sort-link:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.sort-link.active {
  color: var(--accent);
  font-weight: 600;
}

/* ==================== 3 列话术卡片网格 ==================== */

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

.prompt-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  cursor: pointer;
}

.prompt-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.prompt-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.copy-counter {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.prompt-card-title {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.42;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompt-card-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.prompt-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-preview-link {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.15s ease;
}

.prompt-card:hover .card-preview-link {
  color: var(--ink);
}

/* ==================== 2 列卡片网格（套组 / 技能包） ==================== */

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

.playbook-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.playbook-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.playbook-card h3 {
  margin: 8px 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.38;
}

.playbook-card p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
  flex: 1;
}

.playbook-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

/* ==================== 首页底部引导条 ==================== */

.bottom-callout {
  margin-top: 36px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.bottom-callout-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.bottom-callout-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* ==================== Accio Work 技能包页面 ==================== */

.page-header-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-lede {
  margin: 0;
  max-width: 720px;
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.guide-drawer {
  margin: 14px 0 24px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.guide-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.guide-step-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-border);
}

.guide-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-step-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 650;
}

.guide-step-text {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.guide-try-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  flex-wrap: wrap;
}

.guide-try-text {
  font-size: 13px;
  color: var(--ink);
  flex: 1;
  min-width: 220px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 16px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.skill-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.skill-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.skill-card-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.skill-card-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
  flex: 1;
}

.skill-triggers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--ink-muted);
}

.skill-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.skill-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ==================== 弹窗与内容区阅读面板 ==================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 17, 21, 0.52);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-panel {
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.tip-howto {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 13.5px;
  color: var(--ink);
  margin: 14px 0 18px;
}

.sheet-box {
  border-radius: var(--radius-md);
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-border);
  overflow: hidden;
  margin-bottom: 14px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sheet-border);
  background: color-mix(in srgb, var(--surface) 55%, var(--sheet-bg));
  flex-wrap: wrap;
}

.sheet-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.sheet-body {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink);
}

.sheet-body.is-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  max-height: 360px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.check-icon {
  color: var(--ok);
  display: inline-flex;
  flex-shrink: 0;
}

/* ==================== 智能体专属卡片与弹窗细节 ==================== */

.agent-role-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.agent-skills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

.skill-link-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.14s ease;
}

.skill-link-chip:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.agent-sample-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-border);
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.agent-sample-box strong {
  color: var(--ink);
  font-weight: 600;
}

.sample-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 18px;
}

.sample-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sheet-bg);
  border: 1px solid var(--sheet-border);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.modal-section-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  margin: 14px 0 8px;
}

.agent-meta-strip {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--ink-secondary);
  margin: 10px 0 14px;
}

.agent-meta-strip strong {
  color: var(--ink);
  font-weight: 600;
}

.file-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.file-tab-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.14s ease;
}

.file-tab-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.file-tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.file-purpose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  flex-wrap: wrap;
}

/* ==================== 详情独立页 & 常用本 ==================== */

.narrow-container {
  max-width: 780px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.back-link:hover {
  color: var(--ink);
}

.empty-card {
  max-width: 520px;
  margin: 36px auto;
  padding: 36px 28px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.empty-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty-card p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.saved-row-title {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 3px;
}

.saved-row-meta {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.step-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

/* ==================== 页脚 & Toast ==================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
}

.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* ==================== 响应式适配 ==================== */

@media (max-width: 1040px) {
  .brand-sub {
    display: none;
  }
}

@media (max-width: 960px) {
  .prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .top-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: space-between;
  }
  .top-nav-item {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    font-size: 12.5px;
  }
  .page-container {
    padding: 24px 16px 48px;
  }
  .prompt-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .modal-panel {
    padding: 18px;
  }
}
