/* ==========================================================================
   down.stret.net — STRET E-SDC download site
   零外部依赖：不引 CDN 字体、不引外部 CSS/JS。Starlink/弱网下也能完整渲染。
   设计基调：面向税务认证评审员的正式文档型站点 —— 克制、信息优先、可打印。
   ========================================================================== */

:root {
  /* 主色：深海军蓝（institutional） */
  --navy-900: #0b1c2c;
  --navy-800: #12293f;
  --navy-700: #1b3a56;

  --ink: #16202b;
  --ink-2: #33465a;
  --muted: #5f7285;
  --line: #dde5ee;
  --line-2: #eef3f8;

  --bg: #f4f7fa;
  --card: #ffffff;

  /* 强调色：取自瓦努阿图国旗（红/绿/黄），仅用于点缀，不喧宾夺主 */
  --accent: #b8232f;
  --accent-dark: #97121d;
  --accent-soft: #fdeef0;
  --vu-green: #1f7a4d;
  --vu-gold: #e0a81c;

  --ok: #1f7a4d;
  --ok-soft: #edf7f1;
  --warn: #8a5a00;
  --warn-soft: #fdf5e3;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 8px 24px -12px rgba(16, 32, 48, .18);
  --shadow-sm: 0 1px 2px rgba(16, 32, 48, .07);

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* 锚点跳转时为固定页眉留出空位 */
[id] { scroll-margin-top: 84px; }

a { color: var(--navy-700); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

/* ── 页眉 ───────────────────────────────────────────────────────────── */

.site-header {
  background: var(--navy-900);
  color: #fff;
  position: sticky; top: 0; z-index: 40;
  border-bottom: 3px solid var(--accent);
}
/* 瓦努阿图三色细线（红/黄/绿），仅作地域标识 */
.site-header::after {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, var(--vu-gold) 0 33.3%, var(--vu-green) 33.3% 66.6%, var(--accent) 66.6% 100%);
}

.header-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 62px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--accent) 0%, #d8452f 100%);
  display: grid; place-items: center;
  font: 700 13px/1 var(--sans); letter-spacing: .02em; color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.brand-sub { font-size: 11.5px; color: #9fb4c8; letter-spacing: .02em; }

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: #c8d8e6; text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 7px 11px; border-radius: var(--radius-sm);
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* 语言切换 */
.lang { display: flex; gap: 3px; flex-wrap: wrap; }
.lang button {
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: #a9c0d4; background: transparent;
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 9px; border-radius: var(--radius-sm); cursor: pointer;
  line-height: 1.2;
}
.lang button:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.lang button[aria-pressed="true"] {
  background: #fff; color: var(--navy-900); border-color: #fff;
}
.lang button:focus-visible { outline: 2px solid var(--vu-gold); outline-offset: 1px; }

/* ── 主体骨架 ─────────────────────────────────────────────────────────── */

main { padding: 34px 0 10px; }

section { margin-bottom: 34px; }

.sec-head { margin-bottom: 16px; }
.sec-head h2 {
  margin: 0 0 5px; font-size: 21px; letter-spacing: -.01em;
  padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.sec-head p { margin: 0; color: var(--muted); font-size: 14.5px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: #fff; border-radius: var(--radius); overflow: hidden;
  padding: 30px 30px 26px; margin-bottom: 34px;
  box-shadow: var(--shadow);
}
.hero-badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--vu-gold);
  border: 1px solid rgba(224, 168, 28, .45); border-radius: 100px;
  padding: 3px 11px; margin-bottom: 14px;
}
.hero h1 { margin: 0 0 4px; font-size: 33px; letter-spacing: -.02em; line-height: 1.15; }
.hero-sub { margin: 0 0 18px; color: #b9cde0; font-size: 15.5px; max-width: 62ch; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 22px;
  padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero-meta div { font-size: 13px; color: #9fb4c8; }
.hero-meta strong {
  display: block; color: #fff; font-family: var(--mono);
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: #dce8f3; border-color: rgba(255, 255, 255, .3); }
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn:focus-visible { outline: 2px solid var(--vu-gold); outline-offset: 2px; }
.btn[aria-disabled="true"] { background: #46596c; color: #c3d0dc; cursor: not-allowed; }

.hero-note { margin: 16px 0 0; font-size: 12.5px; color: #8fa6bb; }

/* ── 下载条目 ─────────────────────────────────────────────────────────── */

.dl-list { display: grid; gap: 12px; }

.dl-item {
  display: grid; grid-template-columns: 1fr auto; gap: 14px 20px;
  align-items: start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.dl-item.is-primary { border-left: 3px solid var(--accent); }
.dl-item.is-pending { background: #fbfcfd; border-style: dashed; }

.dl-name { font-weight: 650; font-size: 15.5px; margin: 0 0 2px; }
.dl-file { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); word-break: break-all; }
.dl-desc { margin: 7px 0 0; font-size: 13.5px; color: var(--muted); }

.dl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag {
  font-size: 11.5px; font-weight: 600; padding: 2.5px 8px; border-radius: 100px;
  background: var(--line-2); color: var(--ink-2); border: 1px solid var(--line);
}
.tag-ok { background: var(--ok-soft); color: var(--ok); border-color: #c6e5d5; }
.tag-pend { background: var(--warn-soft); color: var(--warn); border-color: #f0dfb4; }

.dl-side { text-align: right; flex: none; }
.dl-size { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.btn-sm {
  font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  background: var(--navy-800); color: #fff; border: 1px solid transparent;
  text-decoration: none; display: inline-block; cursor: pointer;
}
.btn-sm:hover { background: var(--navy-700); color: #fff; }
.btn-sm:disabled, .btn-sm[aria-disabled="true"] {
  background: #e6ecf2; color: #93a3b3; cursor: not-allowed; text-decoration: line-through;
}

.hash-row { grid-column: 1 / -1; margin-top: 2px; }
.hash-label {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.hash-box {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: #f7fafc; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 11px;
}
.hash-box code {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
  word-break: break-all; flex: 1 1 260px; line-height: 1.5;
}
.copy {
  font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer;
  background: #fff; color: var(--navy-700); border: 1px solid var(--line);
  flex: none;
}
.copy:hover { border-color: var(--navy-700); }
.copy.is-done { background: var(--ok-soft); color: var(--ok); border-color: #c6e5d5; }

/* ── 表格 ─────────────────────────────────────────────────────────────── */

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 460px; }
caption { text-align: left; padding: 13px 18px 0; font-size: 13px; color: var(--muted); }
th, td { text-align: left; padding: 11px 18px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th {
  background: #f7fafc; font-size: 11.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); width: 34%; }
td code, th code { font-family: var(--mono); font-size: 12.5px; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }

/* ── 步骤列表 ─────────────────────────────────────────────────────────── */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li {
  position: relative; padding: 0 0 15px 42px; counter-increment: s;
  font-size: 14.5px; color: var(--ink-2);
}
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--navy-800); color: #fff;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
}
.steps li::after {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 5px;
  width: 1px; background: var(--line);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps li strong { color: var(--ink); }

.note {
  border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13.5px;
  border: 1px solid; margin-top: 16px;
}
.note-info { background: #f4f8fc; border-color: #d3e3f0; color: var(--ink-2); }
.note-warn { background: var(--warn-soft); border-color: #f0dfb4; color: var(--warn); }
.note-danger { background: var(--accent-soft); border-color: #f3ccd1; color: var(--accent-dark); }
.note strong { display: block; margin-bottom: 3px; }

/* ── 支持信息网格 ─────────────────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }

.contact { display: grid; gap: 14px; }
.contact-item { border-left: 2px solid var(--line); padding-left: 14px; }
.contact-item dt { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.contact-item dd { margin: 3px 0 0; font-size: 15px; font-weight: 600; }
.contact-item dd a { text-decoration: none; }
.contact-item dd .sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }

ul.plain { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
ul.plain li { margin-bottom: 6px; }

/* ── 厂商 / 页脚 ──────────────────────────────────────────────────────── */

.vendor { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 24px; }
.vendor dt { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.vendor dd { margin: 0; font-size: 14.5px; }
.vendor dd.mono { font-family: var(--mono); font-size: 13.5px; }

.site-footer {
  background: var(--navy-900); color: #9fb4c8;
  margin-top: 40px; padding: 30px 0 34px; font-size: 13px;
  border-top: 3px solid var(--accent);
}
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px 30px; align-items: start; }
.site-footer strong { color: #fff; font-weight: 650; }
.site-footer a { color: #c8d8e6; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .13); font-size: 12.5px; color: #8fa6bb; max-width: 78ch; }

/* ── 工具类 ───────────────────────────────────────────────────────────── */

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* 面包屑 / 返回 */
.crumb { font-size: 13.5px; margin-bottom: 14px; color: var(--muted); }
.crumb a { text-decoration: none; }

/* ── 响应式 ───────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .header-inner { gap: 10px; padding: 9px 0; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .lang { margin-left: auto; }
  .hero { padding: 24px 20px 22px; }
  .hero h1 { font-size: 27px; }
  .dl-item { grid-template-columns: 1fr; }
  .dl-side { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; }
  tbody th { width: auto; }
}

/* ── 打印（评审员可能需要存档） ─────────────────────────────────────────── */

@media print {
  .site-header, .site-footer, .lang, .hero-actions, .copy, .dl-side .btn-sm { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .hero { background: #fff !important; color: #000; padding: 0 0 12px; box-shadow: none; }
  .hero-badge, .hero-sub, .hero-meta div { color: #333 !important; }
  .hero h1, .hero-meta strong { color: #000 !important; }
  .card, .dl-item, .tbl-wrap { box-shadow: none; border-color: #bbb; }
  a { color: #000; text-decoration: none; }
  section { break-inside: avoid; }
}
