/* ==========================================================================
   365安卓客 · 共享站点样式 /assets/site.css
   青岩灰基底 · 暖纸面 · 橙红印刷色 · 深墨蓝信息层级
   ========================================================================== */

:root {
  --ink-900: #14283F;
  --ink-800: #1E2A2E;
  --ink-700: #2E4F72;
  --stone-600: #45555A;
  --stone-400: #7D8C8F;
  --paper: #F6F1E7;
  --paper-white: #FCFAF4;
  --orange: #C7431F;
  --orange-deep: #A8361A;
  --orange-soft: #F6C9B8;
  --green: #2F6F5E;
  --amber: #8A5A14;
  --rule: #D9D1C2;

  --rail: 88px;
  --topbar: 56px;
  --gap: 24px;
  --maxw: 1180px;

  --font-sans: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-800);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-locked { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--ink-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }

button { font: inherit; color: inherit; }

/* ---------- 中文排版 ---------- */
h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink-900);
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.2;
  word-break: break-word;
}
h1 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.1; }
h2 { font-size: clamp(24px, 2.9vw, 36px); line-height: 1.22; }
h3 { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.34; }
h4 { font-size: 17px; line-height: 1.45; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; color: var(--ink-900); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}

.serif { font-family: var(--font-serif); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--orange);
  flex: none;
}

.lead {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.85;
  color: var(--stone-600);
}

/* ---------- 焦点 ---------- */
:focus-visible {
  outline: 3px solid var(--ink-900);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(199, 67, 31, .32);
  border-radius: 2px;
}

.topbar a:focus-visible,
.topbar button:focus-visible,
.rail a:focus-visible {
  outline-color: var(--orange-soft);
  box-shadow: 0 0 0 5px rgba(199, 67, 31, .5);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-180%);
  display: inline-block;
  padding: 10px 18px;
  background: var(--ink-900);
  color: var(--paper-white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-left: 4px solid var(--orange);
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--paper-white); }

/* ==========================================================================
   头部
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 120;
}

.topbar__mark,
.rail__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  background: var(--orange);
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  flex: none;
}

.badge-version {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid rgba(246, 241, 231, .3);
  color: var(--orange-soft);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ---------- 移动端顶部窄条 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--topbar);
  padding: 0 14px;
  background: var(--ink-800);
  color: var(--paper-white);
  border-bottom: 1px solid rgba(246, 241, 231, .1);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: var(--paper-white);
  text-decoration: none;
}
.topbar__brand:hover { color: var(--paper-white); }

.topbar__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}

.topbar__version { flex: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid rgba(246, 241, 231, .32);
  border-radius: 2px;
  color: var(--paper-white);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
  flex: none;
}
.nav-toggle:hover { background: rgba(246, 241, 231, .1); border-color: rgba(246, 241, 231, .55); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  flex: none;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), top .22s var(--ease), bottom .22s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.site-header[data-open] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { bottom: 4px; transform: rotate(-45deg); }

/* ---------- 轨道 / 抽屉 ---------- */
.rail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  width: min(340px, 88vw);
  padding: calc(var(--topbar) + 22px) 20px 28px;
  background: var(--ink-900);
  color: rgba(246, 241, 231, .78);
  overflow-y: auto;
  visibility: hidden;
  transform: translateX(102%);
  transition: transform .32s var(--ease), visibility 0s linear .32s;
  box-shadow: -18px 0 40px rgba(20, 40, 63, .28);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { width: 0; height: 0; }

.site-header[data-open] .rail {
  visibility: visible;
  transform: translateX(0);
  transition: transform .32s var(--ease), visibility 0s linear 0s;
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: rgba(20, 40, 63, .52);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* 轨道头部 */
.rail__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(246, 241, 231, .14);
}

.rail__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--paper-white);
  text-decoration: none;
}
.rail__brand:hover { color: var(--paper-white); }

.rail__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}

.rail__version { margin-left: auto; flex: none; }

/* 轨道导航 */
.rail__nav { display: block; }

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__item { display: block; }

.rail__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-left: 2px solid transparent;
  border-radius: 2px;
  color: rgba(246, 241, 231, .76);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.rail__link:hover {
  color: var(--paper-white);
  background: rgba(246, 241, 231, .08);
}
.rail__link:focus-visible { color: var(--paper-white); }

.rail__link[aria-current="page"] {
  color: var(--paper-white);
  background: rgba(199, 67, 31, .18);
  border-left-color: var(--orange);
}
.rail__link[aria-current="page"] .rail__label { font-weight: 700; }
.rail__link[aria-current="page"] .rail__no { color: var(--orange-soft); }

.rail__no {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  color: rgba(125, 140, 143, .95);
  letter-spacing: .02em;
  flex: none;
}

.rail__label { display: block; }

/* 轨道底部 */
.rail__foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.rail__cta {
  display: block;
  padding: 12px 10px;
  background: var(--orange);
  color: var(--paper-white);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .06em;
  text-align: center;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background .18s var(--ease);
}
.rail__cta:hover { background: var(--orange-deep); color: var(--paper-white); }

.rail__mail {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgba(246, 241, 231, .22);
  color: rgba(246, 241, 231, .74);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-align: center;
  text-decoration: none;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.rail__mail:hover { color: var(--orange-soft); border-color: var(--orange); }

/* ---------- 主内容偏移 ---------- */
.site-main {
  display: block;
  padding-top: var(--topbar);
}

/* ==========================================================================
   桌面端：88px 侧边轨道
   ========================================================================== */
@media (min-width: 1024px) {
  .topbar { display: none; }
  .nav-scrim { display: none; }

  .rail {
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--rail);
    padding: 22px 10px 24px;
    align-items: stretch;
    overflow-y: auto;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-right: 1px solid rgba(246, 241, 231, .1);
    transition: none;
  }

  .rail__head {
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 0 0 16px;
    margin-bottom: 16px;
  }

  .rail__brand {
    flex-direction: column;
    align-items: center;
    gap: 7px;
  }

  .rail__name {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .04em;
    text-align: center;
    white-space: nowrap;
  }

  .rail__version {
    margin-left: 0;
    padding: 2px 5px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .rail__list { gap: 3px; }

  .rail__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 8px 5px 8px 6px;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .01em;
    border-left-width: 2px;
    border-radius: 0;
  }

  .rail__no { font-size: 9px; letter-spacing: .06em; }

  .rail__foot {
    align-items: center;
    gap: 14px;
    padding-top: 22px;
  }

  .rail__cta {
    writing-mode: vertical-rl;
    padding: 16px 7px;
    font-size: 12px;
    letter-spacing: .22em;
    align-self: center;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  }

  .rail__mail {
    padding: 0;
    border: 0;
    font-size: 11px;
    letter-spacing: .1em;
    text-align: center;
  }

  .site-main {
    padding-top: 0;
    margin-left: var(--rail);
  }

  .site-footer { margin-left: var(--rail); }

  html { scroll-padding-top: 24px; }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  padding: 34px 0 74px;
  background: var(--ink-800);
  color: rgba(246, 241, 231, .74);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange) 0 132px, rgba(217, 209, 194, .22) 132px 100%);
}

.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62px;
  pointer-events: none;
  opacity: .55;
  background-image:
    linear-gradient(112deg, transparent 49.4%, rgba(246, 241, 231, .13) 50%, transparent 50.6%),
    linear-gradient(68deg, transparent 49.4%, rgba(246, 241, 231, .13) 50%, transparent 50.6%);
  background-size: 96px 62px, 96px 62px;
  background-position: 0 100%, 52px 100%;
  background-repeat: repeat-x;
}

.footer-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(246, 241, 231, .16);
}

.footer-strip__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.footer-strip__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--stone-400);
  text-transform: uppercase;
}

.footer-strip__value {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--paper-white);
  word-break: break-all;
}

.footer-strip__value--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: .02em;
}

.footer-strip__sep {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding-top: 20px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.footer-legal a {
  color: rgba(246, 241, 231, .8);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-legal a:hover {
  color: var(--orange-soft);
  border-bottom-color: var(--orange);
}

.footer-filing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--stone-400);
  letter-spacing: .01em;
}

.footer-filing__copy { color: rgba(246, 241, 231, .6); }

@media (min-width: 768px) {
  .footer-strip { gap: 12px 22px; }
}

/* ==========================================================================
   通用布局与组件
   ========================================================================== */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.grid {
  display: grid;
  gap: var(--gap);
}
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

@media (max-width: 1023px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .grid--12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.6;
  color: var(--stone-400);
}
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before {
  content: "/";
  color: var(--rule);
  font-family: var(--font-mono);
}
.crumbs a {
  color: var(--ink-700);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.crumbs a:hover { color: var(--orange); border-bottom-color: var(--orange); }
.crumbs [aria-current="page"] { color: var(--stone-600); }

/* 面板 */
.panel {
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper-white);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.cut-tr {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper-white);
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 0 100%);
}

.cut-bl {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper-white);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--orange); color: var(--paper-white); }
.btn--primary:hover { background: var(--orange-deep); color: var(--paper-white); }

.btn--ink { background: var(--ink-900); color: var(--paper-white); }
.btn--ink:hover { background: var(--ink-700); color: var(--paper-white); }

.btn--ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--stone-400);
}
.btn--ghost:hover { border-color: var(--ink-900); background: rgba(20, 40, 63, .05); color: var(--ink-900); }

.btn--sm { padding: 8px 16px; font-size: 13px; }

/* 胶囊筛选按钮 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--stone-600);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.chip:hover { border-color: var(--stone-400); color: var(--ink-900); }
.chip[aria-pressed="true"] {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: #7A2510;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-count {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--stone-400);
  letter-spacing: .02em;
}

.is-filtered { display: none !important; }

/* 版本标签 */
.tag-version {
  display: inline-block;
  padding: 2px 9px;
  background: var(--orange);
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .02em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.tag-plain {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--rule);
  color: var(--stone-600);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

/* 状态 */
.state-ok { color: var(--green); }
.state-warn { color: var(--amber); }

/* 图片容器基础规则（供页面阶段填充占位） */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-white);
  border: 1px solid var(--rule);
}
.media > img,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--21x9 { aspect-ratio: 21 / 9; }

.media--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(125, 140, 143, .16) 11px 12px);
}

.media__caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--stone-400);
}

/* 显现 */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* 视觉辅助 */
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.rule-line {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: clamp(32px, 5vw, 56px) 0;
}

/* ---------- 减弱动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .rail { transition: none; }
}
