/**
 * Arthur Chiao / Long Haul 风格复刻
 * 参考: https://arthurchiao.art/blog/gpt-as-a-finite-state-markov-chain-zh/
 */

:root {
  /* 全站强调色：稳重红（正文链接、标签、合作页点缀、选中等） */
  --ac-primary: #b83246;
  --ac-primary-dark: #9a2a3c;
  --ac-primary-darker: #7d2230;
  --ac-accent-soft: rgba(184, 50, 70, 0.08);
  --ac-accent-softer: rgba(184, 50, 70, 0.06);
  --ac-accent-border: rgba(184, 50, 70, 0.35);
  --ac-text-muted: #6a737d;
  --ac-blockquote-border: #dfe2e5;
  --ac-code-bg: #f6f8fa;
}

/* 全局字体与排版 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 16px;
  line-height: 1.5;
}

@media (min-width: 56.25em) {
  body {
    text-align: justify;
  }
}

/* 链接颜色 */
a {
  color: #08c
}
a:hover {
  color: var(--ac-primary-darker);
}

/* 选中高亮 */
::selection {
  background: var(--ac-primary);
  color: white;
}
::-moz-selection {
  background: var(--ac-primary);
  color: white;
}

/* 隐藏左侧栏、文章抽屉与打开抽屉的按钮；主栏全宽 */
.left-col,
.tools-col {
  display: none !important;
}
.mid-col {
  left: 0 !important;
}
.btnctn.js-mobile-btnctn {
  display: none !important;
}

/* 顶栏 */
.site-top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e1e4e8;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.site-top-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.site-top-nav__brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.site-top-nav__brand a {
  color: #24292f;
  text-decoration: none;
}
.site-top-nav__brand a:hover {
  color: var(--ac-primary-dark);
}
.site-top-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
  font-size: 0.95rem;
}
.site-top-nav__links a {
  color: var(--ac-text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.site-top-nav__links a:hover {
  color: var(--ac-primary-dark);
}
.site-top-nav__links .site-top-nav__github {
  color: var(--ac-primary);
  font-weight: 500;
}
.site-top-nav__links .site-top-nav__github:hover {
  color: var(--ac-primary-darker);
}

/* 顶栏下拉菜单（Openclaw 工作坊等嵌套项）
   父级 padding-bottom 作为「悬停桥」，避免 margin 在标签与面板间形成死区导致 :hover 丢失 */
.site-top-nav__dropdown {
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
}
.site-top-nav__dropdown:hover,
.site-top-nav__dropdown:focus-within {
  z-index: 1002;
}
.site-top-nav__dropdown-label {
  cursor: default;
  color: var(--ac-text-muted);
  user-select: none;
}
.site-top-nav__dropdown:hover .site-top-nav__dropdown-label,
.site-top-nav__dropdown:focus-within .site-top-nav__dropdown-label {
  color: var(--ac-primary-dark);
}
.site-top-nav__dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  min-width: 16rem;
  max-width: 22rem;
  padding: 0.4rem 0;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 1001;
}
.site-top-nav__dropdown:hover .site-top-nav__dropdown-panel,
.site-top-nav__dropdown:focus-within .site-top-nav__dropdown-panel {
  display: block;
}
.site-top-nav__dropdown-panel a {
  display: block;
  padding: 0.45rem 1rem;
  white-space: normal;
  line-height: 1.35;
  color: var(--ac-text-muted);
}
.site-top-nav__dropdown-panel a:hover {
  color: var(--ac-primary-dark);
  background: var(--ac-accent-soft);
}

/* 侧栏与移动菜单中的分组子项（与主题 menu-dropdown 一致，便于未重打 webpack 包时仍可用） */
.left-col #header .header-menu .header-menu__group {
  list-style: none;
  text-align: center;
}
.left-col #header .header-menu .header-menu__group-label {
  display: block;
  font-size: 13px;
  color: #999;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  cursor: default;
}
.left-col #header .header-menu .header-menu__sub {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
}
.left-col #header .header-menu .header-menu__sub li {
  margin: 4px 0;
}
.left-col #header .header-menu .header-menu__sub a {
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}
.header-menu__group--mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border-left: 1px solid #a0a0a0;
  box-sizing: border-box;
}
.header-menu__group--mobile .header-menu__group-label {
  font-size: 11px;
  color: #888;
  line-height: 1.2;
  margin-bottom: 4px;
}
.header-menu__group--mobile .header-menu__sub-link {
  font-size: 11px;
  line-height: 1.25;
  color: #a0a0a0;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  padding: 2px 0;
}
.header-menu__group--mobile .header-menu__sub-link:hover,
.header-menu__group--mobile .header-menu__sub-link.active {
  color: #eaeaea;
}

/* 左侧栏主题色（侧栏隐藏时以下不影响布局） */
.left-col .overlay {
  background: #4d4d4d;
}
.left-col .header-menu a:hover,
.left-col .header-smart-menu a:hover {
  color: rgba(255, 255, 255, 0.9);
}
.left-col .header-author a {
  color: white;
}
/* .left-col .intrude-less {
  background: var(--ac-primary);
} */

/* 文章区域 */
.article-inner {
  max-width: 1024px;
  margin: 0 auto;
}

.article-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  text-align: center;
  margin: 2rem 0 1rem;
}

.archive-article-date {
  text-align: center;
  color: var(--ac-text-muted);
  font-size: 0.9em;
  margin-bottom: 1.5rem;
}

/* 文章正文排版 */
.article-entry {
  font-size: 1em;
  line-height: 1.7;
}

.article-entry h1,
.article-entry h2,
.article-entry h3,
.article-entry h4,
.article-entry h5,
.article-entry h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 1.5em 0 0.75em;
  font-weight: 600;
}

.article-entry h1 { font-size: 1.8em; }
.article-entry h2 { font-size: 1.5em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
.article-entry h3 { font-size: 1.25em; }
.article-entry h4 { font-size: 1.1em; }

/* 引用块 - Long Haul 风格 */
.article-entry blockquote {
  border-left: 0.25em solid var(--ac-blockquote-border);
  padding: 0 1em;
  margin: 1.5em 0;
  color: rgb(26, 26, 26);
  line-height: 1.8;
}

/* 代码块 */
.article-entry code,
.article-entry pre {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 85%;
}

.article-entry code {
  background: var(--ac-code-bg);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  border: 1px solid #e1e4e8;
}

.article-entry pre {
  background: #272822;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1em 0;
}

.article-entry pre code {
  background: none;
  padding: 0;
  border: none;
  color: #f8f8f2;
}

.article-entry .highlight {
  background: #272822;
  border-radius: 4px;
  margin: 1em 0;
}

.article-entry .highlight pre {
  margin: 0;
  padding: 1em;
}

/* 列表 */
.article-entry ul,
.article-entry ol {
  margin: 1em 0;
  padding-left: 2em;
}

.article-entry li {
  margin: 0.5em 0;
}

/* 段落 */
.article-entry p {
  margin: 1em 0;
}

/* 分隔线 */
.article-entry hr {
  border: none;
  border-top: 1px solid #eaecef;
  margin: 2em 0;
}

/* 标签与分类链接 */
.article-tag-list-link,
.article-category .article-tag-list-link {
  color: var(--ac-primary) !important;
}
.article-tag-list-link:hover,
.article-category .article-tag-list-link:hover {
  color: var(--ac-primary-darker) !important;
}

/* 页脚 */
#footer {
  border-top: 4px solid #d9d9d9;
  padding-top: 1.5em;
  margin-top: 2em;
  text-align: center;
  font-size: 0.9em;
  color: var(--ac-text-muted);
}

#footer .footer-nav {
  margin-bottom: 1rem;
  font-size: 0.95em;
}
#footer .footer-nav a {
  color: var(--ac-text-muted);
}
#footer .footer-nav a:hover {
  color: var(--ac-primary-dark);
}
#footer .footer-nav-sep {
  margin: 0 0.5em;
  color: #ccc;
}

/* 首页：主栏中的 search-ul（与侧栏结构一致，配色适配白底正文区） */
.home-search-list-wrap {
  width: 100%;
  max-width: 1024px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 1.25rem 80px;
  box-sizing: border-box;
  text-align: left;
}
.home-search-list-wrap .home-search-ul.search-ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #4d4d4d;
}
.home-search-list-wrap .search-li {
  padding: 12px 0;
  border-bottom: 1px dotted #dcdcdc;
}
.home-search-list-wrap .search-li:hover {
  background: var(--ac-accent-softer);
}
.home-search-list-wrap .search-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  color: #333;
  font-size: 16px;
}
.home-search-list-wrap .search-title .icon {
  margin-right: 8px;
  color: var(--ac-text-muted);
}
.home-search-list-wrap .search-title:hover {
  color: var(--ac-primary-dark);
}
.home-search-list-wrap .search-time,
.home-search-list-wrap .search-tag {
  font-size: 12px;
  color: var(--ac-text-muted);
  margin: 6px 10px 0 0;
  display: inline-block;
  vertical-align: middle;
}
.home-search-list-wrap .search-time .icon,
.home-search-list-wrap .search-tag .icon {
  margin-right: 4px;
}
.home-search-list-wrap .search-tag span {
  margin-right: 6px;
}
.home-search-list-wrap .search-tag a {
  color: var(--ac-primary);
}
.home-search-list-wrap .search-tag a:hover {
  color: var(--ac-primary-darker);
}
.home-search-list-wrap #page-nav {
  margin-top: 2rem;
  text-align: center;
}

/* ---------- 商业合作页：专业、克制 AI / 工程气质 ---------- */
.biz-page {
  --biz-bg: #f6f8fa;
  --biz-panel: #1e2937;
  --biz-panel-border: rgba(30, 41, 55, 0.12);
  --biz-accent: var(--ac-primary);
  --biz-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

/* 项目案例页：三列卡片略放宽 */
.biz-page.cases-page {
  max-width: 960px;
}

.biz-section--cases-cta {
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  background: var(--biz-bg);
  border: 1px solid var(--biz-panel-border);
  border-radius: 6px;
  font-size: 0.95rem;
  color: #444;
}

.biz-section--cases-cta a {
  font-weight: 600;
}

.biz-page .biz-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #24292f;
  padding: 1rem 1.15rem;
  margin: 0 0 1.75rem;
  background: linear-gradient(135deg, var(--ac-accent-softer) 0%, rgba(30, 41, 55, 0.04) 100%);
  border: 1px solid var(--biz-panel-border);
  border-left: 3px solid var(--biz-accent);
  border-radius: 4px;
}

.biz-section {
  margin-bottom: 2rem;
}

.biz-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--biz-panel);
  margin: 0 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e1e4e8;
  letter-spacing: -0.02em;
}

.biz-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.biz-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 0.25rem;
  border-bottom: 1px dotted #e1e4e8;
  line-height: 1.65;
  color: #333;
}

.biz-list li:last-child {
  border-bottom: none;
}

.biz-k {
  display: inline-block;
  min-width: 5.5rem;
  font-family: var(--biz-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ac-primary-dark);
  letter-spacing: -0.01em;
}

/* 合作流程：有序步骤 */
.biz-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: biz-step;
}

.biz-steps li {
  position: relative;
  margin: 0;
  padding: 0.65rem 0 0.65rem 2.6rem;
  border-bottom: 1px dotted #e1e4e8;
  line-height: 1.65;
  color: #333;
  counter-increment: biz-step;
}

.biz-steps li:last-child {
  border-bottom: none;
}

.biz-steps li::before {
  content: counter(biz-step);
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 1.65rem;
  height: 1.65rem;
  line-height: 1.65rem;
  text-align: center;
  font-family: var(--biz-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--biz-accent);
  border-radius: 4px;
}

.biz-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0 0.75rem;
}

@media (min-width: 600px) {
  .biz-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

.biz-card {
  background: var(--biz-bg);
  border: 1px solid var(--biz-panel-border);
  border-radius: 6px;
  padding: 1rem 1rem 1.1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.biz-card:hover {
  border-color: var(--ac-accent-border);
  box-shadow: 0 2px 8px rgba(30, 41, 55, 0.06);
}

.biz-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--biz-panel);
}

.biz-card__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ac-text-muted);
}

.biz-note {
  font-size: 0.88rem;
  color: var(--ac-text-muted);
  margin: 0.5rem 0 0;
  font-style: italic;
}

.biz-section--contact {
  background: var(--biz-bg);
  border: 1px solid var(--biz-panel-border);
  border-radius: 6px;
  padding: 1.25rem 1.35rem 1.4rem;
  margin-top: 2.25rem;
}

.biz-section--contact h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.65rem;
}

.biz-section--contact p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #333;
}

.biz-email {
  font-family: var(--biz-mono);
  font-size: 0.95rem;
}

.biz-email a {
  font-weight: 500;
}

.biz-contact-sub {
  margin: 1.25rem 0 0.5rem !important;
  font-size: 0.95rem !important;
  font-weight: 600;
  color: var(--biz-panel) !important;
}

.biz-wechat {
  margin: 0.35rem 0 0.25rem;
  display: inline-block;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--biz-panel-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(30, 41, 55, 0.06);
}

.biz-wechat img {
  display: block;
  width: 220px;
  height: auto;
  max-width: 100%;
  border-radius: 4px;
  vertical-align: middle;
}

.biz-wechat-hint {
  margin: 0.5rem 0 0 !important;
  font-size: 0.85rem !important;
  color: var(--ac-text-muted) !important;
}

.biz-meta {
  margin-top: 1rem !important;
  font-size: 0.85rem !important;
  color: var(--ac-text-muted) !important;
}

/* ---------- 全智能家庭档案馆：略放宽版式 + 开篇张力 ---------- */
.biz-page.family-archive-page {
  max-width: 780px;
}

.family-archive-page .biz-manifesto {
  margin: 0 0 1.25rem;
  padding: 1.15rem 1.25rem;
  font-size: 1.08rem;
  line-height: 1.82;
  color: #1a1f26;
  background: linear-gradient(145deg, rgba(30, 41, 55, 0.07) 0%, rgba(255, 255, 255, 0.92) 55%);
  border: 1px solid var(--biz-panel-border);
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(30, 41, 55, 0.05);
}

.family-archive-page .biz-manifesto strong {
  color: var(--biz-panel);
}

.family-archive-page .biz-cards--family {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .family-archive-page .biz-cards--family {
    grid-template-columns: repeat(2, 1fr);
  }
}

.family-archive-page .biz-section--family-cta {
  margin-bottom: 0;
  padding: 1rem 1.15rem 1.15rem;
  background: var(--biz-bg);
  border: 1px solid var(--biz-panel-border);
  border-radius: 6px;
}

.family-archive-page .biz-section--family-cta h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.65rem;
}

.family-archive-page .biz-section--family-cta p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.68;
  color: #333;
}

.family-archive-page .biz-section--family-cta a {
  font-weight: 600;
}

