/* ============================================
   AI Workbench — Unified Design System
   Shared by: index.html, *-report.html, software-dev.html
   ============================================ */

/* ----- CSS Variables ----- */
:root {
  /* Color palette */
  --bg: #fafaf8;
  --surface: #f5f4f0;
  --ink: #1a1a1a;
  --ink-light: #3d3d3d;
  --muted: #6b6b6b;
  --soft: #999;
  --rule: #e5e2d8;
  --accent: #b85a3a;

  /* Semantic accent colors */
  --accent-blue: #3b6fb6;
  --accent-green: #3d8b5c;
  --accent-purple: #7c4d9e;
  --accent-teal: #2d8a8a;

  /* Tinted backgrounds */
  --tint: #fdf6ef;
  --tint-blue: #eef5fb;
  --tint-green: #eaf6ee;
  --tint-purple: #f4eef9;
  --tint-teal: #e8f5f5;

  /* Code & tags */
  --code-bg: #f2efe7;
  --tag-bg: #f0ede4;

  /* Typography — 系统字体栈，国内免翻 */
  --font-display: Georgia, 'Songti SC', 'Noto Serif SC', 'SimSun', serif;
  --font-heading: 'Songti SC', 'Noto Serif SC', 'SimSun', Georgia, serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', 'SF Mono', monospace;

  /* Spacing scale (multiples of 8px) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 80px;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ----- Reset ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 1em 0;
  color: var(--ink-light);
  line-height: 1.75;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}
a:hover { color: #8b3e22; }

strong { color: var(--ink); font-weight: 600; }

/* ----- Code ----- */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  color: #7a3d27;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 16px 0;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ----- Tables ----- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 20px 0;
}

thead th {
  font: 10.5px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--ink);
  background: var(--surface);
  color: var(--muted);
}

tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-light);
  vertical-align: top;
  line-height: 1.55;
}

tbody tr:hover td {
  background: rgba(0,0,0,0.012);
}

/* ----- Section Titles ----- */
.section-title {
  margin: 56px 0 24px;
}

.section-title .kicker {
  font: 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.008em;
}

.section-title .bar {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-top: 12px;
}

/* ----- Cards ----- */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-color: #ccc4b4;
}

.card-body {
  padding: 24px 28px;
}

.card-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 6px;
}

.card-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ----- Callouts ----- */
.callout {
  margin: 24px 0;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.65;
  border: 1px solid;
}

.callout.info {
  background: var(--tint-blue);
  border-color: #c8d8ec;
}

.callout.warning {
  background: var(--tint);
  border-color: #f0d8c8;
}

.callout.info strong { color: var(--accent-blue); }
.callout.warning strong { color: var(--accent); }

/* ----- Red Flags (for skill analysis) ----- */
.red-flags {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: #fef9f7;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: #8b3a20;
  line-height: 1.6;
}

.red-flags .flag-title {
  font: 10.5px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* ----- Tags / Badges ----- */
.tag {
  display: inline-block;
  font: 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.tag-process { background: var(--tint-blue); color: var(--accent-blue); }
.tag-dev { background: var(--tint); color: var(--accent); }
.tag-plan { background: var(--tint-green); color: var(--accent-green); }
.tag-review { background: var(--tint-purple); color: var(--accent-purple); }
.tag-workspace { background: var(--tint-teal); color: var(--accent-teal); }
.tag-meta { background: #f5f0e8; color: #8b6914; }
.tag-rigid { background: #fde8e4; color: #c94a2a; font-weight: 600; }
.tag-flexible { background: #e4f0e8; color: #2d6a4f; font-weight: 600; }

/* ----- Navigation ----- */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}

.nav-bar .logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav-bar .nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-bar .nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-bar .nav-links a:hover,
.nav-bar .nav-links a.active {
  color: var(--accent);
}

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 20px 0 40px;
  font-size: 12px;
  color: var(--soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer a {
  color: var(--soft);
}

.site-footer .beian {
  width: 100%;
  padding-top: 12px;
  font-size: 12px;
  color: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer .beian a {
  color: var(--soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.site-footer .beian a:hover { color: var(--ink); }
.site-footer .beian img {
  width: 14px; height: 14px;
  vertical-align: middle;
}

/* ----- Ornament Divider ----- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 48px auto;
  max-width: 280px;
  color: var(--soft);
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  max-width: 64px;
  height: 1px;
  background: var(--rule);
}

.ornament .symbol {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
}

/* ----- Container ----- */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ----- Article Body (for sub-pages) ----- */
.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  .article-body { padding: 24px 18px 56px; }
}

@media (max-width: 700px) {
  .container { padding: 0 16px; }
  .nav-bar { flex-direction: column; gap: 8px; align-items: flex-start; }
  .nav-bar .nav-links { gap: 14px; }
  .nav-bar .nav-links a { font-size: 13px; }
  .section-title { margin: 40px 0 20px; }
  .section-title h2 { font-size: 24px; }
  .card-body { padding: 18px 20px; }
  table { font-size: 12px; }
  thead th, tbody td { padding: 8px 10px; }
  .site-footer { flex-direction: column; gap: 6px; font-size: 11px; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .nav-bar { gap: 6px; }
  .nav-bar .logo { font-size: 15px; }
  .nav-bar .nav-links { gap: 10px; flex-wrap: wrap; }
  .nav-bar .nav-links a { font-size: 12px; }
  .site-footer { padding: 16px 0 28px; font-size: 10px; }
  .site-footer .beian { font-size: 10px; gap: 12px; }
  .site-footer .beian a { font-size: 10px; }
  .site-footer .beian img { width: 12px; height: 12px; }
  .section-title h2 { font-size: 20px; }
  table { font-size: 11px; }
  thead th, tbody td { padding: 6px 8px; }
}
