:root {
  --ink: #22303c;
  --muted: #64748b;
  --brand: #1f6b3a;
  --brand-soft: #edf6ef;
  --line: #e2e8f0;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink); background: #fafbfa; line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.site-header { display: flex; align-items: center; gap: 1.5rem; padding: .9rem 4vw; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--brand); }
.main-nav { display: flex; gap: 1.1rem; margin-left: auto; align-items: center; }
.main-nav a { color: var(--ink); }
.nav-cta { background: var(--brand); color: #fff !important; padding: .45rem 1rem; border-radius: 6px; }

.hero { position: relative; }
.hero-slide img { width: 100%; height: 380px; object-fit: cover; }
.hero-slide figcaption { position: absolute; left: 4vw; bottom: 2.2rem; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.55); display: grid; }
.hero-slide figcaption strong { font-size: 1.7rem; }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; max-width: 1080px; margin: 2rem auto; padding: 0 4vw; text-align: center; }
.stats-strip strong { display: block; font-size: 1.9rem; color: var(--brand); }
.stats-strip span { color: var(--muted); font-size: .9rem; }

.section { max-width: 1080px; margin: 2.6rem auto; padding: 0 4vw; }
.section.alt { background: var(--brand-soft); padding: 2rem 4vw; border-radius: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head h2 { margin: .4rem 0 1rem; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: inherit; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(20,83,45,.12); text-decoration: none; }
.card img { height: 170px; width: 100%; object-fit: cover; }
.card h3 { margin: .8rem 1rem .3rem; font-size: 1.02rem; }
.card p { margin: 0 1rem 1rem; color: var(--muted); font-size: .9rem; }
.card .tag { display: inline-block; margin: 0 1rem 1rem; }

.tag { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: .18rem .7rem; font-size: .8rem; }
.tag.active { background: var(--brand); color: #fff; }
.filter-row { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }

.plain-list { list-style: none; padding: 0; }
.services li { display: grid; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.services strong { font-size: 1.05rem; }
.news-list li { display: flex; gap: 1rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.news-list time { color: var(--muted); font-size: .85rem; min-width: 10rem; }
.news-list .meta { color: var(--muted); font-size: .88rem; }

.page { max-width: 1080px; margin: 2.2rem auto; padding: 0 4vw; }
.page.narrow { max-width: 720px; }
.page-cover { border-radius: 10px; margin: 1rem 0; }
.content { white-space: pre-line; }

.form { display: grid; gap: .8rem; margin: 1.2rem 0; max-width: 560px; }
.form label { display: grid; gap: .3rem; font-size: .92rem; }
.form input, .form textarea { border: 1px solid var(--line); border-radius: 6px; padding: .55rem .7rem; font: inherit; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: none; padding: .55rem 1.2rem; border-radius: 6px; cursor: pointer; font: inherit; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }

.cta-band { background: var(--brand); color: #fff; text-align: center; padding: 2.4rem 4vw; margin-top: 3rem; }
.cta-band .btn { background: #fff; color: var(--brand); }
.search-form { display: flex; gap: .6rem; max-width: 460px; }
.search-form input { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: .5rem .7rem; font: inherit; }

.pagination { display: flex; gap: 1rem; margin: 1.4rem 0; }
.alert { padding: .6rem .9rem; border-radius: 6px; margin: .6rem 0; background: #f4f6f4; }
.alert.ok { background: #e8f5e9; color: #1b5e20; }
.alert.error { background: #fdecea; color: #b71c1c; }

.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 4vw; color: var(--muted); text-align: center; }
.footer-nav { display: flex; gap: 1.2rem; justify-content: center; margin-bottom: .6rem; }
.error-page { text-align: center; padding: 5rem 4vw; }
.error-page h1 { font-size: 4rem; margin: 0; color: var(--brand); }

/* ==== 会员区 ==== */
.member-area { margin-left: auto; display: flex; gap: .9rem; align-items: center; font-size: .92rem; }
.member-area a { color: var(--ink); }
.member-name { color: var(--brand); font-weight: 600; }
.inline-form { display: inline; }
.link-btn { background: none; border: none; color: var(--brand); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.auth-page { max-width: 440px; margin: 3rem auto; }
.auth-page .form { display: grid; gap: .8rem; margin: 1rem 0; }
.auth-page label { display: grid; gap: .3rem; }
.member-page .member-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; }
.member-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; }
.member-card h2 { font-size: 1.05rem; margin-top: 1.2rem; }
.member-card .form { display: grid; gap: .7rem; margin: .8rem 0; max-width: none; }
.member-card label { display: grid; gap: .25rem; font-size: .9rem; }
.comment { border-top: 1px dashed var(--line); padding: .7rem 0; }
.comment-meta { color: var(--muted); font-size: .85rem; margin-bottom: .2rem; }
.reply-note { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: .5rem .7rem; border-radius: 4px; }
.perks li { display: grid; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.perks strong { font-size: 1.05rem; }
.product-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.4rem; }
.product-media img { border-radius: 12px; border: 1px solid var(--line); }
.lead { color: var(--muted); font-size: 1.05rem; }
.inquiry-box { background: var(--brand-soft); border-radius: 10px; padding: 1.1rem 1.3rem; margin-top: 1.4rem; }
.inquiry-box h2 { margin-top: 0; font-size: 1.1rem; }
.inquiry-box .form { max-width: none; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }

/* ==== 下载站特有 ==== */
.dl-hero { text-align: center; padding: 3rem 4vw 1.4rem; }
.dl-hero h1 { margin: 0 0 .4rem; font-size: 2rem; }
.dl-hero p { color: var(--muted); }
.dl-list { display: grid; gap: 0; }
.dl-list li { display: flex; gap: 1rem; align-items: center; padding: .9rem .2rem; border-bottom: 1px dashed var(--line); }
.dl-list .dl-ico { font-size: 1.4rem; color: var(--brand); }
.dl-list div { flex: 1; }
.dl-list .meta { margin: .1rem 0 0; }
.card-grid.two { grid-template-columns: 1fr 1fr; }
.detail-head { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
.detail-cover { border-radius: 12px; border: 1px solid var(--line); }
.btn.big { font-size: 1.05rem; padding: .7rem 1.6rem; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }

/* ==== 老内核 flex gap 退路 ==== */
   flex 容器的 gap 要 Chromium 84+。老内核里不认 gap，子元素会完全贴在一起，
   头部导航、筛选条、按钮行全糊成一坨。这里用相邻兄弟的左边距补回本站自己的节奏。
   （compat.css 里有通用值兜底，这里是本站的精确值，后加载所以优先。）
@supports not (gap: 1px) {
  .site-header > * + * { margin-left: 1.5rem; }
  .main-nav > * + * { margin-left: 1.1rem; }
  .news-list li > * + * { margin-left: 1rem; }
  .search-form > * + * { margin-left: .6rem; }
  .pagination > * + * { margin-left: 1rem; }
  .footer-nav > * + * { margin-left: 1.2rem; }
  .member-area > * + * { margin-left: .9rem; }
  .dl-list li > * + * { margin-left: 1rem; }
  /* 顶栏的会员区靠 auto 右对齐，别被上面的左边距顶到中间 */
  .site-header > .member-box, .site-header > .main-nav { margin-left: auto; }
}

/* ==== 窄屏（≤768px）====
   与 project-co / interactive 同骨架，规则刻意保持一致。另加 downloads 自己的
   几处多列：商品图文、详情头 300px 图、资料双栏。断点取 768px。 */
@media (max-width: 768px) {
  .site-header { flex-wrap: wrap; gap: .75rem; padding: .6rem 4vw; }
  .main-nav { margin-left: 0; width: 100%; flex-wrap: wrap; gap: .7rem; }
  .member-area { margin-left: 0; width: 100%; }
  .hero-slide img { height: 200px; }            /* 原 380px */
  .hero-slide figcaption { bottom: 1.2rem; }
  .hero-slide figcaption strong { font-size: 1.25rem; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 1.25rem .5rem; }
  .card-grid, .card-grid.two { grid-template-columns: 1fr; }
  .section-head { flex-wrap: wrap; gap: .4rem; }
  .news-list time { min-width: 0; }
  .search-form { flex-wrap: wrap; max-width: 100%; }
  .search-form .btn { width: 100%; }
  .form { max-width: 100%; }
  .footer-nav, .pagination, .news-list li, .dl-list li { flex-wrap: wrap; }
  .auth-page { margin: 1.5rem auto; }
  .member-grid, .profile-forms { grid-template-columns: 1fr; gap: 1.25rem; }
  .product-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .detail-head { grid-template-columns: 1fr; gap: 1.25rem; }  /* 原 300px 固定图 */
  .btn.big { width: 100%; }
  .section, .page, .cta-band, .dl-hero { padding-left: 4vw; padding-right: 4vw; }
  .dl-hero h1 { font-size: 1.5rem; }
  .error-page h1 { font-size: 2.5rem; }         /* 原 4rem */
}

/* === THEME-REFRESH START（本段由 examples/scripts/theme-refresh.mjs 生成）=== */
body.theme-v2 {

  --t-bg: #f7f3ea;
  --t-bg-soft: #efe8da;
  --t-surface: #fffdf8;
  --t-fg: #241f1a;
  --t-fg-soft: #5d554b;
  --t-line: rgba(36, 31, 26, 0.16);
  --t-line-strong: rgba(36, 31, 26, 0.34);
  --t-accent: #b45309;
  --t-accent-fg: #fffdf8;
  --t-radius: 1px;
  --t-shadow: none;
  --t-font-title: Georgia, 'Songti SC', 'Noto Serif CJK SC', serif;
  --t-font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --t-max: 1120px;
  --t-space: 1.15rem;
}

/* ---------- 基础层 ---------- */
html { scroll-behavior: smooth; text-rendering: optimizeLegibility; }
body.theme-v2 { background: var(--t-bg); color: var(--t-fg); font-family: var(--t-font-body); line-height: 1.7; }
body.theme-v2 ::selection { background: var(--t-accent); color: var(--t-accent-fg); }
body.theme-v2 a { color: var(--t-accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
body.theme-v2 a:hover { color: var(--t-fg); }
body.theme-v2 h1, body.theme-v2 h2, body.theme-v2 h3, body.theme-v2 h4 { font-family: var(--t-font-title); font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; }
body.theme-v2 h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
body.theme-v2 h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-block: 1.8rem 0.9rem; }
body.theme-v2 h3 { font-size: 1.1rem; }
body.theme-v2 p { color: var(--t-fg-soft); }
body.theme-v2 img { max-width: 100%; height: auto; }
body.theme-v2 :focus-visible { outline: 2px solid var(--t-accent); outline-offset: 3px; }

/* ---------- 页面外壳 ---------- */
body.theme-v2 .site-shell { width: min(var(--t-max), calc(100% - 2 * var(--t-space))); margin: 0 auto; }
body.theme-v2 .theme-aurora { position: fixed; inset: -20vh -10vw auto; height: 52vh; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 30% 0%, color-mix(in srgb, var(--t-accent) 26%, transparent) 0%, transparent 62%); filter: blur(28px); }
body.theme-v2 .site-shell { position: relative; z-index: 1; padding-block: 1.5rem; }

/* ---------- 头部 / 导航 ---------- */
body.theme-v2 .site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; padding-block: 1rem 1.1rem;
  border-bottom: 1px solid var(--t-line);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--t-bg) 82%, transparent); }
body.theme-v2 .brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--t-fg); text-decoration: none; letter-spacing: -0.02em; }
body.theme-v2 .brand-mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem;
  border: 1px solid color-mix(in srgb, var(--t-accent) 40%, transparent);
  border-radius: 10px; background: color-mix(in srgb, var(--t-accent) 16%, transparent);
  color: var(--t-accent); font-family: var(--t-font-title); font-size: 0.95rem; font-weight: 700; }
body.theme-v2 .brand-text { font-weight: 700; font-size: 1.05rem; }
body.theme-v2 .tagline { color: var(--t-fg-soft); font-size: 0.85rem; }
body.theme-v2 .main-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; align-items: center; }
body.theme-v2 .main-nav a { color: var(--t-fg-soft); text-decoration: none; font-size: 0.92rem; padding-block: 0.35rem; border-bottom: 1px solid transparent; }
body.theme-v2 .main-nav a:hover { color: var(--t-fg); border-bottom-color: var(--t-accent); }
body.theme-v2 .has-children { position: relative; }
body.theme-v2 .sub-menu { display: none; }
body.theme-v2 .has-children:hover .sub-menu, body.theme-v2 .has-children:focus-within .sub-menu { display: flex; flex-direction: column; position: absolute; z-index: 30; top: 100%; left: 0; min-width: 11rem; padding: 0.6rem; gap: 0.2rem;
  background: var(--t-surface); border: 1px solid var(--t-line); border-radius: 12px; box-shadow: var(--t-shadow); }

/* ---------- 会员块（公共契约） ---------- */
body.theme-v2 .member-box { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; font-size: 0.88rem; }
body.theme-v2 .who { color: var(--t-fg); font-weight: 600; }
body.theme-v2 .badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.72rem;
  background: color-mix(in srgb, var(--t-accent) 18%, transparent); color: var(--t-accent); border: 1px solid color-mix(in srgb, var(--t-accent) 40%, transparent); }
body.theme-v2 .inline-form { display: inline; margin: 0; }
body.theme-v2 .link-btn { background: none; border: 0; padding: 0; color: var(--t-fg-soft); cursor: pointer; font: inherit; }
body.theme-v2 .link-btn:hover { color: var(--t-accent); }

/* ---------- 主体 ---------- */
body.theme-v2 .site-main { padding-block: 2rem 3.4rem; }
body.theme-v2 .site-main > section, body.theme-v2 .site-main > article { margin-block-end: 2.4rem; }
body.theme-v2 .site-main > section:last-child { margin-block-end: 0; }

/* ---------- 组件 ---------- */
body.theme-v2 .hero { padding: 2rem 1.6rem; border-bottom: 0;
  border-radius: var(--t-radius); background: linear-gradient(135deg, color-mix(in srgb, var(--t-accent) 14%, var(--t-surface)), var(--t-surface) 60%); box-shadow: var(--t-shadow); }
body.theme-v2 .hero-copy h1 { margin-block: 0.2rem 0.8rem; }
body.theme-v2 .hero-copy p { font-size: 1.05rem; max-width: 46ch; }
body.theme-v2 .btn, body.theme-v2 button:not(.link-btn), body.theme-v2 .button { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--t-accent) 55%, transparent);
  border-radius: 999px; background: var(--t-accent);
  color: var(--t-accent-fg); text-decoration: none; font-size: 0.9rem; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease; }
body.theme-v2 .btn:hover, body.theme-v2 button:not(.link-btn):hover { background: color-mix(in srgb, var(--t-accent) 82%, #000); color: var(--t-accent-fg); transform: translateY(-1px); }
body.theme-v2 .grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
body.theme-v2 .card { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.05rem; border: 0;
  border-bottom: 1px solid var(--t-line); border-radius: var(--t-radius);
  background: var(--t-surface); border: 1px solid var(--t-line); box-shadow: var(--t-shadow);
  color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
body.theme-v2 .card:hover { transform: translateY(-3px); }
body.theme-v2 .card h3 { margin: 0; }
body.theme-v2 .card p { margin: 0; font-size: 0.9rem; }
body.theme-v2 .card img { border-radius: 10px; object-fit: cover; }
body.theme-v2 ul.news { list-style: none; padding: 0; margin: 0; }
body.theme-v2 ul.news li { display: grid; gap: 0.2rem; padding-block: 1rem; border-bottom: 1px solid var(--t-line); }
body.theme-v2 ul.news time { color: var(--t-fg-soft); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
body.theme-v2 .empty { color: var(--t-fg-soft); padding: 1.4rem; border: 1px dashed var(--t-line-strong); border-radius: 12px; text-align: center; }
body.theme-v2 .alert { padding: 0.8rem 1rem; border: 1px solid color-mix(in srgb, var(--t-accent) 45%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--t-accent) 8%, transparent); }
body.theme-v2 .pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-block: 1.6rem; }
body.theme-v2 .pagination a, body.theme-v2 .pagination span { padding: 0.3rem 0.7rem; border: 1px solid var(--t-line); border-radius: 999px; text-decoration: none; font-size: 0.85rem; }

/* ---------- 表单 / 表格 ---------- */
body.theme-v2 input, body.theme-v2 textarea, body.theme-v2 select { width: 100%; max-width: 34rem; padding: 0.6rem 0.75rem; font: inherit; color: var(--t-fg);
  background: var(--t-surface); border: 1px solid var(--t-line-strong); border-radius: 10px; }
body.theme-v2 label { display: block; margin-block: 0.9rem 0.3rem; font-size: 0.85rem; color: var(--t-fg); font-weight: 600; }
body.theme-v2 table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
body.theme-v2 th, body.theme-v2 td { padding: 0.65rem 0.6rem; border-bottom: 1px solid var(--t-line); text-align: left; }
body.theme-v2 th { color: var(--t-fg); font-weight: 700; }

/* ---------- 首页横幅 ---------- */
body.theme-v2 .theme-strap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; padding: 0.85rem 1rem;
  margin-block-end: 1.4rem; border-bottom: 0;
  border-radius: 14px; background: color-mix(in srgb, var(--t-accent) 10%, var(--t-surface)); border: 1px solid var(--t-line); }
body.theme-v2 .theme-strap span { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-accent); }
body.theme-v2 .theme-strap strong { font-family: var(--t-font-title); font-size: clamp(1rem, 2vw, 1.25rem); color: var(--t-fg); font-weight: 750; }

/* ---------- 页脚 ---------- */
body.theme-v2 .site-footer { margin-top: 3rem; padding-block: 1.6rem;
  border-top: 1px solid var(--t-line-strong); color: var(--t-fg-soft); font-size: 0.85rem; }
body.theme-v2 .footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-block-end: 0.6rem; }
body.theme-v2 .footer-nav a { color: var(--t-fg-soft); }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  body.theme-v2 .site-header { gap: 0.6rem; }
  body.theme-v2 .member-box { margin-left: 0; width: 100%; }
  body.theme-v2 .site-main { padding-block: 1.6rem 2.6rem; }
  body.theme-v2 .hero { padding-inline: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.theme-v2 * { transition: none !important; animation: none !important; }
}
/* === THEME-REFRESH END === */
