/* Perlustro 网站：浅色 / 深色随系统，中英双语（html[data-lang] 决定显示哪种语言的元素） */
:root {
  --bg: #fbfbfd;
  --bg-alt: #f2f2f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.09);
  --accent: #0a66d8;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.07);
  --radius: 18px;
  --max: 1080px;
  --gif-bg: #fffeff; /* 应用导出的动图（GIF）的填充色 */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f11;
    --bg-alt: #18181b;
    --card: #1c1c1f;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #3d8bfd;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
    --gif-bg: #0e151e;
    color-scheme: dark;
  }
}

/* 语言：默认英文；脚本按浏览器语言或用户选择设置 data-lang */
:root[data-lang="en"] [lang="zh-Hans"],
:root[data-lang="zh-Hans"] [lang="en"] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--bg-alt); padding: 0.1em 0.35em; border-radius: 5px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* 顶栏 */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 54px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.nav nav { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.nav nav a { color: var(--text); opacity: 0.8; }
.nav nav a:hover, .nav nav a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav nav a[aria-current="page"] { font-weight: 600; }
.lang {
  border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: 3px 11px; font: inherit; font-size: 13px; cursor: pointer;
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 16px;
  background: var(--accent); color: var(--accent-text);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* 首页 */
.hero { text-align: center; padding: 72px 0 40px; }
.hero .icon { width: 128px; height: 128px; margin: 0 auto 18px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); line-height: 1.6; color: var(--muted); max-width: 900px; margin: 0 auto 28px; text-align: center; }
.hero .meta { margin-top: 14px; font-size: 14px; color: var(--muted); }
/* 顶栏效果图自带圆角与背景，不再加外框（外框比图片宽时右侧会多出一块空白） */
.menubar-shot { display: block; }

section.block { padding: 64px 0; }
section.block.alt { background: var(--bg-alt); }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 12px; text-align: center; }
.sub { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 40px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 10px 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
/* 功能图标：白色线条图标放在彩色渐变的圆角方块上，与应用「使用说明」中的图标样式一致 */
.card .glyph {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.glyph svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.glyph svg .fill { fill: #fff; stroke: none; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); margin-left: 6px; vertical-align: 2px; }

.showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.showcase .shot { width: 100%; max-width: min(100%, 400px); justify-self: center; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.showcase ul { padding-left: 1.1em; margin: 0; }
.showcase li { margin: 0 0 12px; }
.showcase h2 { text-align: left; }
@media (max-width: 760px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase h2 { text-align: center; }
}

table.compare { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 16px; }
table.compare th, table.compare td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.compare th:not(:first-child), table.compare td:not(:first-child) { text-align: center; width: 24%; }
table.compare tr:last-child td { border-bottom: 0; }
table.compare thead th { background: var(--bg-alt); font-size: 15px; }
.yes { color: #2f9e44; font-weight: 700; }
.no { color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* 更新日志 */
.page-head { padding: 56px 0 24px; text-align: center; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); margin: 0 0 8px; letter-spacing: -0.02em; }
.release { max-width: 760px; margin: 0 auto 22px; }
.release header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 8px; }
.release h2 { font-size: 24px; text-align: left; margin: 0; }
.release time { color: var(--muted); font-size: 15px; }
.release .latest { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent); padding: 1px 9px; border-radius: 999px; }
.release h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 16px 0 6px; }
.release ul { margin: 0; padding-left: 1.2em; }
.release li { margin: 4px 0; }
.release .links { margin-top: 14px; font-size: 15px; display: flex; gap: 18px; flex-wrap: wrap; }

/* 下载 */
.download-hero { text-align: center; padding: 56px 0 36px; }
.download-hero .icon { width: 112px; height: 112px; margin: 0 auto 16px; }
.download-hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 8px; letter-spacing: -0.02em; }
.download-hero .version { color: var(--muted); margin: 0 0 24px; }
.download-hero .alt { margin-top: 14px; font-size: 14px; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 18px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 14px;
}
.note { border-left: 3px solid var(--accent); background: var(--card); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0; }
.two { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.two h3 { margin-top: 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav nav { gap: 14px; font-size: 14px; }
  .nav .wrap { gap: 12px; }
  .brand span { display: none; }
  .hero { padding-top: 48px; }
}

/* 颜色取自应用各页面所用的 macOS 系统颜色；能量用能量流卡片中闪电的黄色，以便与电池的绿色区分 */
.g-energy { background: linear-gradient(#ffd426, #f5b100); }
.g-cpu { background: linear-gradient(#3a9bff, #007aff); }
.g-memory { background: linear-gradient(#4fc8dc, #30b0c7); }
.g-fan { background: linear-gradient(#ffad33, #ff9500); }
.g-network { background: linear-gradient(#6ad0f5, #32ade6); }
.g-battery { background: linear-gradient(#4cd964, #34c759); }
.sub.after-table { margin: 22px auto 0; }
/* 版本说明等居中文字：不限制宽度，只在超出页面宽度时换行 */
.sub.wide { max-width: none; }
.center { text-align: center; }
h2.left { text-align: left; }
.center-icon { width: 96px; height: 96px; margin: 0 auto 16px; }

/* 首页顶栏与主窗口的介绍（内容来自应用 README）：每节标题、文字、图片上下排列并居中；
   段落限制行宽（约 36 个汉字），过长的句子自动换行 */
.stacked { text-align: center; }
.stacked h2 { text-align: center; }
.stacked p { color: var(--muted); font-size: 18px; max-width: 36em; margin: 0 auto 12px; }
.feature-media { margin: 26px auto 30px; }
.feature-media img { display: block; width: 100%; height: auto; max-width: 780px; margin: 0 auto; }
.feature-media picture { display: block; }
/* PNG 截图不带背景（圆角外透明）：加一层淡投影，与 macOS 窗口的阴影类似；顶栏效果图本身是一条，不加。
   GIF 没有半透明，应用导出时用纯色填底（浅色 #fffeff、深色 #0e151e，卡片收起时下方的空白也是这个颜色），
   放动图的几节（.gif-stage）用同样的背景色，动图的底与页面融为一体，只看到卡片本身。
   地址在构建时会加 ?v=，所以用 *= 匹配 */
.feature-media:not(.menubar-shot) img[src*=".png"] { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.16)); }
section.block.gif-stage { background: var(--gif-bg); }
@media (prefers-color-scheme: dark) {
  .feature-media:not(.menubar-shot) img[src*=".png"] { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55)); }
}
.feature-media.narrow img { max-width: 460px; }
.menubar-shot img { max-width: 602px; }
@media (max-width: 760px) {
  .stacked p { font-size: 16px; }
}

