/* components.css — 可复用组件（tokens.css 之后加载）
   组件命名与 05-design-system/design-system.md 的组件表一一对应。
   只引用 tokens.css 的变量，不在这里写色值字面量。 */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-s);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 16px; background: var(--c-accent); color: #fff;
  border-radius: var(--r-s); font-size: var(--fs-small);
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

/* ---------------- 区块标题 ---------------- */
.section-head { margin-bottom: 14px; }

.section-head h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .01em;
  color: var(--c-ink);
}

.section-head p {
  margin-top: 6px;
  color: var(--c-ink-muted);
  font-size: var(--fs-small);
  max-width: 62ch;
}

.section-head-compact { margin-bottom: 12px; }
.section-head-compact h2 { font-size: 20px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-2); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255, 255, 255, .72);
  color: var(--c-accent);
  border-color: var(--c-line-strong);
}
.btn-ghost:hover { background: #fff; border-color: var(--c-accent); }

.btn-link {
  font-size: var(--fs-small);
  color: var(--c-accent);
  font-weight: 600;
  border-bottom: 1px solid transparent;
}
.btn-link:hover { border-bottom-color: currentColor; }

/* ---------------- 页头 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--c-hero-a);
  border-bottom: 1px solid rgba(15, 76, 129, .08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--gap-m);
  height: 60px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
  margin-right: auto;
}

.brand-name {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--c-ink);
  line-height: 1.2;
}

.brand-sub {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--c-ink-muted);
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--c-ink-soft);
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
  transition: color .16s ease;
}
.site-nav a:hover { color: var(--c-accent); }
.site-nav a[aria-current="page"] { color: var(--c-accent); font-weight: 600; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 2px;
}

.icon-btn,
.menu-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--c-line-strong);
  background: rgba(255, 255, 255, .7);
  color: var(--c-accent);
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.icon-btn:hover,
.menu-btn:hover { background: #fff; border-color: var(--c-accent); }
.icon-btn svg { width: 15px; height: 15px; }

.menu-btn { display: none; }
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 15px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  content: "";
  position: relative;
}
.menu-btn span::before { position: absolute; top: -5px; }
.menu-btn span::after { position: absolute; top: 5px; }

/* 站内搜索面板 */
.search-panel {
  border-top: 1px solid var(--c-line);
  background: #fff;
  padding: 14px 0 18px;
}
.search-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.search-input {
  flex: 1 1 320px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-pill);
  background: var(--c-surface-alt);
  font-size: var(--fs-small);
  font-family: inherit;
  color: var(--c-ink);
}
.search-input:focus { background: #fff; border-color: var(--c-accent); outline: none; }
.search-hint { font-size: var(--fs-tiny); color: var(--c-ink-faint); }
.search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin-top: 10px;
}
.search-results a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-s);
  background: var(--c-surface-alt);
  font-size: var(--fs-small);
}
.search-results a:hover { background: var(--c-accent-soft); }
.search-results .sr-desc { color: var(--c-ink-muted); font-size: var(--fs-tiny); }
.search-empty { font-size: var(--fs-small); color: var(--c-ink-muted); }

/* ---------------- 首屏 hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, var(--c-hero-b) 0%, rgba(201, 224, 250, 0) 62%),
    linear-gradient(112deg, var(--c-hero-a) 0%, #dfeafc 46%, #cfe3fa 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
  gap: 46px;
  align-items: start;
  padding-top: 12px;
  padding-bottom: 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 0;
}

.eyebrow {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-tiny);
  letter-spacing: .22em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.29;
  letter-spacing: .005em;
  color: var(--c-ink);
  margin-bottom: 20px;
}

.hero-lead {
  font-size: var(--fs-lead);
  line-height: 1.72;
  color: var(--c-ink-soft);
  max-width: 620px;
}
.hero-lead-sub { color: var(--c-ink-muted); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 76, 129, .16);
}
.hero-stats dt {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--c-accent);
}
.hero-stats dd {
  margin-top: 4px;
  font-size: var(--fs-tiny);
  letter-spacing: .04em;
  color: var(--c-ink-muted);
}

.hero-media {
  position: relative;
  align-self: stretch;
  min-height: 0;
  margin-right: calc(-1 * var(--pad-x));
}
.hero-media img {
  width: 100%;
  height: 100%;
  height: 404px;
  min-height: 340px;
  object-fit: cover;
  border-radius: var(--r-l) 0 0 var(--r-l);
  box-shadow: var(--shadow-photo);
}
.hero-media figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(11, 21, 32, .58);
  color: #fff;
  font-size: var(--fs-tiny);
  letter-spacing: .02em;
  backdrop-filter: blur(2px);
}

/* ---------------- 方向索引 topics ---------------- */
.topic-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, var(--c-surface-alt) 100%);
  border: 1px solid var(--c-line);
  border-radius: var(--r-m);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.topic-card > a:hover {
  border-color: var(--c-line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.topic-thumb {
  display: block;
  aspect-ratio: 180 / 125;
  overflow: hidden;
  background: var(--c-accent-soft);
}
.topic-thumb img { width: 100%; height: 100%; object-fit: cover; }

.topic-title {
  display: block;
  margin: 12px 12px 0;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-ink);
}

.topic-desc {
  display: block;
  margin: 6px 12px 0;
  font-size: 12px;
  line-height: 1.62;
  color: var(--c-ink-muted);
}

.topic-meta {
  display: block;
  margin: auto 12px 12px;
  padding-top: 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-tiny);
  letter-spacing: .06em;
  color: var(--c-accent);
}

/* ---------------- 精选条目 picks ---------------- */
.pick > a {
  display: block;
  height: 100%;
  padding: 16px 16px 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-m);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pick > a:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.pick-title {
  display: block;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-ink);
}

.pick-desc {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.72;
  color: var(--c-ink-muted);
}

/* ---------------- 资质路径 path ---------------- */
.step {
  position: relative;
  padding-left: 48px;
  padding-top: 4px;
}
.step-num {
  position: absolute;
  left: 0;
  top: 2px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c-accent);
}
.step-num::after {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  width: 26px;
  height: 2px;
  background: var(--c-accent-soft);
}
.step-title {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.4;
  color: var(--c-ink);
}
.step-desc {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--c-ink-muted);
}

/* ---------------- 通用能力 skills ---------------- */
.skill {
  padding: 12px 14px 14px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
}
.skill-title {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
}
.skill-desc {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.66;
  color: var(--c-ink-muted);
}

/* ---------------- 长文 reads ---------------- */
.read > a {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.read > a:hover { border-color: var(--c-accent); box-shadow: var(--shadow-card); }

.read-thumb {
  display: block;
  aspect-ratio: 66 / 54;
  overflow: hidden;
  border-radius: 6px;
  background: var(--c-accent-soft);
}
.read-thumb img { width: 100%; height: 100%; object-fit: cover; }

.read-title {
  display: block;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-ink);
}
.read-desc {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--c-ink-muted);
}
.read-time {
  display: block;
  margin-top: 2px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--c-accent);
}

/* ---------------- FAQ ---------------- */
.faq-item {
  border-top: 1px solid var(--c-line);
}
.faq-item:first-child { border-top-color: var(--c-line-strong); }

.faq-item summary {
  position: relative;
  padding: 10px 30px 10px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  color: var(--c-accent);
  transition: transform .18s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  padding: 0 20px 12px 0;
  font-size: 12px;
  line-height: 1.72;
  color: var(--c-ink-soft);
}

/* ---------------- 收录说明 scope ---------------- */
.scope {
  background: var(--c-cream);
  border: 1px solid var(--c-cream-deep);
  border-radius: var(--r-m);
  padding: 14px 18px 16px;
}
.scope-title {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 8px;
}
.scope-item {
  padding: 8px 0;
  border-top: 1px dashed rgba(11, 21, 32, .18);
}
.scope-item:first-child { border-top: 0; padding-top: 0; }
.scope-item h3 {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--c-ink);
}
.scope-item p {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--c-ink-soft);
}

/* ---------------- 安全声明 notice ---------------- */
.notice-bar {
  background: var(--c-notice);
  color: #fff;
  border-radius: var(--r-s);
  padding: 12px 20px;
  font-size: 12.5px;
  line-height: 1.62;
  letter-spacing: .01em;
}
.notice-bar strong {
  flex: 0 0 auto;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-tiny);
  letter-spacing: .18em;
  color: #cfe2f7;
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  background: var(--c-navy);
  color: var(--c-ink-invert-soft);
  padding-top: 30px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px 40px;
  padding-bottom: 26px;
}
.footer-name {
  display: block;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--c-ink-invert);
}
.footer-tagline {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
  max-width: 30ch;
}
.footer-heading {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-tiny);
  letter-spacing: .16em;
  color: var(--c-ink-invert-soft);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  font-size: 12.5px;
}
.footer-nav a,
.footer-about a {
  color: var(--c-ink-invert);
  transition: color .16s ease;
}
.footer-nav a:hover,
.footer-about a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-about ul { display: grid; gap: 8px; font-size: 12.5px; }

.footer-bottom {
  border-top: 1px solid rgba(234, 242, 251, .16);
  padding-block: 16px 18px;
  font-size: 11.5px;
  color: rgba(169, 190, 212, .9);
}

/* ---------------- 内页共用：面包屑 ---------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-tiny);
  letter-spacing: .02em;
  color: var(--c-ink-faint);
}
.breadcrumb a { color: var(--c-ink-muted); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--c-line-strong);
}
