/* Hermit 的应用配色：暖米白与珊瑚橙（ui/src/editions/hermit/theme.json）。 */
:root {
  --bg: #fffaf5;
  --tint: #fbf1e8;
  --card: #ffffff;
  --ink: #2d2622;
  --muted: #66594f;
  --line: #eadbcf;
  --accent: #c9472d;
  --accent-ink: #ffffff;
  --accent-soft: #f9e1d7;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(45, 38, 34, .04), 0 12px 32px rgba(45, 38, 34, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1916;
    --tint: #191411;
    --card: #2b221e;
    --ink: #f2e9e1;
    --muted: #c2b4aa;
    --line: #3d312b;
    --accent: #ff8a6b;
    --accent-ink: #1e1916;
    --accent-soft: #3a2922;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
/* 带布局方式的元素（grid、table）会盖掉 hidden 属性的默认效果，这里统一兜底。 */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
code {
  font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--accent-soft);
  padding: .1em .4em;
  border-radius: 6px;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
h2 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.18; letter-spacing: -.02em; text-wrap: balance; }
h3 { font-size: 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, filter .15s ease, background-color .2s ease;
}
.button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.98); filter: brightness(.96); }
.button.ghost { background: transparent; color: var(--accent); }
.button.ghost:hover { background: var(--accent-soft); filter: none; }
.button.small { min-height: 38px; padding: 0 18px; font-size: 14px; }
.button[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* 顶栏 */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .2s ease; }
.nav a:hover { color: var(--ink); }
/* 滚动到哪个模块，导航上就标出哪个。 */
.nav a[aria-current="true"] { color: var(--ink); font-weight: 600; }

/* 首屏 */
.hero { padding: 72px 0 64px; }
.hero-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .08em; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.08; letter-spacing: -.025em; }
.hero .lead { font-size: 19px; margin: 22px 0 0; max-width: 30em; }
.hero-sub { margin: 8px 0 0; font-size: 18px; font-weight: 600; max-width: 30em; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.hero-art { position: relative; display: grid; place-items: center; }
/* 吉祥物背后垫一团暖色，让画面有层次。 */
.hero-art::before {
  content: ""; position: absolute; inset: 4% 2%;
  border-radius: 50%; background: radial-gradient(closest-side, var(--accent-soft) 0%, transparent 100%);
}
.hero-art img { position: relative; display: block; width: min(100%, 560px); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art img { animation: none; }
}
/* 首屏下方的四条卖点：一块面板，用细线分成四格。 */
.hero-points {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.hero-points li { display: grid; gap: 2px; padding: 20px 24px; background: var(--card); }
.hero-points strong { font-size: 16px; }
.hero-points span { color: var(--muted); font-size: 14px; }

/* 通用区块。底部留得比顶部略多，观感更稳。 */
.section { padding: 104px 0 112px; }
.section.tinted { background: var(--tint); border-block: 1px solid var(--line); }
.section-lead { color: var(--muted); margin: 14px 0 48px; max-width: 42em; font-size: 17px; text-wrap: pretty; }
.note { color: var(--muted); font-size: 15px; margin: 28px 0 0; }
.grid { display: grid; gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.card p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.icon {
  width: 36px; height: 36px; padding: 7px;
  border-radius: 10px; background: var(--accent-soft);
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* 防护：四个重点用大字排成田字格，次要的放下面一行。 */
.primary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.protect { background: var(--card); padding: 36px 40px 40px; }
.protect .card-no { margin: 0; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.protect h3 { margin-top: 10px; font-size: 24px; letter-spacing: -.01em; }
.protect p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 16px; max-width: 34em; }
.tier-label {
  margin: 64px 0 0; padding-top: 40px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .08em;
}
.secondary { list-style: none; margin: 0; padding: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; }
.secondary .icon { margin-bottom: 12px; }
.secondary h3 { font-size: 17px; }
.secondary p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* 价格 */
.plans { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; padding: 36px; }
.plan.featured, .recommend.featured { border: 2px solid var(--accent); }
.plan-badge {
  position: absolute; top: -13px; left: 32px;
  padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--accent); border: 1.5px solid var(--accent);
}
.plan.featured .plan-badge { background: var(--accent); color: var(--accent-ink); }
.plan-heading { display: grid; gap: 2px; }
.card .plan-order { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.card .plan-price { color: var(--ink); margin: 16px 0 0; font-size: 48px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 22px; font-weight: 600; margin-right: 2px; }
.plan-unit { font-size: 20px; font-weight: 600; margin-left: 2px; }
.plan-period { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.card .plan-price.recurring { margin-top: 12px; font-size: 26px; }
.plan-price.recurring small, .plan-price.recurring .plan-unit { font-size: 15px; }
.plan-recurring { margin-left: 10px; font-size: 15px; font-weight: 500; color: var(--muted); }
.card .plan-slot { margin: 0; }
/* 对比项：左边是项目，右边是这个套餐的内容；两张卡片并排时逐行对齐。 */
.plan-rows { list-style: none; margin: 26px 0 0; padding: 0; font-size: 15px; }
.plan-rows li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.plan-rows li:first-child { padding-top: 0; border-top: 0; }
.plan-rows li:last-child { padding-bottom: 0; }
.row-label { color: var(--muted); }
.row-value { font-weight: 500; }
.plan-rows + .plan-extra, .plan-rows + .plan-notes { margin-top: 22px; }
.card .plan-notes { list-style: none; padding: 0; margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.card .plan-notes li { padding: 3px 0 3px 14px; position: relative; }
.card .plan-notes li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.plan-extra { margin: 0 0 22px; padding: 18px 20px; border-radius: 14px; background: var(--accent-soft); font-size: 15px; }
.plan-extra h4 { margin: 0 0 6px; font-size: 15px; }
.card .plan-extra p { margin: 0; color: var(--ink); }
.plan-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.card .plan-extra .plan-footnote { margin-top: 8px; color: var(--muted); font-size: 13px; }
/* 两张卡片高度相同，内容少的那张把空余留在按钮上方，按钮始终对齐。 */
.plan .button { margin-top: auto; }
/* 两张卡片并排时逐行对齐：卡片是外层网格的子网格，对比项列表再各占一行。
   外层留出足够的行数，空行不占高度；按钮固定放在最后一行。
   子网格沿用外层的行间距，所以这里必须把行间距归零，只留卡片之间的列间距。 */
@media (min-width: 640px) {
  .plans.paired { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(40, auto); column-gap: 20px; row-gap: 0; }
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 640px) {
    .plans.paired .plan { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; }
    .plans.paired .plan-rows { display: grid; grid-template-rows: subgrid; }
  }
}
.subsection { margin-top: 56px; font-size: 20px; }
.compare-wrap { margin-top: 16px; overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.compare thead th { color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.compare tbody th { font-weight: 600; white-space: nowrap; }
.compare .th-sub { margin-left: 6px; font-size: 12px; font-weight: 400; }
.takeaway { margin-top: 32px; color: var(--ink); font-weight: 600; }
.compare td.cheaper { color: var(--accent); font-weight: 700; white-space: nowrap; }
.cheaper-tag { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); font-size: 12px; font-weight: 600; }
.costs-formulas { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px 28px; color: var(--muted); font-size: 15px; }
.costs-formulas strong { margin-right: 6px; color: var(--ink); }
.costs-detail { display: block; font-size: 13px; }
.recommend { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 56px; }
.card .recommend-range { margin: 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.recommend-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 19px; font-weight: 700; }
.recommend-tag { padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.recommend.featured .recommend-tag { background: var(--accent); color: var(--accent-ink); }
.card .recommend-text { margin-top: 8px; font-size: 15px; color: var(--muted); }
.closing {
  margin: 48px 0 0; padding: 22px 32px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); text-align: center;
  font-size: clamp(18px, 2.4vw, 22px); font-weight: 700;
}
.sample-flag {
  display: inline-block; margin: -24px 0 28px; padding: 4px 12px; border-radius: 8px;
  background: #fff3c4; color: #6b4e00; font-size: 14px; font-weight: 600;
}

/* 如果被封：一块说明面板，左边小标题、右边说明 */
.ban {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow);
}
.ban .card {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: baseline;
  padding: 28px 36px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent;
}
.ban .card:first-child { border-top: 0; }
.ban h3 { font-size: 17px; }
.ban .card p { margin: 0; color: var(--muted); font-size: 16px; }

/* 下载：一块列表面板，一行一个平台 */
.downloads {
  grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow);
}
.card.download {
  display: grid; grid-template-columns: minmax(0, 300px) 1fr auto; align-items: center; gap: 8px 24px;
  padding: 16px 28px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent;
}
.download:first-child { border-top: 0; }
.download.recommended {
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--card));
  box-shadow: inset 3px 0 0 var(--accent);
}
.download-os { display: flex; align-items: center; gap: 12px; }
.download-os h3 { font-size: 17px; }
/* 图标是黑色的 SVG；用 <img> 而不是 CSS mask，双击打开本地文件时也能显示。 */
.os-icon { width: 26px; height: 26px; flex: none; }
@media (prefers-color-scheme: dark) { .os-icon { filter: invert(1); } }
.download-tag { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.card .download-meta { margin: 0; font-size: 14px; line-height: 1.5; }
.download .button { width: auto; min-height: 40px; padding: 0 20px; font-size: 15px; }
.checksums { margin-top: 28px; color: var(--muted); font-size: 14px; }
.checksums summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.checksums ul { padding-left: 18px; }
.checksums li { word-break: break-all; margin: 6px 0; }

/* 常见问题：左边是固定的分类目录，右边一栏到底 */
.faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.faq-nav {
  position: sticky; top: 88px; display: grid; gap: 4px; padding: 10px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow);
}
.faq-nav a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.faq-nav a:hover { background: var(--tint); color: var(--ink); }
.faq-nav a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.faq-nav a span { font-size: 13px; font-weight: 400; opacity: .75; }
.faq-nav a span:empty { display: none; }
.faq-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 0 32px; box-shadow: var(--shadow); }
.faq-block { padding: 28px 0 10px; border-top: 1px solid var(--line); }
.faq-block:first-child { padding-top: 24px; border-top: 0; }
.faq-group { margin: 0 0 6px; font-size: 17px; color: var(--accent); letter-spacing: .02em; }
.faq { border-bottom: 1px solid var(--line); }
.faq-block .faq:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 44px 18px 0; position: relative;
  font-size: 16px; font-weight: 600; transition: color .2s ease;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
/* 右侧的加号是两条短线；展开时竖线转成横线，变成减号 */
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px;
  background: var(--accent); transition: transform .2s ease;
}
.faq summary::before { transform: translateY(-50%) rotate(90deg); }
.faq summary::after { transform: translateY(-50%); }
.faq[open] summary::before { transform: translateY(-50%) rotate(0deg); }
.faq p { margin: 0 0 14px; color: var(--muted); }
/* 回答里的小标题（比如套餐名）用深色，一眼能分开两条规则。 */
.faq p strong { margin-right: 4px; color: var(--ink); }
.faq p:last-child { margin-bottom: 0; }

/* 联系客服：收尾的一块面板 */
.contact {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 64px;
  padding: 56px 64px; border: 1px solid var(--line); border-radius: 28px;
  background: linear-gradient(115deg, var(--accent-soft) 0%, var(--card) 58%);
}
.contact img { width: 222px; border-radius: 16px; background: #fff; }
.contact .section-lead { margin-bottom: 28px; }

.foot { padding: 40px 0 48px; color: var(--muted); font-size: 13px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

@media (max-width: 1000px) {
  .secondary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .top-row { justify-content: space-between; }
  .hero { padding: 40px 0 40px; }
  .hero-row { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { order: -1; }
  .hero-art img { width: min(72%, 360px); }
  .hero-points { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
  .section { padding: 72px 0 80px; }
  .faq-layout { grid-template-columns: 1fr; gap: 20px; }
  /* 窄屏上目录变成一排可横向滑动的标签，吸顶显示。 */
  .faq-nav {
    position: sticky; top: 64px; z-index: 5; display: flex; gap: 8px; padding: 8px;
    border-radius: 999px; overflow-x: auto; scrollbar-width: none;
  }
  .faq-nav::-webkit-scrollbar { display: none; }
  .faq-nav a { flex: none; padding: 8px 16px; border-radius: 999px; }
  .faq-list { padding: 0 20px; }
}
@media (max-width: 760px) {
  .primary { grid-template-columns: 1fr; }
  .protect { padding: 28px 24px 32px; }
  .protect h3 { font-size: 22px; }
  .ban .card { grid-template-columns: 1fr; gap: 6px; padding: 24px; }
  .card.download { grid-template-columns: 1fr auto; padding: 16px 20px; }
  .download-os { grid-column: 1; grid-row: 1; }
  .card .download-meta { grid-column: 1 / -1; grid-row: 2; }
  .download .button { grid-column: 2; grid-row: 1; }
  .contact { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 40px 24px; gap: 28px; }
  .contact .eyebrow, .contact .section-lead { margin-inline: auto; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .secondary { grid-template-columns: 1fr; }
  .tier-label { margin-top: 48px; padding-top: 32px; }
  /* 手机上让表格完整放进屏幕，不用左右滑动。 */
  .compare { font-size: 14px; }
  .compare th, .compare td { padding: 10px 8px; }
  .compare thead th, .compare td.cheaper { white-space: normal; }
  .cheaper-tag { margin-left: 4px; }
  .plan-rows li { grid-template-columns: 5.4em 1fr; gap: 10px; }
  .plan { padding: 28px 24px; }
}
