/* =====================================================================
   gcmod-aether-theme.css  v=20261004a
   全站统一 Aether 视觉主题覆盖层（smai-ui 官网系 + smai-spa 用户端）
   基准：/Aether/ 设计语言
     - 暖纸背景 #fafaf7 / 深色 #191714
     - 陶土橙主色 #cc785c（hover #c96442，dark 文本 #d4a27f）
     - 衬线标题 TiemposText / 正文 StyreneA / 代码 Cascadia Code
   机制：覆盖 shadcn/Tailwind HSL 变量（:root 亮色 + .dark 暗色）
   ===================================================================== */

/* ---------- 字体（复用 smai-ui/assets/fonts/，nginx 已映射） ---------- */
@font-face{font-family:'TiemposText';src:url('/smai-ui/assets/fonts/TiemposText/TiemposText-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'TiemposText';src:url('/smai-ui/assets/fonts/TiemposText/TiemposText-Medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'TiemposText';src:url('/smai-ui/assets/fonts/TiemposText/TiemposText-Semibold.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:'StyreneA';src:url('/smai-ui/assets/fonts/StyreneA/StyreneA-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'StyreneA';src:url('/smai-ui/assets/fonts/StyreneA/StyreneA-Medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'StyreneA';src:url('/smai-ui/assets/fonts/StyreneA/StyreneA-Bold.woff2') format('woff2');font-weight:700;font-display:swap}

/* ---------- 亮色主题 ---------- */
:root{
  /* 字体 */
  --font-sans:'StyreneA',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  --font-mono:'Cascadia Code',Consolas,ui-monospace,SFMono-Regular,Menlo,monospace;
  --default-font-family:var(--font-sans);

  /* 底色与文字 */
  --background:60 23.1% 97.5%;          /* #fafaf7 暖纸 */
  --foreground:0 0% 9.8%;               /* #191919 */
  --card:60 42.9% 98.6%;                /* #fdfdfa */
  --card-foreground:0 0% 9.8%;
  --popover:60 42.9% 98.6%;
  --popover-foreground:0 0% 9.8%;

  /* 主色（陶土橙） */
  --primary:15 52.3% 58%;               /* #cc785c */
  --primary-foreground:0 0% 100%;
  --ring:15 52.3% 58%;
  --highlight:#cc785c;

  /* 次级 / 柔和 */
  --secondary:51.4 25.9% 94.7%;         /* #f5f4ee */
  --secondary-foreground:0 0% 9.8%;
  --muted:51.4 25.9% 94.7%;
  --muted-foreground:60 1.5% 39.4%;     /* #666663 */
  --accent:51.4 25.9% 94.7%;
  --accent-foreground:0 0% 9.8%;

  /* 边框 / 输入 */
  --border:46.2 22.8% 88.8%;            /* #e9e6dc */
  --input:46.2 22.8% 88.8%;
  --radius:0.5rem;

  /* 状态色 */
  --destructive:0 47.1% 53.3%;          /* #c05050 */
  --destructive-foreground:0 0% 100%;
  --status-success:128.8 50.5% 37.3%;   /* #2f8f3d */
  --status-success-foreground:0 0% 100%;
  --status-warning:39.6 59.5% 45.5%;    /* #b98a2f */
  --status-warning-foreground:0 0% 100%;
  --status-info:211.1 47.3% 43.9%;      /* #3b6ea5 */
  --status-info-foreground:0 0% 100%;
  --status-destructive:var(--destructive);
  --status-destructive-foreground:var(--destructive-foreground);

  /* 侧边栏（用户端） */
  --sidebar-background:60 23.1% 97.5%;
  --sidebar-foreground:0 0% 9.8%;
  --sidebar-primary:15 52.3% 58%;
  --sidebar-primary-foreground:0 0% 100%;
  --sidebar-accent:51.4 25.9% 94.7%;
  --sidebar-accent-foreground:0 0% 9.8%;
  --sidebar-border:46.2 22.8% 88.8%;
  --sidebar-ring:15 52.3% 58%;

  /* 图表（Aether 相近暖色系） */
  --chart-1:15 52.3% 58%;
  --chart-2:128.8 50.5% 37.3%;
  --chart-3:39.6 59.5% 45.5%;
  --chart-4:211.1 47.3% 43.9%;
  --chart-5:0 47.1% 53.3%;
}

/* ---------- 暗色主题 ---------- */
.dark{
  --background:36 11.1% 8.8%;           /* #191714 */
  --foreground:48 33.3% 97.1%;          /* #faf9f5 */
  --card:34.3 10.8% 12.7%;              /* #24211d */
  --card-foreground:48 33.3% 97.1%;
  --popover:34.3 10.8% 12.7%;
  --popover-foreground:48 33.3% 97.1%;

  --primary:15 52.3% 58%;               /* 陶土橙保持 */
  --primary-foreground:0 0% 100%;
  --ring:24.7 49.7% 66.5%;              /* #d4a27f */
  --highlight:#d4a27f;

  --secondary:34.3 10.8% 12.7%;
  --secondary-foreground:48 33.3% 97.1%;
  --muted:34.3 10.8% 12.7%;
  --muted-foreground:42.9 16.3% 74.7%;  /* #c9c3b4 */
  --accent:34.3 10.8% 12.7%;
  --accent-foreground:48 33.3% 97.1%;

  --border:37.5 10% 15.7%;              /* #2c2924 */
  --input:37.5 10% 15.7%;
  --radius:0.5rem;

  --destructive:12.3 62.6% 60.2%;       /* #d9745a */
  --destructive-foreground:0 0% 100%;
  --status-success:142.7 29.8% 51.4%;   /* #5ea87a */
  --status-success-foreground:0 0% 100%;
  --status-warning:40.7 72.5% 62.9%;    /* #e5b95c */
  --status-warning-foreground:0 0% 100%;
  --status-info:217.1 88.7% 75.7%;      /* #8ab4f8 */
  --status-info-foreground:0 0% 100%;
  --status-destructive:var(--destructive);
  --status-destructive-foreground:var(--destructive-foreground);

  --sidebar-background:36 11.1% 8.8%;
  --sidebar-foreground:48 33.3% 97.1%;
  --sidebar-primary:15 52.3% 58%;
  --sidebar-primary-foreground:0 0% 100%;
  --sidebar-accent:34.3 10.8% 12.7%;
  --sidebar-accent-foreground:48 33.3% 97.1%;
  --sidebar-border:37.5 10% 15.7%;
  --sidebar-ring:24.7 49.7% 66.5%;

  --chart-1:24.7 49.7% 66.5%;
  --chart-2:142.7 29.8% 51.4%;
  --chart-3:40.7 72.5% 62.9%;
  --chart-4:217.1 88.7% 75.7%;
  --chart-5:12.3 62.6% 60.2%;
}

/* ---------- 标题衬线（全站统一） ---------- */
h1,h2,h3,h4,h5,h6,
.font-serif,[class*="font-serif"]{
  font-family:'TiemposText','StyreneA',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif !important;
  letter-spacing:-0.01em;
}

/* ---------- body 级强制（覆盖各页硬编码 font/背景） ---------- */
body{
  font-family:'StyreneA',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif !important;
  -webkit-font-smoothing:antialiased;
}
html.dark body{background-color:hsl(var(--background)) !important}
/* 暗色前景统一：docs 等独立页文字默认继承黑色，强制为 Aether 浅色 */
html.dark body{color:#faf9f5 !important}
html.dark h1,html.dark h2,html.dark h3,html.dark h4,html.dark h5,html.dark h6,
html.dark [class*="text-foreground"],html.dark .toc-link,html.dark .step-num,
html.dark .toc-link.cur{color:#faf9f5 !important}
html.dark .toc-link.cur{color:#d4a27f !important}
html.dark [class*="muted"]{color:#c9c3b4 !important}
html.dark h1,html.dark h2{color:#faf9f5 !important}
html.dark [data-faq]{color:#faf9f5 !important}

/* ---------- 导航容器统一（smai-ui 悬浮 pill 导航 → Aether 同款） ---------- */
body nav[style*="border-radius"]{
  background:rgba(250,250,247,.92) !important;
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px);
  border:1px solid #e9e6dc !important;
  box-shadow:0 12px 32px -18px rgba(25,25,25,.10);
}
html.dark body nav[style*="border-radius"]{
  background:rgba(36,33,29,.92) !important;
  border-color:rgba(227,224,211,.14) !important;
}

/* ---------- 卡片圆角/边框统一 ---------- */
[class*="card" i],.rounded-xl,.rounded-2xl{border-color:#e9e6dc !important}
html.dark [class*="card" i],html.dark .rounded-xl,html.dark .rounded-2xl{border-color:rgba(227,224,211,.12) !important}

/* ---------- 用户端 React 组件局部变量 → Aether 暗色（全站统一） ---------- */
/* React header/sidebar 局部覆盖 --background/--card，须用 Aether 具体色值强制 */
html.dark .bg-background,html.dark [class*="bg-background"]{background-color:#191714 !important}
html.dark .bg-card,html.dark [class*="bg-card"]{background-color:#24211d !important}
