/*
 * 析势录 XISHILU · 顶部与底部共用样式
 * 根节点：#xsl-top.xsl-scope / #xsl-footer.xsl-scope
 * 所有选择器均限制在这两个根节点内，不写入宿主 body、:root 或全局标签。
 * 采用 ID + 命名空间、局部属性重置、组件内变量，抵御常见主题样式污染。
 */

#xsl-top.xsl-scope,
#xsl-footer.xsl-scope {
  all: initial;
  --xsl-paper: #f7f8f4;
  --xsl-white: #fffefa;
  --xsl-ink: #1d302d;
  --xsl-green: #154b46;
  --xsl-muted: #53655f;
  --xsl-soft: #67746e;
  --xsl-gold: #927541;
  --xsl-line: #dce3dc;
  --xsl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  box-sizing: border-box;
  display: block;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
  color: var(--xsl-ink);
  background: var(--xsl-paper);
  font-family: var(--xsl-font);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  text-indent: 0;
  direction: ltr;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* revert 保留 div、h1、列表等元素的语义显示方式，同时撤销常见宿主作者样式。 */
#xsl-top.xsl-scope :where(*),
#xsl-footer.xsl-scope :where(*) {
  all: revert;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: none;
  text-indent: 0;
  text-shadow: none;
  text-decoration: none;
  overflow-wrap: inherit;
}

#xsl-top.xsl-scope :where(*)::before,
#xsl-top.xsl-scope :where(*)::after,
#xsl-footer.xsl-scope :where(*)::before,
#xsl-footer.xsl-scope :where(*)::after {
  all: revert;
  box-sizing: border-box;
  content: none;
}

#xsl-top.xsl-scope .xsl-wrap,
#xsl-footer.xsl-scope .xsl-wrap {
  display: block;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 44px;
}

#xsl-top.xsl-scope { border-top: 3px solid var(--xsl-green); border-bottom: 1px solid var(--xsl-line); }
#xsl-top.xsl-scope .xsl-masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 0; border-bottom: 1px solid var(--xsl-line); }
#xsl-top.xsl-scope .xsl-brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
#xsl-top.xsl-scope .xsl-brand-mark { display: block; width: 52px; height: 52px; max-width: none; object-fit: contain; }
#xsl-top.xsl-scope .xsl-wordmark { display: flex; flex-direction: column; gap: 2px; }
#xsl-top.xsl-scope .xsl-brand-name { display: block; color: var(--xsl-green); font-size: 27px; font-weight: 750; letter-spacing: 5px; line-height: 1.25; }
#xsl-top.xsl-scope .xsl-brand-en { display: block; color: var(--xsl-soft); font-size: 10px; font-weight: 600; letter-spacing: 2.4px; line-height: 1.4; }
#xsl-top.xsl-scope .xsl-edition { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
#xsl-top.xsl-scope .xsl-edition-cn { display: block; color: var(--xsl-muted); font-size: 12px; letter-spacing: 2px; }
#xsl-top.xsl-scope .xsl-edition-en { display: block; color: var(--xsl-soft); font-size: 9px; font-weight: 550; letter-spacing: 1.3px; }
#xsl-top.xsl-scope .xsl-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .58fr); align-items: center; gap: 56px; padding: 46px 0 42px; }
#xsl-top.xsl-scope .xsl-hero-copy { display: block; }
#xsl-top.xsl-scope .xsl-eyebrow { display: block; padding-left: 13px; border-left: 3px solid var(--xsl-gold); color: var(--xsl-muted); font-size: 12px; font-weight: 550; letter-spacing: 1.1px; line-height: 1.5; }
#xsl-top.xsl-scope .xsl-title { display: block; width: auto; max-width: none; margin: 22px 0; color: var(--xsl-ink); font-family: "Noto Serif CJK SC", "Noto Serif SC", "Songti SC", "Source Han Serif SC", SimSun, serif; font-size: clamp(42px, 4.6vw, 64px); font-weight: 700; line-height: 1.27; letter-spacing: 1px; }
#xsl-top.xsl-scope .xsl-title-line { display: block; }
#xsl-top.xsl-scope .xsl-title-accent { color: var(--xsl-green); }
#xsl-top.xsl-scope .xsl-lead { display: block; max-width: 590px; color: var(--xsl-muted); font-size: 14px; line-height: 1.95; }
#xsl-top.xsl-scope .xsl-desktop-break { display: inline; }
#xsl-top.xsl-scope .xsl-editorial-note { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--xsl-gold); font-size: 11px; letter-spacing: .7px; }
#xsl-top.xsl-scope .xsl-note-rule { display: block; width: 24px; height: 1px; flex-shrink: 0; background: var(--xsl-gold); }
#xsl-top.xsl-scope .xsl-focus { display: block; padding: 6px 0 6px 30px; border-left: 1px solid var(--xsl-line); }
#xsl-top.xsl-scope .xsl-focus-kicker { display: block; margin-bottom: 10px; color: var(--xsl-gold); font-size: 10px; font-weight: 600; letter-spacing: 1.7px; }
#xsl-top.xsl-scope .xsl-topic-list { display: block; }
#xsl-top.xsl-scope .xsl-topic { display: block; padding: 12px 0; border-bottom: 1px solid var(--xsl-line); }
#xsl-top.xsl-scope .xsl-topic:last-child { border-bottom: 0; padding-bottom: 0; }
#xsl-top.xsl-scope .xsl-topic-title { display: flex; align-items: baseline; gap: 13px; color: var(--xsl-ink); font-size: 15px; font-weight: 650; }
#xsl-top.xsl-scope .xsl-topic-num { display: inline-block; min-width: 18px; color: var(--xsl-gold); font-family: Georgia, serif; font-size: 12px; font-weight: 400; }
#xsl-top.xsl-scope .xsl-topic-desc { display: block; margin: 3px 0 0 31px; color: var(--xsl-muted); font-size: 11px; line-height: 1.8; }
#xsl-top.xsl-scope .xsl-editorial-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 20px 0; border-top: 1px solid var(--xsl-line); }
#xsl-top.xsl-scope .xsl-editorial-item { display: flex; align-items: baseline; gap: 12px; }
#xsl-top.xsl-scope .xsl-mini-label { display: inline-block; flex-shrink: 0; color: var(--xsl-green); font-size: 11px; font-weight: 650; letter-spacing: 1px; }
#xsl-top.xsl-scope .xsl-mini-text { display: inline; color: var(--xsl-muted); font-size: 11px; }

/* Footer */
#xsl-footer.xsl-scope { border-top: 2px solid var(--xsl-green); background: var(--xsl-white); }
#xsl-footer.xsl-scope .xsl-footer-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--xsl-line); }
#xsl-footer.xsl-scope .xsl-footer-brand { display: flex; align-items: center; gap: 14px; }
#xsl-footer.xsl-scope .xsl-footer-mark { display: block; width: 44px; height: 44px; max-width: none; object-fit: contain; }
#xsl-footer.xsl-scope .xsl-footer-name { display: block; color: var(--xsl-green); font-size: 22px; font-weight: 700; letter-spacing: 3px; line-height: 1.4; }
#xsl-footer.xsl-scope .xsl-footer-en { display: inline; margin-left: 10px; color: var(--xsl-soft); font-size: 10px; font-weight: 500; letter-spacing: 2px; }
#xsl-footer.xsl-scope .xsl-footer-tagline { display: block; margin-top: 2px; color: var(--xsl-muted); font-size: 11px; letter-spacing: .7px; }
#xsl-footer.xsl-scope .xsl-footer-motto { display: block; color: var(--xsl-gold); font-family: Georgia, serif; font-size: 20px; letter-spacing: 1.2px; }
#xsl-footer.xsl-scope .xsl-resource-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 27px 0 20px; }
#xsl-footer.xsl-scope .xsl-resource-title { display: block; color: var(--xsl-ink); font-size: 18px; font-weight: 650; letter-spacing: 1.2px; }
#xsl-footer.xsl-scope .xsl-resource-caption { display: block; color: var(--xsl-soft); font-size: 11px; letter-spacing: .5px; }
#xsl-footer.xsl-scope .xsl-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; }
#xsl-footer.xsl-scope .xsl-resource-group { display: block; }
#xsl-footer.xsl-scope .xsl-group-title { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; color: var(--xsl-green); font-size: 13px; font-weight: 650; border-bottom: 1px solid var(--xsl-line); }
#xsl-footer.xsl-scope .xsl-group-index { display: inline; color: var(--xsl-gold); font-family: Georgia, serif; font-size: 11px; font-weight: 400; }
#xsl-footer.xsl-scope .xsl-group-en { display: inline; margin-left: auto; color: var(--xsl-soft); font-size: 9px; font-weight: 500; letter-spacing: 1px; }
#xsl-footer.xsl-scope .xsl-link-list { display: block; list-style: none; }
#xsl-footer.xsl-scope .xsl-link-item { display: block; list-style: none; border-bottom: 1px solid #edf0eb; }
#xsl-footer.xsl-scope .xsl-resource-link { display: flex; position: relative; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 49px; padding: 12px 0; color: var(--xsl-ink); background: transparent; font-size: 12px; line-height: 1.6; text-decoration: none; cursor: pointer; border-radius: 2px; transition: color .16s ease, background-color .16s ease; }
#xsl-footer.xsl-scope .xsl-resource-link:visited { color: var(--xsl-ink); }
#xsl-footer.xsl-scope .xsl-resource-link:hover { color: var(--xsl-green); background: #f1f5ee; }
#xsl-footer.xsl-scope .xsl-resource-link:focus-visible { outline: 2px solid var(--xsl-green); outline-offset: 3px; }
#xsl-footer.xsl-scope .xsl-link-name { display: inline; color: inherit; font-weight: 550; }
#xsl-footer.xsl-scope .xsl-link-meta { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; color: var(--xsl-soft); font-size: 9px; }
#xsl-footer.xsl-scope .xsl-link-arrow { display: inline; flex-shrink: 0; color: var(--xsl-gold); font-family: var(--xsl-font); font-size: 15px; }
#xsl-footer.xsl-scope .xsl-external-note { display: block; margin: 18px 0 25px; color: var(--xsl-soft); font-size: 10px; line-height: 1.8; }
#xsl-footer.xsl-scope .xsl-statement { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; padding: 25px 0; border-top: 1px solid var(--xsl-line); border-bottom: 1px solid var(--xsl-line); }
#xsl-footer.xsl-scope .xsl-statement-item { display: block; }
#xsl-footer.xsl-scope .xsl-statement-title { display: block; margin-bottom: 8px; color: var(--xsl-muted); font-size: 11px; font-weight: 650; }
#xsl-footer.xsl-scope .xsl-statement-text { display: block; color: var(--xsl-muted); font-size: 11px; line-height: 1.95; }
#xsl-footer.xsl-scope .xsl-footer-bottom { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 20px 0; }
#xsl-footer.xsl-scope .xsl-copyright,
#xsl-footer.xsl-scope .xsl-footer-bottom-note { display: block; color: var(--xsl-soft); font-size: 10px; line-height: 1.8; letter-spacing: .3px; }

/* 根据组件容器宽度适配：即使嵌入较窄内容栏，也不依赖浏览器总宽度。 */
#xsl-top.xsl-scope,
#xsl-footer.xsl-scope { container-name: xishilu; container-type: inline-size; }

@container xishilu (max-width: 900px) {
  #xsl-top.xsl-scope .xsl-wrap, #xsl-footer.xsl-scope .xsl-wrap { padding-right: 28px; padding-left: 28px; }
  #xsl-top.xsl-scope .xsl-hero { gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(240px, .72fr); }
  #xsl-top.xsl-scope .xsl-title { font-size: 46px; }
  #xsl-top.xsl-scope .xsl-focus { padding-left: 22px; }
  #xsl-top.xsl-scope .xsl-editorial-item { flex-direction: column; gap: 3px; }
  #xsl-top.xsl-scope .xsl-desktop-break { display: none; }
  #xsl-footer.xsl-scope .xsl-resource-grid, #xsl-footer.xsl-scope .xsl-statement { gap: 24px; }
  #xsl-footer.xsl-scope .xsl-link-meta { display: none; }
}

@container xishilu (max-width: 620px) {
  #xsl-top.xsl-scope .xsl-wrap, #xsl-footer.xsl-scope .xsl-wrap { padding-right: 22px; padding-left: 22px; }
  #xsl-top.xsl-scope .xsl-masthead { padding: 20px 0; }
  #xsl-top.xsl-scope .xsl-brand-mark { width: 44px; height: 44px; }
  #xsl-top.xsl-scope .xsl-brand-name { font-size: 24px; }
  #xsl-top.xsl-scope .xsl-edition-cn { font-size: 10px; letter-spacing: .5px; }
  #xsl-top.xsl-scope .xsl-edition-en { display: none; }
  #xsl-top.xsl-scope .xsl-hero { display: block; padding: 30px 0; }
  #xsl-top.xsl-scope .xsl-eyebrow { font-size: 10px; letter-spacing: .3px; }
  #xsl-top.xsl-scope .xsl-title { font-size: clamp(38px, 9cqi, 48px); margin: 19px 0; }
  #xsl-top.xsl-scope .xsl-lead { font-size: 13px; }
  #xsl-top.xsl-scope .xsl-editorial-note { margin-top: 18px; font-size: 10px; }
  #xsl-top.xsl-scope .xsl-focus { margin-top: 28px; padding: 22px 0 0; border-top: 1px solid var(--xsl-line); border-left: 0; }
  #xsl-top.xsl-scope .xsl-focus-kicker { font-size: 9px; margin-bottom: 5px; }
  #xsl-top.xsl-scope .xsl-topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  #xsl-top.xsl-scope .xsl-topic { padding: 12px 0 10px; }
  #xsl-top.xsl-scope .xsl-topic:nth-last-child(-n+2) { border-bottom: 0; }
  #xsl-top.xsl-scope .xsl-topic:last-child { padding-bottom: 10px; }
  #xsl-top.xsl-scope .xsl-topic-title { gap: 8px; font-size: 13px; }
  #xsl-top.xsl-scope .xsl-topic-num { font-size: 10px; min-width: 14px; }
  #xsl-top.xsl-scope .xsl-topic-desc { margin-left: 0; font-size: 10px; line-height: 1.8; }
  #xsl-top.xsl-scope .xsl-editorial-line { gap: 14px; padding: 17px 0; }
  #xsl-top.xsl-scope .xsl-mini-text { font-size: 10px; }
  #xsl-footer.xsl-scope .xsl-footer-intro { padding: 26px 0; }
  #xsl-footer.xsl-scope .xsl-footer-motto { display: none; }
  #xsl-footer.xsl-scope .xsl-footer-en { display: block; margin: 2px 0 0; font-size: 9px; letter-spacing: 1.7px; }
  #xsl-footer.xsl-scope .xsl-resource-heading { padding-top: 25px; padding-bottom: 15px; }
  #xsl-footer.xsl-scope .xsl-resource-title { font-size: 17px; }
  #xsl-footer.xsl-scope .xsl-resource-caption { font-size: 10px; }
  #xsl-footer.xsl-scope .xsl-resource-grid { grid-template-columns: 1fr; gap: 25px; }
  #xsl-footer.xsl-scope .xsl-group-title { font-size: 13px; }
  #xsl-footer.xsl-scope .xsl-link-meta { display: inline-flex; font-size: 10px; }
  #xsl-footer.xsl-scope .xsl-resource-link { min-height: 46px; padding: 11px 0; }
  #xsl-footer.xsl-scope .xsl-statement { grid-template-columns: 1fr; gap: 19px; padding: 23px 0; }
  #xsl-footer.xsl-scope .xsl-statement-title { margin-bottom: 5px; }
  #xsl-footer.xsl-scope .xsl-footer-bottom { display: block; padding: 19px 0; }
  #xsl-footer.xsl-scope .xsl-footer-bottom-note { margin-top: 6px; }
}

/* 不支持容器查询的浏览器：至少保证小屏单列可读。 */
@supports not (container-type: inline-size) {
  @media (max-width: 700px) {
    #xsl-top.xsl-scope .xsl-wrap, #xsl-footer.xsl-scope .xsl-wrap { padding-right: 22px; padding-left: 22px; }
    #xsl-top.xsl-scope .xsl-hero { display: block; padding: 28px 0; }
    #xsl-top.xsl-scope .xsl-title { font-size: 40px; }
    #xsl-top.xsl-scope .xsl-focus { border-left: 0; border-top: 1px solid var(--xsl-line); margin-top: 26px; padding: 22px 0 0; }
    #xsl-top.xsl-scope .xsl-edition-en, #xsl-footer.xsl-scope .xsl-footer-motto, #xsl-top.xsl-scope .xsl-desktop-break { display: none; }
    #xsl-top.xsl-scope .xsl-editorial-item { display: block; }
    #xsl-top.xsl-scope .xsl-mini-label { display: block; }
    #xsl-footer.xsl-scope .xsl-resource-grid, #xsl-footer.xsl-scope .xsl-statement { grid-template-columns: 1fr; gap: 24px; }
    #xsl-footer.xsl-scope .xsl-footer-bottom { display: block; }
  }
}

@media (prefers-reduced-motion: reduce) {
  #xsl-footer.xsl-scope .xsl-resource-link { transition: none; }
}

@media print {
  #xsl-top.xsl-scope, #xsl-footer.xsl-scope { background: #fff; break-inside: avoid; }
  #xsl-top.xsl-scope .xsl-title { font-size: 36px; }
  #xsl-footer.xsl-scope .xsl-resource-link { color: #111; }
}

/* 320px 等较窄栏位优先保留完整品牌名。 */
@container xishilu (max-width: 380px) {
  #xsl-top.xsl-scope .xsl-edition { display: none; }
}

