/* Shared article presentation. This file is independent of the gateway bundle. */
:root {
  color-scheme: light;
  --article-signal: #b7e500;
  --article-bg: #f7f8f6;
  --article-surface: #fff;
  --article-ink: #182018;
  --article-muted: #6c756c;
  --article-border: #e4e8e1;
  --article-soft: #eff3e9;
  --article-shadow: 0 12px 40px rgb(27 36 22 / 3%);
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body.q7Articles {
  margin: 0;
  background: var(--article-bg);
  color: var(--article-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.q7Articles *, .q7Articles *::before, .q7Articles *::after { box-sizing: border-box; }
.q7Articles a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.q7Articles button { font: inherit; }
.q7Articles [hidden] { display: none !important; }
.q7Articles img { max-width: 100%; }
.skipLink { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 10px 16px; background: var(--article-signal); color: #182018 !important; }
.skipLink:focus { top: 12px; }
.q7Articles a:focus-visible, .q7Articles button:focus-visible, .q7Articles summary:focus-visible {
  outline: 3px solid var(--article-signal);
  outline-offset: 5px;
  border-radius: 3px;
}
.q7Articles ::selection { background: #d8ef83; color: #182018; }

.articleTopbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: 72px;
  padding: 13px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--article-border);
  background: var(--article-surface);
}
.articleBrand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.articleBrand img { display: block; width: 34px; height: 34px; object-fit: contain; }
.articleBrand strong { font-size: 19px; letter-spacing: -.6px; font-weight: 750; }
.articleNav { display: flex; flex: 1; align-items: center; gap: 28px; }
.articleNav a {
  color: var(--article-muted);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
.articleNav a:hover { color: var(--article-ink); }
.backHome {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--article-border);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.backHome:hover { border-color: #a8b197; background: var(--article-soft); }

.articleMain { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 80px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 30px 0 0; color: var(--article-muted); font-size: 12px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--article-ink); }
.articleHero { padding: 49px 0 41px; border-bottom: 1px solid var(--article-border); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--article-muted); font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--article-signal); }
.articleTitle { max-width: 960px; margin: 0; font-size: clamp(30px, 3.3vw, 44px); font-weight: 730; line-height: 1.35; letter-spacing: -.045em; overflow-wrap: anywhere; }
.articleDescription { max-width: 720px; margin: 17px 0 0; color: var(--article-muted); font-size: 15px; line-height: 1.85; }
.articleMeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 25px; color: var(--article-muted); font-size: 12px; }
.articleMeta > * { display: inline-flex; align-items: center; gap: 6px; }
.articleLayout { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 40px; margin-top: 40px; }
.articleToc { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--article-border) transparent; }
.articleToc.is-empty { display: none; }
.articleToc details { padding: 2px 0 20px; }
.articleToc summary { margin-bottom: 16px; font-size: 13px; font-weight: 700; cursor: pointer; list-style-position: outside; margin-left: 16px; }
.articleToc ol { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.articleToc li { min-width: 0; }
.tocLink {
  display: block;
  padding: 9px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 5px 5px 0;
  color: var(--article-muted) !important;
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
  overflow-wrap: anywhere;
}
.tocLink:hover { color: var(--article-ink) !important; background: var(--article-soft); }
.tocLink.is-active, .tocLink[aria-current="location"] { border-left-color: var(--article-signal); background: var(--article-soft); color: var(--article-ink) !important; font-weight: 650; }
.articleBody { min-width: 0; padding: 36px 43px 40px; border: 1px solid var(--article-border); border-radius: 12px; background: var(--article-surface); box-shadow: var(--article-shadow); font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.articleBody > :first-child { margin-top: 0; }
.articleBody > :last-child { margin-bottom: 0; }
.articleBody h2 { margin: 42px 0 17px; padding-top: 26px; border-top: 1px solid var(--article-border); font-size: 22px; font-weight: 700; line-height: 1.5; letter-spacing: -.035em; scroll-margin-top: 100px; }
.articleBody h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.articleBody h3 { margin: 26px 0 12px; font-size: 17px; font-weight: 650; line-height: 1.65; scroll-margin-top: 100px; }
.articleBody p { margin: 0 0 17px; }
.articleBody ul, .articleBody ol { margin: 0 0 20px; padding-left: 1.5em; }
.articleBody li { margin: 7px 0; padding-left: 3px; }
.articleBody li::marker { color: var(--article-muted); }
.articleBody strong { font-weight: 750; }
.articleBody a { text-decoration-color: #9cb25e; overflow-wrap: anywhere; }
.articleBody a:hover { text-decoration-color: currentColor; }
.articleBody blockquote { margin: 24px 0; padding: 16px 20px; border-left: 3px solid var(--article-signal); border-radius: 0 6px 6px 0; background: var(--article-soft); }
.articleBody blockquote p:last-child { margin-bottom: 0; }
.articleBody table { width: 100%; border-collapse: collapse; font-size: 14px; }
.articleBody th, .articleBody td { padding: 10px 12px; border: 1px solid var(--article-border); text-align: left; }
.articleBody th { background: var(--article-soft); }
.articleBody pre { max-width: 100%; overflow: auto; padding: 16px; border-radius: 6px; background: var(--article-bg); font-size: 13px; }
.articleActions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.articleActions button, .articleActions a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; margin: 0; padding: 7px 13px; border: 1px solid var(--article-border); border-radius: 6px; background: var(--article-surface); color: var(--article-ink); font-size: 12px; font-weight: 550; text-decoration: none; cursor: pointer; }
.articleActions button:hover, .articleActions a:hover { background: var(--article-soft); }
.relatedArticles { margin: 48px 0 0 270px; }
.relatedArticles > h2 { margin: 0 0 18px; font-size: 16px; font-weight: 650; }
.relatedCard { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px 25px; border: 1px solid var(--article-border); border-radius: 10px; background: var(--article-surface); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.relatedCard:hover { border-color: #a8b197; transform: translateY(-2px); }
.relatedCard strong { display: block; font-size: 15px; font-weight: 650; }
.relatedCard p, .relatedCard small { display: block; margin: 6px 0 0; color: var(--article-muted); font-size: 12px; line-height: 1.7; }
.relatedCard::after { content: "\2192"; color: var(--article-muted); font-size: 20px; }
.articleFooter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding: 26px max(24px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--article-border); background: var(--article-surface); color: var(--article-muted); font-size: 12px; }
.articleFooter p { margin: 0; }
.articleFooter nav, .articleFooter > div { display: flex; flex-wrap: wrap; gap: 22px; }
.articleFooter a { text-decoration: none; }
.articleFooter a:hover { color: var(--article-ink); text-decoration: underline; }

.articleIndexGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 36px; }
.articleIndexCard { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 260px; padding: 28px; border: 1px solid var(--article-border); border-radius: 12px; background: var(--article-surface); box-shadow: var(--article-shadow); text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.articleIndexCard:hover { transform: translateY(-3px); border-color: #a8b197; }
.articleIndexIcon { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 25px; border-radius: 9px; background: var(--article-soft); color: var(--article-ink); font-size: 20px; }
.articleIndexIcon svg { width: 21px; height: 21px; }
.articleIndexCard h2 { margin: 0 0 10px; font-size: 21px; font-weight: 700; line-height: 1.45; letter-spacing: -.03em; }
.articleIndexCard p { margin: 0 0 26px; color: var(--article-muted); font-size: 14px; line-height: 1.8; }
.articleIndexCard small { margin-top: auto; color: var(--article-muted); font-size: 12px; }
.cardArrow { position: absolute; right: 28px; bottom: 24px; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--article-signal); color: #182018; font-size: 18px; }

@media (max-width: 1000px) {
  .articleLayout { grid-template-columns: 200px minmax(0, 1fr); gap: 26px; }
  .articleBody { padding: 30px; }
  .relatedArticles { margin-left: 226px; }
}
@media (max-width: 900px) {
  .articleTopbar { gap: 24px; }
  .articleNav { gap: 20px; }
  .articleLayout { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 26px; }
  .articleToc { position: static; max-height: none; overflow: visible; padding: 0 19px; border: 1px solid var(--article-border); border-radius: 8px; background: var(--article-surface); }
  .articleToc details { padding: 0; }
  .articleToc summary { margin: 0 0 0 16px; padding: 15px 0; }
  .articleToc details[open] { padding-bottom: 15px; }
  .articleToc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .relatedArticles { margin-left: 0; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 84px; }
  .articleTopbar { gap: 14px; min-height: 64px; padding: 12px 20px; }
  .articleBrand { gap: 8px; }
  .articleBrand img { width: 30px; height: 30px; }
  .articleBrand strong { font-size: 17px; }
  .articleNav { gap: 16px; margin-left: auto; flex: 0 1 auto; }
  .articleNav a { font-size: 12px; }
  .articleNav a:first-child { display: none; }
  .backHome { display: none; }
  .articleMain { width: calc(100% - 36px); padding-bottom: 46px; }
  .breadcrumbs { margin-top: 23px; font-size: 11px; }
  .articleHero { padding: 33px 0 29px; }
  .eyebrow { margin-bottom: 13px; font-size: 10px; }
  .articleTitle { font-size: 29px; line-height: 1.4; letter-spacing: -.04em; }
  .articleDescription { margin-top: 13px; font-size: 14px; line-height: 1.8; }
  .articleMeta { gap: 6px 16px; margin-top: 20px; font-size: 11px; }
  .articleToc ol { grid-template-columns: minmax(0, 1fr); }
  .articleToc summary { font-size: 12px; }
  .tocLink { padding: 8px 10px; }
  .articleBody { padding: 23px 21px 27px; border-radius: 9px; font-size: 14px; line-height: 1.95; }
  .articleBody h2 { margin-top: 33px; padding-top: 24px; font-size: 19px; scroll-margin-top: 84px; }
  .articleBody h3 { margin-top: 23px; font-size: 16px; scroll-margin-top: 84px; }
  .articleBody p { margin-bottom: 16px; }
  .articleActions { justify-content: flex-start; margin-top: 19px; }
  .relatedArticles { margin-top: 32px; }
  .relatedCard { padding: 20px; gap: 16px; }
  .articleFooter { align-items: flex-start; flex-direction: column; gap: 13px; padding: 24px 20px; font-size: 11px; }
  .articleFooter nav, .articleFooter > div { gap: 18px; }
  .articleIndexGrid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 26px; }
  .articleIndexCard { min-height: 235px; padding: 24px; }
  .articleIndexCard h2 { font-size: 20px; }
  .articleIndexIcon { margin-bottom: 20px; }
  .cardArrow { right: 24px; bottom: 21px; }
}
@media (max-width: 360px) {
  .articleTopbar { padding-inline: 16px; gap: 10px; }
  .articleBrand strong { font-size: 15px; }
  .articleNav { gap: 12px; }
  .articleNav a { font-size: 11px; }
  .articleMain { width: calc(100% - 28px); }
  .articleBody { padding-inline: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .q7Articles *, .q7Articles *::before, .q7Articles *::after { transition: none !important; animation: none !important; }
}
@media print {
  :root { color-scheme: light; --article-bg: #fff; --article-surface: #fff; --article-ink: #000; --article-muted: #555; --article-border: #ddd; }
  @page { margin: 18mm 17mm; }
  body.q7Articles { font-size: 10.5pt; background: #fff; }
  .articleTopbar, .breadcrumbs, .articleToc, .articleActions, .relatedArticles, .articleFooter { display: none !important; }
  .articleMain { width: 100%; max-width: none; margin: 0; padding: 0; }
  .articleHero { padding: 0 0 18pt; }
  .eyebrow { margin-bottom: 8pt; }
  .articleTitle { max-width: none; font-size: 24pt; }
  .articleDescription { max-width: none; font-size: 10.5pt; }
  .articleMeta { margin-top: 12pt; font-size: 9pt; }
  .articleLayout { display: block; margin-top: 20pt; }
  .articleBody { padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: 10.5pt; line-height: 1.85; }
  .articleBody h2 { break-after: avoid; margin-top: 22pt; padding-top: 13pt; font-size: 14pt; }
  .articleBody h3 { break-after: avoid; font-size: 11.5pt; }
  .articleBody p, .articleBody li { orphans: 3; widows: 3; }
  .articleBody a { color: #000; text-decoration: underline; }
  .articleIndexGrid { display: block; }
  .articleIndexCard { min-height: auto; margin: 16pt 0; break-inside: avoid; box-shadow: none; }
}
