/* 静态信息页共享样式（about/contact/terms/privacy/refund/pricing/signup）
   设计令牌与主站一致：纸色背景 + 深墨文字 */
:root {
  --bg: #faf7f2;
  --ink: #2b2824;
  --muted: #8a8377;
  --line: #e8e1d4;
  --card: #ffffff;
  --accent-bg: #fdf3e7;
  --accent-line: #f0ddc2;
  --link: #8a5a2b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-left: 72px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.page-head {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
  max-width: none; margin: 0; padding: 0 32px 0 24px;
  border-bottom: 1px solid rgba(43, 40, 36, .08);
  background: rgba(250, 247, 242, .88);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 820; font-size: 18px; color: var(--ink); letter-spacing: 0; line-height: 1; }
.brand span { color: rgba(117,111,104,.88); font-family: inherit; font-style: italic; font-weight: 650; }
.brand:hover { text-decoration: none; }
.site-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 120;
  width: 72px;
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.48);
  border-right: 1px solid rgba(43,40,36,.08);
  box-shadow: 12px 0 38px rgba(43,40,36,.045);
  backdrop-filter: blur(18px);
}
.site-rail-top,
.site-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.site-rail-link {
  width: 52px;
  min-height: 52px;
  border-radius: 18px;
  color: var(--muted);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
}
.site-rail-link[hidden] {
  display: none !important;
}
.site-rail-link span {
  font-size: 16px;
  font-weight: 800;
}
.site-rail-link b {
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.site-rail-link:hover {
  color: var(--link);
  background: rgba(249,115,22,.08);
  text-decoration: none;
}
.site-rail-region {
  position: relative;
  width: 52px;
}
.site-rail-region > summary {
  list-style: none;
  cursor: pointer;
}
.site-rail-region > summary::-webkit-details-marker {
  display: none;
}
.site-rail-region > summary span {
  letter-spacing: -1px;
}
.site-rail-region-menu {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  z-index: 130;
  width: 138px;
  display: none;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,253,249,.96);
  box-shadow: 0 18px 44px rgba(43,40,36,.12);
  backdrop-filter: blur(18px);
}
.site-rail-region[open] .site-rail-region-menu {
  display: grid;
}
.site-rail-region-menu a {
  min-height: 38px;
  padding: 0 9px;
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
}
.site-rail-region-menu a span {
  width: 26px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(249,115,22,.10);
  color: var(--link);
  font-weight: 850;
  font-size: 11px;
}
.site-rail-region-menu a:hover {
  background: rgba(249,115,22,.08);
  color: var(--link);
  text-decoration: none;
}
.site-rail-region-menu a::after {
  content: "✓";
  margin-left: auto;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
}
.site-rail-region-menu a.active::after {
  color: #f97316;
}
.page-head nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; font-size: 14px; }
.page-head nav a {
  min-height: 33px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  font-weight: 650;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(66, 49, 27, .06);
}
.page-head nav a.cta {
  min-height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
}
.page-head nav a.cta:hover { text-decoration: none; opacity: .88; }
.static-lang-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(66, 49, 27, .08);
}
.static-lang-toggle:hover {
  border-color: var(--accent-line);
  color: var(--link);
}

main { max-width: 880px; margin: 0 auto; padding: 12px 20px 56px; flex: 1 0 auto; width: 100%; }
main.narrow { max-width: 720px; }
[data-lang-panel] { display: none; }
html:not([data-static-lang]) [data-lang-panel="zh-CN"],
html[data-static-lang="zh-CN"] [data-lang-panel="zh-CN"],
html[data-static-lang="en"] [data-lang-panel="en"] { display: block; }
h1 { font-size: 30px; line-height: 1.3; margin: 28px 0 6px; }
h2 { font-size: 20px; margin: 36px 0 10px; }
h3 { font-size: 16px; margin: 24px 0 8px; }
.sub { color: var(--muted); margin: 0 0 24px; }
.note {
  background: var(--accent-bg); border: 1px solid var(--accent-line);
  border-radius: 8px; padding: 12px 16px; font-size: 14px; margin: 18px 0;
}
ul { padding-left: 22px; }
li { margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.download-stats {
  margin-top: -4px;
}
.download-stats b {
  color: var(--ink);
  font-weight: 800;
}

body[data-static-page="extension"] {
  background:
    linear-gradient(rgba(128, 91, 48, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 91, 48, .045) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
}

.download-main {
  max-width: 1180px;
  padding-top: 10px;
}

.download-hero {
  margin: 8px 0 16px;
  padding: 30px 34px;
  border: 1px solid #a9d5bb;
  border-radius: 12px;
  background: #2eaf69;
  color: #fff;
  box-shadow: 0 14px 32px rgba(24, 92, 55, .12);
}

.download-kicker {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .82;
}

.download-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

.download-updates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .34);
}

.download-updates div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
  font-size: 14px;
}

.download-updates strong,
.download-updates time {
  color: #fff;
  font-weight: 800;
}

.download-updates time {
  white-space: nowrap;
  opacity: .82;
}

.download-products {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 10px;
}

.download-tile {
  position: relative;
  min-height: 254px;
  padding: 14px 12px 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(68, 50, 28, .06);
}

.download-tile h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.download-tile p {
  margin: 0;
  color: #776f64;
  font-size: 13px;
  line-height: 1.5;
}

.download-tile .btn {
  margin-top: auto;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
}

.download-tile .small {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  min-height: 18px;
  font-size: 12px;
}

.download-tile code {
  display: block;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.25;
  color: #2e6b4b;
}

.download-badge {
  align-self: flex-start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
}

.tile-green {
  background: linear-gradient(180deg, rgba(230, 248, 238, .9), rgba(255,255,255,.82));
  border-color: #b8dcc6;
}
.tile-green .download-badge { background: #d5f0df; color: #07583d; }

.tile-mint {
  background: linear-gradient(180deg, rgba(233, 246, 238, .92), rgba(255,255,255,.84));
  border-color: #bfd9c7;
}
.tile-mint .download-badge { background: #dcefe3; color: #0c593f; }

.tile-teal {
  background: linear-gradient(180deg, rgba(229, 245, 239, .92), rgba(255,255,255,.84));
  border-color: #b9d7cb;
}
.tile-teal .download-badge { background: #d9efe7; color: #0c5a4d; }

.tile-sand {
  background: linear-gradient(180deg, rgba(249, 242, 229, .95), rgba(255,255,255,.82));
}
.tile-sand .download-badge { background: #e9decc; color: #4c3d2c; }

.download-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.62);
}

.download-help div {
  padding: 10px 12px;
  border: 1px solid #eadcc9;
  border-radius: 8px;
  background: rgba(255, 252, 247, .72);
}

.download-help h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.download-help p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 22px; margin: 14px 0;
}

table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 14px 0; background: var(--card); }
th, td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: var(--accent-bg); font-weight: 700; }
th[colspan] { color: var(--link); background: #fff7ec; }
td.c, th.c { text-align: center; }

/* 定价卡片 */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 22px 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; position: relative; display: flex; flex-direction: column; min-height: 100%; }
.plan.hot { border: 2px solid var(--ink); }
.plan .tag {
  position: absolute; top: -11px; left: 18px; background: var(--ink); color: #fff;
  font-size: 12px; padding: 2px 10px; border-radius: 99px;
}
.plan h3 { margin: 0 0 4px; font-size: 17px; }
.plan .price { font-size: 30px; font-weight: 800; margin: 8px 0 2px; }
.plan .price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.plan .per { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.plan ul { padding-left: 18px; font-size: 14px; min-height: 120px; }
.plan .btn { margin-top: auto; }
.plan .small.muted { min-height: 18px; }
.btn {
  display: block; text-align: center; padding: 10px 0; border-radius: 8px; font-weight: 700;
  background: var(--ink); color: #fff; border: none; width: 100%; font-size: 15px; cursor: pointer;
}
.btn:hover { text-decoration: none; opacity: .9; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; }

/* 表单（signup） */
.form-row { margin: 14px 0; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.form-row input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; background: #fff; color: var(--ink);
}
.form-row input:focus { outline: 2px solid var(--accent-line); border-color: var(--accent-line); }
.form-msg { font-size: 13px; min-height: 20px; margin: 8px 0 0; }
.form-msg.ok { color: #2e7d32; }
.form-msg.err { color: #c62828; }
.oauth-row { display: flex; gap: 10px; margin: 14px 0; }
.oauth-row .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.divider {
  display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0;
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.page-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--line); margin-top: auto; padding: 22px 20px 34px;
  text-align: center; font-size: 13px; color: var(--muted);
}
.page-foot a { color: var(--muted); margin: 0 6px; }

@media (max-width: 640px) {
  body {
    padding-left: 0;
    padding-bottom: 68px;
  }
  .site-rail {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    min-height: 58px;
    padding: 5px 8px calc(4px + env(safe-area-inset-bottom));
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    border-right: 0;
    border-top: 1px solid rgba(43,40,36,.12);
    box-shadow: 0 -8px 28px rgba(43,40,36,.08);
  }
  .site-rail-top,
  .site-rail-bottom {
    display: contents;
  }
  .site-rail-link {
    flex: 0 0 58px;
    width: 58px;
    min-height: 48px;
    border-radius: 0;
  }
  .site-rail-region {
    flex: 0 0 58px;
    width: 58px;
  }
  .site-rail-region-menu {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    top: auto;
    width: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px;
    border-radius: 16px;
  }
  .site-rail-region-menu a {
    min-height: 44px;
    justify-content: center;
    flex-direction: column;
    padding: 4px 6px;
  }
  .page-head { min-height: 54px; padding: 8px 12px; }
  .page-head nav { justify-content: flex-end; gap: 8px; }
  .brand { font-size: 16px; }
  h1 { font-size: 24px; }
  .oauth-row { flex-direction: column; }
}

@media (max-width: 1080px) {
  .download-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .download-hero {
    padding: 24px 18px;
  }
  .download-updates,
  .download-products,
  .download-help {
    grid-template-columns: 1fr;
  }
  .download-tile {
    min-height: 0;
  }
}
