/* ========================================
   SBTi 学习助手 · 原型共用样式
   - 使用 CSS 变量，组件内禁止硬编码 hex
   ======================================== */

:root {
  --primary-50:  #f0fdf4;
  --primary-100: #dcfce7;
  --primary-300: #86efac;
  --primary-500: #22c55e;
  --primary-600: #16a34a;
  --primary-700: #15803d;

  --primary-color: var(--primary-600);
  --primary-light: var(--primary-500);
  --primary-dark:  var(--primary-700);
  --primary-bg:    var(--primary-50);

  --text-main:     #1f2937;
  --text-muted:    #6b7280;
  --text-faint:    #9ca3af;
  --border-color:  #e5e7eb;
  --border-soft:   #f1f5f9;
  --surface:       #ffffff;
  --surface-muted: #f9fafb;

  --warn-bg: #fef3c7; --warn-fg: #92400e; --warn-bd: #fde68a;
  --danger-bg: #fee2e2; --danger-fg: #991b1b; --danger-bd: #fecaca;
  --info-bg: #dbeafe; --info-fg: #1e40af; --info-bd: #bfdbfe;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 28px rgba(22, 163, 74, 0.10);

  /* 与共享导航栏 max-width: 1200px 对齐 */
  --max-width: 1200px;
}

/* ========== Reset ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text-main);
  background: var(--surface-muted);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; }

h1, h2, h3, h4, h5 {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.2; }
h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p  { margin: 0 0 12px; color: var(--text-main); }
.ohesg-footer p { color: inherit; margin: 0; }

a { color: var(--primary-color); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; border-radius: 2px; }

/* ========== Layout ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 32px 0; }
section.section-sm { padding: 20px 0; }

.section-head { margin-bottom: 28px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-100);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.section-head p { color: var(--text-muted); margin: 0; }

/* Divider */
.divider {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 0;
}

/* ========== Mock Header / Footer ========== */
#header-placeholder .mock-header,
#site-header .mock-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
}
.mock-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.mock-header-inner .brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--text-main);
  font-size: 16px;
}
.mock-header-inner .brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.mock-header-inner .nav {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.mock-header-inner .nav a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
}
.mock-header-inner .nav a:hover,
.mock-header-inner .nav a.active {
  color: var(--primary-dark);
  background: var(--primary-50);
}
.mock-header-note {
  font-size: 11px; color: var(--text-faint);
  padding: 4px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

#footer-placeholder .mock-footer,
#site-footer .mock-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 36px 24px;
  margin-top: 48px;
}
.mock-footer-disclaimer {
  max-width: var(--max-width);
  margin: 16px auto 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  font-size: 12px;
  color: var(--text-faint);
}
.mock-footer-disclaimer a {
  color: var(--text-muted);
  text-decoration: underline;
  margin-left: 6px;
}
.mock-footer-disclaimer a:hover { color: var(--primary-dark); }
.mock-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.mock-footer-inner .col strong { color: var(--text-main); display: block; margin-bottom: 6px; }
.mock-footer-inner a { color: var(--text-muted); }
.mock-footer-inner a:hover { color: var(--primary-dark); }

/* ========== Breadcrumb ========== */
.breadcrumb {
  padding: 20px 24px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb .sep { margin: 0 6px; color: var(--text-faint); }

/* ========== Page Hero (subpage) ========== */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: 28px 0 40px;
}
.page-hero .tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--primary-dark); background: var(--primary-100);
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 14px;
}
.page-hero .desc {
  color: var(--text-muted);
  font-size: 15px;
}

/* ========== Hero (homepage) ========== */
.hero {
  background:
    radial-gradient(circle at 85% 20%, var(--primary-100) 0%, transparent 55%),
    radial-gradient(circle at 15% 90%, #eff6ff 0%, transparent 50%),
    var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: 64px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero .tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--primary-dark); background: var(--primary-100);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 18px; font-weight: 500;
}
.hero h1 { margin-bottom: 12px; }
.hero .lead {
  font-size: 17px; color: var(--text-main);
  margin-bottom: 12px; font-weight: 500;
}
.hero .desc {
  color: var(--text-muted); font-size: 15px;
  margin-bottom: 24px;
}

.relation-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.relation-card h4 {
  font-size: 13px; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.relation-tree { display: flex; flex-direction: column; gap: 12px; }
.relation-node {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--border-color);
  font-size: 14px; font-weight: 500;
  color: var(--text-main);
}
.relation-node.primary {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-dark);
}
.relation-node .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-500); flex-shrink: 0;
}
.relation-node.sub {
  margin-left: 22px; font-size: 13px;
  color: var(--text-muted); font-weight: 400;
}
.relation-node.sub .dot { background: var(--primary-300); width: 6px; height: 6px; }

.cta-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  text-decoration: none;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-primary {
  background: var(--primary-color); color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
}
.btn-primary:hover {
  background: var(--primary-dark); color: #fff; transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface); color: var(--primary-dark);
  border-color: var(--primary-300);
}
.btn-ghost:hover {
  background: var(--primary-50); color: var(--primary-dark);
}
.btn-outline {
  background: var(--surface); color: var(--text-main);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background: var(--surface-muted); border-color: var(--text-faint);
}

/* ========== Entry Cards ========== */
.entry-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.entry-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all .2s ease;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-300);
}
.entry-card .icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--primary-100); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  margin-bottom: 16px;
}
.entry-card h3 { margin-bottom: 8px; }
.entry-card p {
  color: var(--text-muted); font-size: 14px;
  flex: 1; margin-bottom: 18px;
}
.entry-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
  color: var(--primary-color);
}
.entry-link::after { content: '→'; transition: transform .2s; }
.entry-card:hover .entry-link::after { transform: translateX(3px); }

/* ========== Timeline ========== */
.reading-path {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  position: relative;
}
.timeline::before {
  content: ''; position: absolute;
  top: 18px; left: 18px; right: 18px;
  height: 2px;
  background: linear-gradient(to right, var(--primary-300), var(--primary-500), var(--primary-300));
  z-index: 0;
}
.step { position: relative; padding-top: 46px; z-index: 1; }
.step .num {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary-500);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.step h4 { font-size: 14px; text-align: center; margin-bottom: 6px; }
.step p {
  font-size: 12px; color: var(--text-muted);
  text-align: center; margin: 0; line-height: 1.5;
}

/* Vertical step list (子页里也能复用) */
.step-list {
  display: flex; flex-direction: column;
  gap: 14px;
}
.step-list-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px;
  align-items: center;
  transition: all .18s ease;
}
.step-list-item:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-sm);
}
.step-list-item .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-50);
  border: 1px solid var(--primary-300);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.step-list-item h4 { margin-bottom: 2px; font-size: 16px; }
.step-list-item p { margin: 0; color: var(--text-muted); font-size: 13px; }
.step-list-item .go {
  color: var(--primary-color);
  font-weight: 600; font-size: 13px; white-space: nowrap;
}

/* ========== Resource Cards ========== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}
.resource-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all .2s ease;
  display: flex; flex-direction: column;
}
.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-300);
}
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge-type   { background: var(--primary-100); color: var(--primary-dark); }
.badge-stage  { background: var(--surface-muted); color: var(--text-muted); border: 1px solid var(--border-color); }
.badge-ghost  { background: var(--surface-muted); color: var(--text-muted); border: 1px solid var(--border-color); }
.badge-info   { background: var(--info-bg);   color: var(--info-fg);   border: 1px solid var(--info-bd); }
.badge-warn   { background: var(--warn-bg);   color: var(--warn-fg);   border: 1px solid var(--warn-bd); }
.badge-danger { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-bd); }

.resource-card .title-en {
  font-size: 15px; font-weight: 700; color: var(--text-main);
  margin-bottom: 6px; line-height: 1.4;
}
.resource-card .summary {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 16px; flex: 1;
}
.resource-card .links {
  display: flex; gap: 16px;
  padding-top: 12px; border-top: 1px dashed var(--border-color);
  font-size: 13px;
}
.resource-card .links a.primary-link {
  color: var(--primary-color); font-weight: 600;
}
.resource-card .links a.ext-link { color: var(--text-muted); }
.resource-card .links a.ext-link:hover { color: var(--primary-dark); }
.resource-card .links a.ext-link::after { content: ' ↗'; font-size: 11px; }

/* ========== Sector Cards ========== */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.sector-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all .2s ease;
  display: block;
  text-decoration: none; color: inherit;
}
.sector-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-300);
}
.sector-card h3 { font-size: 16px; margin-bottom: 10px; }
.sector-card .summary {
  font-size: 13px; color: var(--text-muted);
  margin: 10px 0 14px;
}
.sector-card .view-link {
  font-size: 13px; font-weight: 600; color: var(--primary-color);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.status-tag {
  font-size: 11px; padding: 3px 9px;
  border-radius: 4px; font-weight: 500;
  background: var(--primary-50);
  color: var(--primary-dark);
  border: 1px solid var(--primary-100);
}
.status-tag[data-status="dev"]    { background: var(--warn-bg);   color: var(--warn-fg);   border-color: var(--warn-bd); }
.status-tag[data-status="paused"] { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-bd); }
.status-tag[data-status="info"]   { background: var(--info-bg);   color: var(--info-fg);   border-color: var(--info-bd); }

/* ========== Glossary ========== */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.glossary-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all .15s ease;
  text-decoration: none;
  display: block; color: inherit;
}
.glossary-item:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
}
.glossary-item .term {
  font-size: 14px; font-weight: 700;
  color: var(--primary-dark); margin-bottom: 4px;
}
.glossary-item .meaning {
  font-size: 12px; color: var(--text-muted);
  margin: 0; line-height: 1.5;
}
.glossary-more { text-align: center; margin-top: 24px; }

/* 完整术语表 */
.glossary-table {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.glossary-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 18px;
}
.glossary-row:last-child { border-bottom: none; }
.glossary-row .term {
  font-weight: 700; color: var(--primary-dark);
  font-size: 15px;
}
.glossary-row .meaning {
  color: var(--text-main); font-size: 14px; margin: 0;
}
.glossary-row .meaning small {
  display: block; color: var(--text-muted);
  font-size: 12px; margin-top: 6px;
}
.glossary-original {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}
.glossary-original-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  font-style: normal;
  color: var(--primary-dark);
  background: var(--primary-100);
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 4px;
  letter-spacing: 0.03em;
}
.glossary-row .meaning small {
  display: block; color: var(--text-muted);
  font-size: 12px; margin-top: 6px;
}

/* ========== Article List ========== */
.article-list {
  display: flex; flex-direction: column; gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.article-item {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-color);
  display: grid; grid-template-columns: 1fr auto;
  gap: 20px; align-items: center;
  transition: background .15s ease;
  text-decoration: none; color: inherit;
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: var(--primary-50); }
.article-item h3 { font-size: 16px; margin-bottom: 4px; }
.article-item .summary {
  font-size: 13px; color: var(--text-muted);
  margin: 0 0 10px;
}
.article-item .meta {
  display: flex; gap: 10px; align-items: center;
  font-size: 12px; color: var(--text-muted);
}
.article-item .meta .date { font-weight: 500; }
.article-item .meta .tag {
  padding: 2px 8px;
  background: var(--surface-muted);
  border-radius: 4px;
  color: var(--text-muted);
}
.article-item .read-link {
  font-size: 13px; font-weight: 600;
  color: var(--primary-color); white-space: nowrap;
}

/* ========== Long article ========== */
.article-body {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
}
.article-body h2 { margin-top: 28px; }
.article-body h3 { margin-top: 22px; font-size: 17px; }
.article-body p { color: var(--text-main); font-size: 15px; }
.article-body ul, .article-body ol {
  padding-left: 22px; color: var(--text-main); font-size: 15px;
}
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 3px solid var(--primary-500);
  padding: 10px 18px;
  margin: 16px 0;
  background: var(--primary-50);
  color: var(--text-main);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 14px;
}
.article-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap;
}

/* ========== Source Note ========== */
.source-note {
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
  border-radius: var(--radius-md);
  padding: 22px 26px;
}
.source-note p:first-child {
  color: var(--text-main); font-size: 14px;
}
.source-note .meta {
  display: flex; gap: 24px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--primary-100);
  font-size: 13px; color: var(--text-muted);
  flex-wrap: wrap;
}
.source-note .meta strong { color: var(--text-main); }

/* Warning / Info callout */
.callout {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 20px 0;
  border: 1px solid var(--border-color);
  font-size: 14px; color: var(--text-main);
}
.callout strong { display: block; margin-bottom: 4px; }
.callout.warn  { background: var(--warn-bg);   border-color: var(--warn-bd);   color: var(--warn-fg); }
.callout.info  { background: var(--info-bg);   border-color: var(--info-bd);   color: var(--info-fg); }
.callout.danger{ background: var(--danger-bg); border-color: var(--danger-bd); color: var(--danger-fg); }

/* File table */
.file-table {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.file-table th {
  text-align: left;
  padding: 12px 18px;
  background: var(--surface-muted);
  font-weight: 600; color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.file-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}
.file-table tr:last-child td { border-bottom: none; }
.file-table .fname { font-weight: 600; color: var(--text-main); }
.file-table .fmeta { color: var(--text-muted); font-size: 13px; margin: 0; }
.file-table .ext-link { font-size: 13px; color: var(--primary-color); white-space: nowrap; font-weight: 600; }
.file-table .ext-link::after { content: ' ↗'; font-size: 11px; }

/* Two-column layout (用于详情页) */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
}
.two-col > * {
  min-width: 0;  /* prevent grid children from overflowing due to wide content like tables */
  overflow: hidden;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky;
  top: 20px;
}
.side-card h4 {
  font-size: 12px; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 12px;
}
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li {
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--border-color);
}
.side-card li:last-child { border-bottom: none; }
.side-card li a { color: var(--text-main); }

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .entry-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .two-col > * { min-width: 0; }
  .side-card { position: static; }
  .timeline { grid-template-columns: 1fr; gap: 24px; }
  .timeline::before {
    top: 18px; bottom: 18px; left: 18px; right: auto;
    height: auto; width: 2px;
  }
  .step { padding: 0 0 0 52px; }
  .step .num { top: 0; left: 0; transform: none; }
  .step h4, .step p { text-align: left; }
  .article-item { grid-template-columns: 1fr; gap: 10px; }
  .step-list-item { grid-template-columns: 36px 1fr; }
  .step-list-item .go { grid-column: 2; }
  .glossary-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 640px) {
  .reading-path, .article-body { padding: 24px; }

  /* Featured card (SBTi 首页"关键决策路线图") - 横向 flex 在窄屏挤压描述列；改为纵向堆叠并缩小字号 */
  .featured-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 18px 20px !important;
    gap: 12px !important;
  }
  .featured-card > div:first-child {
    font-size: 36px !important;
  }
  .featured-card h3 {
    font-size: 17px !important;
  }
  .featured-card p {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
  }
  .featured-card > div:last-child {
    align-self: flex-end !important;
    font-size: 13px !important;
  }
  section { padding: 40px 0; }
  .hero { padding: 48px 0 56px; }
  .container, .container-narrow { padding: 0 18px; }
  .mock-header-inner { flex-direction: column; align-items: flex-start; }
  .resource-grid { grid-template-columns: 1fr; }
}

/* ========== Purpose Panel ==========
   Used at the top of every "工具与速查" page to answer:
   适合谁 / 不适合谁 / 什么时候用 / 能干嘛 / 不能干嘛
*/
.purpose-panel {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-500);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 22px 0 26px;
  font-size: 14px;
  line-height: 1.65;
}
.purpose-panel.tone-info { border-left-color: var(--info-fg); }
.purpose-panel.tone-warn { border-left-color: var(--warn-fg); }
.purpose-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 24px;
}
.purpose-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.purpose-item .label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 72px;
  padding-top: 2px;
}
.purpose-item .value {
  font-size: 13px;
  color: var(--text-main);
  flex: 1;
  line-height: 1.6;
}
.purpose-item .value a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.purpose-not {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}
.purpose-not strong { color: var(--warn-fg); font-weight: 600; }

/* ========== Methods Reference (sectors/matrix.html) ========== */
.methods-ref {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}
.methods-ref summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  background: var(--surface-muted);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.methods-ref summary::-webkit-details-marker { display: none; }
.methods-ref summary::after {
  content: '▾';
  color: var(--text-muted);
  font-size: 12px;
  transition: transform .15s;
}
.methods-ref[open] summary::after { transform: rotate(180deg); }
.methods-ref-body {
  padding: 16px 18px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.method-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--surface);
}
.method-code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-50);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 6px;
}
.method-fullname {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}
.method-fullname-en {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-style: italic;
}
.method-desc {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 8px;
}
.method-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 4px;
}
.method-meta strong { color: var(--text-main); font-weight: 600; }
.method-meta .scope-badge {
  display: inline-block;
  background: var(--surface-muted);
  padding: 1px 7px;
  border-radius: 999px;
  margin-right: 4px;
  font-size: 11px;
}
.method-tradeoff {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-soft);
}

/* ========== Methods Page (sbti/methods.html) ========== */
.method-link { color: var(--text-main); text-decoration: none; }
.method-link:hover { color: var(--primary-dark); text-decoration: underline; }

.method-toc-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: var(--text-main);
  transition: border-color .15s, transform .15s;
  align-items: flex-start;
}
.method-toc-card:hover {
  border-color: var(--primary-300);
  transform: translateY(-1px);
  color: var(--text-main);
}
.method-toc-card .toc-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 2px;
}
.method-toc-card .toc-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-bottom: 2px;
}
.method-toc-card .toc-cn {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 4px;
}
.method-toc-card .toc-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.method-section {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 28px 28px;
  margin: 0 0 22px;
  scroll-margin-top: 16px;
}
.method-section-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.method-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  font-size: 28px;
  color: var(--primary-300);
  line-height: 1;
  flex-shrink: 0;
  padding-top: 4px;
}
.method-title-block { flex: 1; }
.method-code-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.method-code-pill {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--primary-dark);
  background: var(--primary-50);
  padding: 3px 10px;
  border-radius: 6px;
}
.method-category {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-muted);
  padding: 2px 8px;
  border-radius: 999px;
}
.method-title { font-size: 22px; margin: 0 0 4px; }
.method-en {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
.method-legacy {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.method-quick-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}
.qmeta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qmeta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.qmeta-val {
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.scope-pill {
  display: inline-block;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--text-main);
}

.method-short-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-main);
  padding: 12px 14px;
  background: var(--primary-50);
  border-left: 3px solid var(--primary-500);
  border-radius: 4px;
  margin: 16px 0;
}

.method-block { margin: 18px 0; }
.method-block h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-main);
}
.method-block p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-main);
  margin: 0;
}

.method-input-list {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
}
.method-input-list li { margin-bottom: 4px; }

.method-steps {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
}
.method-steps li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--text-main);
}
.method-steps strong {
  color: var(--primary-dark);
  font-weight: 600;
}
.step-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.6;
}

.method-applicable-metrics {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--info-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--info-bd);
}
.method-applicable-metrics h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--info-fg);
}
.applicable-metrics-list {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
}
.applicable-metrics-list li { margin-bottom: 4px; }

.method-formulas { display: grid; gap: 8px; }
.formula-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface-muted);
  border-radius: 4px;
}
.formula-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.formula-tex {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--primary-dark);
  background: transparent;
  padding: 0;
  border-radius: 0;
}
@media (max-width: 640px) {
  .formula-row { grid-template-columns: 1fr; gap: 4px; }
}

.method-chars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4px 14px;
}
.char-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 3px;
}
.char-row:nth-child(odd) { background: var(--surface-muted); }
.char-key { color: var(--text-muted); font-weight: 500; }
.char-val { color: var(--text-main); }

.method-when {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}
.when-row {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-main);
}
.when-row strong { font-weight: 600; }
.when-row.when-use strong { color: var(--primary-dark); }
.when-row.when-not strong { color: var(--danger-fg); }
.when-row.when-tradeoff strong { color: var(--warn-fg); }
.when-row.when-tradeoff { font-style: italic; color: var(--text-muted); }

.method-v2-note {
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--info-fg);
  background: var(--info-bg);
  border: 1px solid var(--info-bd);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}
.method-v2-note strong { font-weight: 600; }

.back-to-top {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.back-to-top:hover { color: var(--primary-dark); }
