/* ============================================================
   fk 主题样式 —— std.fakra.中国 独立骨架（站点级完全隔离）
   配色：深空墨蓝黑 / 信号橙 / 电光青 / 金码黄
   ============================================================ */
:root {
  --fk-ink: #0B1020;          /* 深空墨蓝黑（顶栏/hero） */
  --fk-ink-2: #121A2E;        /* 卡片深底 */
  --fk-surface: #FFFFFF;       /* 内容卡片 */
  --fk-bg: #F4F6FA;            /* 浅雾背景 */
  --fk-text: #1A2233;          /* 正文深字 */
  --fk-text-soft: #51607A;     /* 次要字 */
  --fk-line: #D7DEEA;          /* 分隔线 */
  --fk-orange: #FF6B35;        /* 信号橙（主强调） */
  --fk-cyan: #2BD4E8;          /* 电光青（次强调） */
  --fk-gold: #F4B740;          /* 金码黄（键码高亮） */
  --fk-orange-dark: #E2551F;
  --h2-inset: 0px;             /* 面包屑与 H2 左缘对齐基准 */
  --maxw: 1200px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--fk-text);
  background: var(--fk-bg);
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--fk-orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.35; color: var(--fk-ink); }
h1 { font-size: 30px; margin: 0 0 12px; }
h2 { font-size: 23px; margin: 34px 0 14px; padding-bottom: 8px; border-left: 4px solid var(--fk-orange); padding-left: 12px; }
h3 { font-size: 19px; margin: 24px 0 10px; color: var(--fk-ink-2); }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }

.fk-container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 / 导航 ---------- */
.fk-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--fk-ink);
  color: #fff;
  height: var(--header-h);
  box-shadow: 0 2px 14px rgba(0,0,0,.25);
}
.fk-header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.fk-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #fff; }
.fk-logo .fk-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(135deg, var(--fk-orange), var(--fk-gold));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: #0B1020; font-weight: 800;
}
.fk-nav { display: flex; gap: 4px; }
.fk-nav a {
  color: #cdd6e6; padding: 8px 13px; border-radius: 8px; font-size: 15px;
  transition: background .2s, color .2s;
}
.fk-nav a:hover, .fk-nav a.active { background: rgba(255,107,53,.18); color: #fff; text-decoration: none; }
.fk-nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- Hero ---------- */
.fk-hero { background: radial-gradient(1200px 500px at 80% -10%, rgba(43,212,232,.22), transparent), var(--fk-ink); color: #fff; padding: 64px 0 72px; }
.fk-hero h1 { color: #fff; font-size: 40px; }
.fk-hero .fk-sub { color: #aeb9d0; font-size: 18px; max-width: 760px; }
.fk-keygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 30px; max-width: 860px; }
.fk-keychip { height: 84px; border-radius: 10px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.fk-keychip b { font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: .5px; }
.fk-keychip i { font-style: normal; font-size: 12px; font-weight: 700; opacity: .95; }
.fk-keychip em { font-style: normal; font-size: 11px; opacity: .78; line-height: 1.2; }
.fk-keynote { margin-top: 14px; max-width: 860px; font-size: 13px; line-height: 1.7; color: rgba(244,246,250,.72); }
.fk-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.fk-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; }
.fk-btn-primary { background: var(--fk-orange); color: #fff; }
.fk-btn-primary:hover { background: var(--fk-orange-dark); text-decoration: none; }
.fk-btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.fk-btn-ghost:hover { background: rgba(255,255,255,.16); text-decoration: none; }

/* ---------- 区块 ---------- */
.fk-section { padding: 52px 0; }
.fk-section h2.fk-sec-title { border-left: 4px solid var(--fk-cyan); }
.fk-card {
  background: var(--fk-surface); border: 1px solid var(--fk-line);
  border-radius: 14px; padding: 22px; box-shadow: 0 6px 22px rgba(11,16,32,.05);
}
.fk-grid { display: grid; gap: 20px; }
.fk-grid-3 { grid-template-columns: repeat(3, 1fr); }
.fk-grid-4 { grid-template-columns: repeat(4, 1fr); }
.fk-grid-2 { grid-template-columns: repeat(2, 1fr); }
.fk-tagline { color: var(--fk-text-soft); font-size: 15px; }
.fk-pill { display: inline-block; background: rgba(255,107,53,.12); color: var(--fk-orange-dark); border-radius: 999px; padding: 3px 12px; font-size: 13px; margin: 2px 4px 2px 0; }

/* ---------- 面包屑（与 H2 左缘对齐） ---------- */
.fk-breadcrumb { font-size: 14px; color: var(--fk-text-soft); margin: 18px 0 6px; padding-left: var(--h2-inset); }
.fk-breadcrumb a { color: var(--fk-text-soft); }
.fk-breadcrumb .sep { margin: 0 8px; color: #aab3c5; }
.fk-breadcrumb .cur { color: var(--fk-text); }

/* ---------- 详情页布局（内容在前 + TOC 在后） ---------- */
.fk-article-layout, .fk-product-layout {
  max-width: 1200px; margin: 0 auto; padding: 10px 20px 60px;
}
.fk-layout-grid { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 40px; align-items: start; }
.fk-content-main { min-width: 0; background: var(--fk-surface); border: 1px solid var(--fk-line); border-radius: 14px; padding: 30px 34px; }
.fk-content-main h2:first-child { margin-top: 6px; }
.fk-summary-box { background: linear-gradient(180deg, rgba(255,107,53,.07), rgba(43,212,232,.05)); border: 1px solid var(--fk-line); border-radius: 12px; padding: 16px 18px; margin: 0 0 22px; }
.fk-summary-box .fk-kw { margin-top: 10px; }
.fk-update-time { font-size: 13px; color: var(--fk-text-soft); margin: 6px 0 18px; }

/* ---------- 列表/分类页布局（侧栏在前 + 内容在后） ---------- */
.fk-list-layout { max-width: 1200px; margin: 0 auto; padding: 10px 20px 60px; }
.fk-list-layout .fk-layout-grid { grid-template-columns: 240px minmax(0,1fr); }
.fk-cat-side { background: var(--fk-surface); border: 1px solid var(--fk-line); border-radius: 14px; padding: 16px; }
.fk-cat-side h3 { margin: 4px 0 10px; font-size: 16px; }
ul.fk-category-list { list-style: none; margin: 0; padding: 0; }
ul.fk-category-list li { margin: 0; }
ul.fk-category-list a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--fk-text); }
ul.fk-category-list a:hover, ul.fk-category-list a.active { background: rgba(255,107,53,.12); color: var(--fk-orange-dark); text-decoration: none; }

/* ---------- 折叠面板（原生 details） ---------- */
.fk-cat-panel, .fk-toc-panel { border: 0; }
.fk-cat-panel > summary, .fk-toc-panel > summary {
  cursor: pointer; font-weight: 600; color: var(--fk-ink);
  list-style: none; padding: 4px 0; display: flex; align-items: center; gap: 8px;
}
.fk-cat-panel > summary::-webkit-details-marker, .fk-toc-panel > summary::-webkit-details-marker { display: none; }
.fk-cat-panel > summary::after, .fk-toc-panel > summary::after {
  content: "▾"; margin-left: auto; transition: transform .2s; color: var(--fk-text-soft);
}
.fk-cat-panel:not([open]) > summary::after, .fk-toc-panel:not([open]) > summary::after { transform: rotate(-90deg); }

/* ---------- TOC 悬浮 ---------- */
.fk-toc-aside { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - 100px); overflow-y: auto; }
.fk-toc-aside .fk-toc-inner { background: var(--fk-surface); border: 1px solid var(--fk-line); border-radius: 14px; padding: 16px; }
.fk-toc-aside .fk-toc-inner ul { list-style: none; margin: 0; padding: 0; }
.fk-toc-aside ol { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.fk-toc-aside ol li { margin: 6px 0; }
.fk-toc-aside a { color: var(--fk-text-soft); }
.fk-toc-aside a:hover { color: var(--fk-orange-dark); text-decoration: none; }

/* ---------- 列表卡片 ---------- */
.fk-list-item { display: block; padding: 18px 20px; border: 1px solid var(--fk-line); border-radius: 12px; background: var(--fk-surface); margin-bottom: 14px; color: var(--fk-text); }
.fk-list-item:hover { border-color: var(--fk-orange); text-decoration: none; box-shadow: 0 6px 18px rgba(255,107,53,.12); }
.fk-list-item h3 { margin: 0 0 6px; font-size: 18px; }
.fk-list-item .fk-meta { font-size: 13px; color: var(--fk-text-soft); }
.fk-list-item p { margin: 8px 0 0; color: var(--fk-text-soft); font-size: 14px; }

/* ---------- 表格（M26 覆盖：fk-spec + 正文内全部 table） ---------- */
.fk-content-main table, .fk-page-main table, table.fk-spec {
  width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: 15px;
  border: 1px solid #cbd5e1;
}
.fk-content-main table th, .fk-content-main table td,
.fk-page-main table th, .fk-page-main table td,
table.fk-spec th, table.fk-spec td {
  border: 1px solid #cbd5e1; padding: 9px 12px; text-align: left; vertical-align: top;
}
.fk-content-main table thead th, .fk-page-main table thead th, table.fk-spec thead th {
  background: var(--fk-ink); color: #fff; font-weight: 600;
}
.fk-content-main table tbody tr:nth-child(even),
.fk-page-main table tbody tr:nth-child(even),
table.fk-spec tbody tr:nth-child(even) { background: #eef2f8; }

/* ---------- 结论块 / 实践经验 ---------- */
.fk-conclusion { background: rgba(43,212,232,.08); border-left: 4px solid var(--fk-cyan); border-radius: 10px; padding: 14px 18px; margin: 18px 0; }
.fk-conclusion ol { margin: 0; }
.fk-case { background: rgba(244,183,64,.12); border: 1px solid rgba(244,183,64,.5); border-radius: 10px; padding: 14px 18px; margin: 18px 0; }
.fk-case .fk-case-tag { font-weight: 700; color: var(--fk-orange-dark); }

/* ---------- FAQ（裸 details，与 faq_dom: bare_details 一致） ---------- */
.fk-content-main details, .fk-page-main details {
  border: 1px solid var(--fk-line); border-radius: 10px; padding: 0 16px; margin: 10px 0; background: #fbfcfe;
}
.fk-content-main details summary, .fk-page-main details summary {
  cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none;
}
.fk-content-main details summary::-webkit-details-marker, .fk-page-main details summary::-webkit-details-marker { display: none; }
.fk-content-main details summary::before, .fk-page-main details summary::before {
  content: "Q"; display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center;
  background: var(--fk-orange); color: #fff; border-radius: 6px; font-size: 13px; margin-right: 8px;
}
.fk-content-main details p, .fk-page-main details p { margin: 4px 0 14px; color: var(--fk-text-soft); }

/* ---------- 相关阅读 / 相关产品 ---------- */
.fk-related { margin-top: 30px; border-top: 1px dashed var(--fk-line); padding-top: 18px; }
.fk-related h3 { margin-top: 0; }
.fk-related a { display: block; padding: 8px 0; color: var(--fk-text); border-bottom: 1px solid #eef1f6; }
.fk-related a:hover { color: var(--fk-orange-dark); text-decoration: none; }
.fk-related .fk-why { color: var(--fk-text-soft); font-size: 13px; }

/* ---------- 悬浮胶囊 ---------- */
.fk-float { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.fk-float button, .fk-float a.fk-float-btn, .fk-float a.fk-float-mail {
  width: 52px; height: 52px; border-radius: 14px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--fk-orange), var(--fk-gold));
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; box-shadow: 0 6px 18px rgba(255,107,53,.35); gap: 2px;
}
.fk-float button:hover, .fk-float a.fk-float-btn:hover, .fk-float a.fk-float-mail:hover { filter: brightness(1.06); text-decoration: none; }
.fk-float .fk-float-ico { font-size: 18px; line-height: 1; }
.fk-card-pop {
  position: fixed; right: 84px; top: 50%; transform: translateY(-50%);
  background: #fff; border-radius: 14px; padding: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.3);
  display: none; z-index: 201;
}
.fk-card-pop.show { display: block; }
.fk-card-pop img { display: block; width: 300px; height: 500px; border-radius: 8px; }
.fk-card-pop .fk-card-close { position: absolute; top: -12px; right: -12px; width: 28px; height: 28px; border-radius: 50%; background: var(--fk-ink); color: #fff; border: 0; cursor: pointer; font-size: 16px; }

/* ---------- 页脚 ---------- */
.fk-footer { background: var(--fk-ink); color: #aeb9d0; padding: 40px 0 26px; margin-top: 40px; }
.fk-footer a { color: #cdd6e6; }
.fk-footer .fk-footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.fk-footer h4 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.fk-footer .fk-copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 26px; padding-top: 16px; font-size: 13px; }

/* ---------- 归档 ---------- */
.fk-archive-year { margin-top: 24px; }
.fk-archive-list { columns: 2; column-gap: 30px; }
.fk-archive-list a { display: block; padding: 5px 0; break-inside: avoid; }

/* ---------- 响应式（≤1024 折叠） ---------- */
@media (max-width: 1024px) {
  .fk-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: var(--fk-ink); padding: 10px 20px; gap: 2px; }
  .fk-nav.open { display: flex; }
  .fk-nav-toggle { display: block; }
  .fk-layout-grid { grid-template-columns: 1fr; gap: 20px; }
  .fk-list-layout .fk-layout-grid { grid-template-columns: 1fr; }
  .fk-toc-aside { position: static; max-height: none; }
  .fk-cat-side { position: static; }
  .fk-hero h1 { font-size: 30px; }
  .fk-grid-3, .fk-grid-4, .fk-grid-2 { grid-template-columns: 1fr; }
  .fk-archive-list { columns: 1; }
}
@media (max-width: 600px) {
  .fk-content-main { padding: 20px 16px; }
  .fk-float { right: 10px; }
  .fk-float button, .fk-float a.fk-float-btn, .fk-float a.fk-float-mail { width: 46px; height: 46px; }
  .fk-card-pop { right: 64px; }
  .fk-card-pop img { width: 220px; height: 367px; }
}
