/* ==========================================================================
   设计令牌页面共享样式（Aurora 极光云 · 控制台设计语言规范）
   风格原则：无描边 / 无阴影 / 白灰背景卡片 / 低圆角(0-5px) / 主色 #0052D9
   ========================================================================== */
:root { --primary: #0052D9; --primary-hover: #0040B0; }

body { background: #F7F8FA; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }

/* ---- 旧版独立布局（兼容 tokens-home / tokens-product 早期页面） ---- */
.tk-layout { display: flex; min-height: 100vh; }
.tk-sidebar {
  width: 220px; flex: none; background: #fff;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px;
}
.tk-sidebar .tk-logo { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #101010; padding: 4px 10px 18px; }
.tk-sidebar .tk-logo-img { height: 30px; }
.tk-sidebar .tk-logo-sub { font-size: 14px; font-weight: 700; color: #101010; white-space: nowrap; }
.tk-sidebar .tk-nav-title { font-size: 12px; color: #8A94A6; padding: 10px 10px 6px; }
.tk-sidebar a.tk-nav {
  display: block; padding: 8px 10px; margin: 2px 0;
  font-size: 13px; color: #202020; text-decoration: none;
}
.tk-sidebar a.tk-nav:hover { background: #F5F7FA; color: #0052D9; }
.tk-sidebar a.tk-nav.active { color: #0052D9; font-weight: 500; }

/* ---- 内容区（控制台框架内使用 .tk-main 包裹） ---- */
.tk-main { padding: 24px 28px 80px; }
.tk-head { margin-bottom: 22px; }
.tk-head h1 { font-size: 20px; font-weight: 700; color: #101010; }
.tk-head p { font-size: 13px; color: #8A94A6; margin-top: 6px; }

.tk-section { margin-bottom: 30px; }
.tk-section > h2 {
  font-size: 15px; font-weight: 600; color: #101010; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.tk-section > h2::before { content: ""; width: 4px; height: 15px; background: #0052D9; }
.tk-section .tk-desc { font-size: 12px; color: #9AA3B2; margin: -6px 0 12px; }

/* 色板 */
.tk-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tk-swatch { background: #fff; overflow: hidden; }
.tk-swatch .sw-color { height: 56px; }
.tk-swatch .sw-info { padding: 8px 12px; }
.tk-swatch .sw-info .sw-name { font-size: 12px; color: #101010; font-weight: 500; }
.tk-swatch .sw-info .sw-hex { font-size: 11px; color: #9AA3B2; margin-top: 2px; font-family: Consolas, Menlo, monospace; }

/* 令牌表（名称 / 取值 / 说明） */
.tk-table { width: 100%; border-collapse: collapse; background: #fff; }
.tk-table th {
  text-align: left; font-size: 12px; font-weight: 500; color: #8A94A6;
  padding: 10px 14px; border-bottom: 1px solid #F0F2F5; background: #FAFBFC;
}
.tk-table td { font-size: 13px; color: #202020; padding: 10px 14px; border-bottom: 1px solid #F0F2F5; }
.tk-table tr:last-child td { border-bottom: none; }
.tk-table .tk-hex { font-family: Consolas, Menlo, monospace; font-size: 12px; color: #0052D9; }
.tk-table .sw-dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 8px; }

/* 组件演示区 */
.tk-demo { background: #fff; padding: 20px; margin-bottom: 12px; }
.tk-demo .td-label { font-size: 12px; color: #8A94A6; margin-bottom: 14px; }
.tk-demo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 8px; }
.tk-demo-row + .tk-demo-row { margin-top: 12px; }

/* 尺寸/间距令牌 */
.tk-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tk-metric { background: #fff; padding: 12px 14px; }
.tk-metric .m-demo { height: 30px; background: #F7F8FA; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #0052D9; }
.tk-metric .m-name { font-size: 12px; color: #101010; margin-top: 8px; font-weight: 500; }
.tk-metric .m-val { font-size: 11px; color: #9AA3B2; margin-top: 2px; font-family: Consolas, Menlo, monospace; }

/* 排版样例 */
.tk-type { background: #fff; padding: 16px 20px; margin-bottom: 10px; }
.tk-type .tt-meta { display: flex; gap: 16px; font-size: 11px; color: #9AA3B2; margin-bottom: 6px; }
.tk-type .tt-meta b { color: #0052D9; font-weight: 600; }
.tk-type .tt-sample-h1 { font-size: 30px; font-weight: 700; color: #101010; }
.tk-type .tt-sample-h2 { font-size: 20px; font-weight: 700; color: #101010; }
.tk-type .tt-sample-h3 { font-size: 15px; font-weight: 600; color: #101010; }
.tk-type .tt-sample-body { font-size: 14px; color: #202020; }
.tk-type .tt-sample-caption { font-size: 12px; color: #8A94A6; }

/* 状态圆点（无背景色块：8px 圆点 + 文字） */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #202020; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B4BCC9; }
.st-green::before { background: #00B578; }
.st-blue::before { background: #0052D9; }
.st-orange::before { background: #FFAE00; }
.st-gray::before { background: #B4BCC9; }
.st-red::before { background: #E5484D; }

/* 提示条（浅蓝底 + 圆感叹 + 深蓝字） */
.tip-bar {
  display: flex; align-items: center; gap: 8px;
  background: #E8F3FF; padding: 10px 14px; font-size: 13px; color: #3A5B8C;
}
.tip-bar i { font-size: 15px; color: #0052D9; flex: none; }

/* ---- 移动端适配 ---- */
@media (max-width: 720px) {
  .tk-main { padding: 16px 14px 60px; }
  .tk-head h1 { font-size: 18px; }
  .tk-swatches { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tk-metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tk-demo { padding: 14px; }
  .tk-token-row { grid-template-columns: 1fr; gap: 4px; }
  .tk-table { font-size: 12px; }
  .tk-table th, .tk-table td { padding: 8px 10px; }
  .tk-type { padding: 12px 14px; }
  .tk-demo-row { gap: 12px; }
  .frame-sketch { grid-template-columns: 1fr; grid-template-rows: 48px auto auto; }
  .icon-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .gauge-demo { flex-wrap: wrap; gap: 16px; }
  .tab-line { gap: 16px; overflow-x: auto; }
}
