/* ============================================================
   LynxStation · products/docs/news 页面专用样式
   遵循主题变量（--dt-main-rgb / --dt-secondary-color 等）保持一致风格
   ============================================================ */
:root {
  --ls-accent: rgba(var(--dt-main-rgb, 27, 132, 21), 1);
  --ls-accent-soft: rgba(var(--dt-main-rgb, 27, 132, 21), .08);
  --ls-border: #e8e6ef;
  --ls-bg-soft: #f8f7fc;
  --ls-text: #494a4d;
  --ls-title: #1e1e2a;
}

/* ---------- 页面首屏条（产品页 / 文档页 / 新闻页共用） ---------- */
.ls-page-hero {
  position: relative;
  padding: 140px 0 64px;
  background: linear-gradient(180deg, var(--ls-accent-soft), rgba(var(--dt-main-rgb, 27, 132, 21), .02) 60%, transparent);
  border-bottom: 1px solid var(--ls-border);
  text-align: center;
}
.ls-page-hero .subtitle {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ls-accent);
  margin-bottom: 10px;
}
.ls-page-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  color: var(--ls-title);
  margin: 0 0 12px;
}
.ls-page-hero .desc {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ls-text);
  font-size: 15px;
  line-height: 1.8;
}

/* ---------- 产品选择页 ---------- */
.ls-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
  padding: 56px 0 72px;
}
.ls-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  background: #fff;
  border: 1px solid var(--ls-border);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(22, 24, 54, .05);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  overflow: hidden;
}
.ls-product-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ls-accent), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.ls-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(22, 24, 54, .1);
  border-color: rgba(var(--dt-main-rgb, 27, 132, 21), .45);
}
.ls-product-card:hover::before { opacity: 1; }
.ls-product-card .icon {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--ls-accent);
  background: var(--ls-accent-soft);
  border-radius: 12px;
  margin-bottom: 18px;
}
.ls-product-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ls-title);
  margin: 0 0 4px;
}
.ls-product-card h2 a { color: var(--ls-title); text-decoration: none; }
.ls-product-card h2 a:hover { color: var(--ls-accent); }
.ls-product-card .tagline {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ls-accent);
  margin-bottom: 14px;
}
.ls-product-card .desc {
  flex: 1;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ls-text);
  margin-bottom: 22px;
}
.ls-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ls-accent);
  border-radius: 8px;
  text-decoration: none;
  transition: filter .25s ease, transform .25s ease;
}
.ls-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ls-status-box {
  padding: 60px 0 80px;
  text-align: center;
  color: var(--ls-text);
}

/* ---------- 技术文档页 ---------- */
.docs-layout {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  padding: 44px 0 72px;
}
.ls-docbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 112px 0 4px;
}
.ls-docbar .crumb {
  font-size: 13px;
  color: var(--ls-text);
}
.ls-docbar .crumb a { color: var(--ls-accent); text-decoration: none; }
.ls-docbar .prod-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ls-title);
}

/* 左侧目录 */
.ls-docs-sidebar {
  width: 288px;
  flex-shrink: 0;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: var(--ls-bg-soft);
  border: 1px solid var(--ls-border);
  border-radius: 12px;
  padding: 14px 10px;
}
.ls-docs-sidebar .side-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ls-accent);
  padding: 4px 10px 12px;
}
.ls-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 16px;
}
.ls-tree > ul { padding-left: 0; }
.ls-tree li {
  position: relative;
  margin: 1px 0;
}
.ls-tree .node-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ls-text);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
  cursor: pointer;
}
.ls-tree .node-link:hover { background: rgba(var(--dt-main-rgb, 27, 132, 21), .08); color: var(--ls-title); }
.ls-tree .node-link.active {
  background: var(--ls-accent);
  color: #fff;
  font-weight: 600;
}
.ls-tree .node-link.has-child .caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  font-size: 10px;
  color: inherit;
  opacity: .7;
  transition: transform .25s ease;
}
.ls-tree .node-link.has-child.collapsed .caret { transform: rotate(-90deg); }
.ls-tree .sub { overflow: hidden; }

/* 右侧内容 */
.ls-docs-content {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--ls-border);
  border-radius: 14px;
  padding: 44px 48px 56px;
  box-shadow: 0 6px 24px rgba(22, 24, 54, .04);
}
.ls-docs-content .doc-empty { color: var(--ls-text); padding: 60px 0; text-align: center; }

/* ---------- tiptap 内容渲染（与编辑器输出 schema 对应） ---------- */
.tiptap-content { color: var(--ls-text); font-size: 15px; line-height: 1.9; }
.tiptap-content > :first-child { margin-top: 0; }
.tiptap-content h1, .tiptap-content h2, .tiptap-content h3, .tiptap-content h4 {
  color: var(--ls-title);
  font-weight: 700;
  line-height: 1.35;
  margin: 34px 0 14px;
}
.tiptap-content h1 { font-size: 26px; }
.tiptap-content h2 { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--ls-border); }
.tiptap-content h3 { font-size: 18px; }
.tiptap-content h4 { font-size: 16px; }
.tiptap-content p { margin: 12px 0; }
.tiptap-content a { color: var(--ls-accent); text-decoration: underline; text-underline-offset: 3px; }
.tiptap-content strong { color: var(--ls-title); font-weight: 700; }
.tiptap-content s { color: #9a9aa6; }
.tiptap-content mark { background: #fef08a; padding: 1px 4px; border-radius: 3px; }
.tiptap-content sup { font-size: .72em; vertical-align: super; }
.tiptap-content sub { font-size: .72em; vertical-align: sub; }
.tiptap-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .88em;
  background: #e2f4e9;
  color: var(--ls-title);
  padding: 2px 6px;
  border-radius: 5px;
}
.tiptap-content pre {
  background: #1e2235;
  color: #e8eaf6;
  border-radius: 10px;
  padding: 0;
  margin: 18px 0;
  overflow: hidden;
}
.tiptap-content pre .code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
}
.tiptap-content pre .code-lang {
  color: rgba(232, 234, 246, 0.45);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 1px;
}
.tiptap-content pre .code-copy {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(232, 234, 246, 0.45);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: color .2s, border-color .2s;
}
.tiptap-content pre .code-copy:hover {
  color: #e8eaf6;
  border-color: rgba(255,255,255,0.3);
}
.tiptap-content pre .code-copy.copied {
  color: #4ade80;
  border-color: #4ade80;
}
.tiptap-content pre code {
  display: block;
  background: transparent;
  color: inherit;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.8;
  overflow-x: auto;
}
.tiptap-content blockquote {
  margin: 18px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--ls-accent);
  background: #e2f4e9;
  border-radius: 0 10px 10px 0;
  color: var(--ls-title);
}
.tiptap-content blockquote p { margin: 4px 0; }
.tiptap-content ul, .tiptap-content ol { margin: 12px 0; padding-left: 26px; }
.tiptap-content ul { list-style: disc; }
.tiptap-content ol { list-style: decimal; }
.tiptap-content li { margin: 6px 0; }
.tiptap-content li::marker { color: var(--ls-accent); font-weight: 600; }
.tiptap-content ul[data-type="taskList"] {
  list-style: none;
  padding-left: 2px;
}
.tiptap-content ul[data-type="taskList"] > li[data-type="taskItem"] {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.tiptap-content ul[data-type="taskList"] label {
  flex-shrink: 0;
}
.tiptap-content ul[data-type="taskList"] input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border: 2px solid #c4c7d8;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
}
.tiptap-content ul[data-type="taskList"] input[type="checkbox"]:checked {
  background: var(--ls-accent);
  border-color: var(--ls-accent);
}
.tiptap-content ul[data-type="taskList"] input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 0px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.tiptap-content ul[data-type="taskList"] li[data-checked="false"] > div p { color: #8a8b96; }
.tiptap-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0;
  font-size: 14px;
  border: 1px solid var(--ls-border);
  border-radius: 10px;
  overflow: hidden;
}
.tiptap-content th, .tiptap-content td {
  border: 0;
  padding: 10px 14px;
  text-align: left;
}
.tiptap-content th + th, .tiptap-content th + td, .tiptap-content td + th, .tiptap-content td + td { border-left: 1px solid var(--ls-border); }
.tiptap-content tr + tr th, .tiptap-content tr + tr td { border-top: 1px solid var(--ls-border); }
.tiptap-content th {
  background: var(--ls-bg-soft);
  color: var(--ls-title);
  font-weight: 600;
}
.tiptap-content tr:nth-child(even) td { background: rgba(251, 250, 255, .6); }
.tiptap-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 18px 0;
  box-shadow: 0 6px 18px rgba(22, 24, 54, .08);
}
.tiptap-content hr {
  border: 0;
  height: 1px;
  background: var(--ls-border);
  margin: 26px 0;
}
.tiptap-content .placeholder-empty { color: #b0b2c0; font-style: italic; }

/* ---------- 新闻页 ---------- */
.ls-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
  padding: 52px 0 72px;
}
.ls-news-card {
  background: #fff;
  border: 1px solid var(--ls-border);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 6px 24px rgba(22, 24, 54, .05);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.ls-news-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(22, 24, 54, .1); }
.ls-news-card .date {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ls-accent);
  margin-bottom: 10px;
}
.ls-news-card h2 { font-size: 18px; color: var(--ls-title); margin: 0 0 10px; line-height: 1.5; }
.ls-news-card h2 a { color: var(--ls-title); text-decoration: none; }
.ls-news-card h2 a:hover { color: var(--ls-accent); }
.ls-news-card .excerpt { flex: 1; font-size: 14px; line-height: 1.8; color: var(--ls-text); margin-bottom: 16px; }
.ls-news-card .more { font-size: 13px; font-weight: 600; color: var(--ls-accent); text-decoration: none; }
.ls-news-card .more:hover { text-decoration: underline; }

/* ---------- 新闻详情页 ---------- */
.ls-news-detail-wrap {
  padding: 120px 0 80px;
}
.ls-news-detail {
  max-width: 820px;
  margin: 0 auto;
}
.ls-news-detail .back {
  display: inline-block;
  margin-bottom: 26px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ls-accent);
  text-decoration: none;
}
.ls-news-detail .back:hover { text-decoration: underline; }
.ls-news-detail .title {
  font-size: 30px;
  line-height: 1.35;
  color: var(--ls-title);
  margin: 0 0 14px;
}
.ls-news-detail .date {
  font-size: 13px;
  color: var(--ls-text);
}
.ls-news-detail .meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ls-text);
}
.ls-news-detail .meta .author {
  font-weight: 600;
  color: var(--ls-accent);
}
.ls-news-detail .body {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--ls-border);
}
/* 新闻正文：顶距收紧、无内边距与分隔线 */
.ls-news-detail .body.news-body {
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
}
/* 新闻正文标题（tiptap h2）弱化配色 */
.ls-news-detail .body.news-body.tiptap-content h2 {
  color: #1e1e2a7a;
}
.ls-news-detail .notfound {
  font-size: 15px;
  color: var(--ls-text);
}

/* ---------- 内容区填满视口（卡片高度不变，仅放大空白至屏幕底部） ---------- */
.ls-products {
  min-height: calc(100vh - 320px);
}
.ls-news {
  min-height: calc(100vh - 320px);
}
.docs-layout {
  min-height: calc(100vh - 136px);
}
#content.site-content.ls-news-detail-main {
  min-height: 100vh;
}

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
  .docs-layout { flex-direction: column; }
  .ls-docs-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
  .ls-docs-content { padding: 30px 22px 40px; }
}
@media (max-width: 575px) {
  .ls-page-hero { padding: 110px 0 44px; }
  .ls-products-grid, .ls-news-grid { grid-template-columns: 1fr; }
}