/* 站点页头与页脚的样式 —— app/templates/partials/site-{header,footer}.html 的那一份。
 *
 * 页面自己的 CSS 管版面，外壳只管这两块，所以几张公开页 include 同一份 partial 时长得一样。
 * 颜色走下面那份 `--h2-*`，引用时仍带回退值：万一哪天页面漏挂这张表也不会裸奔。
 *
 * 与海外那份的差别：
 * - 语言切换在页头用国内的 `.langdd`（海外把它藏起来、改用页脚三语按钮），所以没有
 *   `.topnav~.topr .langdd{display:none}`，也没有 `.status-foot-lang`。
 * - 页脚多 `.bf-lang`（国内两语按钮）、`.bf-mail`、`.icp`（备案号）三组。
 * - `.sr-only` / `.skip-link` 从海外 a11y.css 摘出来放这里：国内不引那张表。
 */

/* 视觉 token 与正文字体栈，五张公开页共用这一份定义 —— 以前 index / pricing / login /
   checkout / gallery 五张 CSS 各抄一遍，值一样只是因为没人改过。外壳这张表排在页面 CSS 之前
   （app/templates/build.py 的 styles 顺序），所以页面要改哪个 token 照旧在自己那张表里重定义。
   页面私有的 token（pricing 的 --h2-body、login 的 --h2-jade/--h2-verm、checkout 的
   --checkout-*）和两张表取值本就不同的 --h2-line 都留在各自页面里。 */
:root {
  --h2-paper: #faf5f0;
  --h2-hover: #000000;
  --h2-ink: #282d32;
  --h2-muted: #91969b;
  --h2-teal: #286464;
  --h2-orange: #ff5a00;
  --h2-deep: #20272d;
  --h2-green-light: #32e132;
  --h2-green-light-2: #00b900;
  /* 正文字体栈。海外那份只写 `PingFangSC-Regular, sans-serif`，Windows 上直接掉到系统默认；
     四个变体同一条栈，粗细交给 font-weight，不靠 PingFangSC-Semibold 这种只有 macOS 有的
     族名。零外链字体。 */
  --pingfang: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pingfang-light: var(--pingfang);
  --pingfang-medium: var(--pingfang);
  --pingfang-bold: var(--pingfang);
}

/* 英文界面换拉丁栈（选择器比 :root 更具体，所以不受上面那条顺序影响）。 */
html[lang="en"] {
  --pingfang: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 80;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--h2-teal, #286464);
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 12px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  margin: 0 auto;
  background: rgba(255, 255, 255, .75);
  border-bottom: 0;
  -webkit-backdrop-filter: blur(16px) saturate(2);
  backdrop-filter: blur(16px) saturate(2);
  font-family: var(--pingfang, system-ui, -apple-system, "Segoe UI", sans-serif);
}

.top .lk {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top .lk img {
  display: block;
  height: 24px;
  object-fit: contain;
}

.top .lk .role {
  display: none;
}

.topnav {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 38px;
  margin: 0;
  transform: translateX(-50%);
}

.topnav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--h2-muted, #91969b);
  font-size: 18px;
  text-decoration: none;
}

.topnav a:hover {
  color: var(--h2-hover, #000);
}

.topnav a[aria-current="page"] {
  color: var(--h2-ink, #282d32);
}

.top .topr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.top .signin,
.top .signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 4px;
  font-size: 16px;
  text-decoration: none;
}

.top .signin {
  padding: 0 14px;
  color: var(--h2-teal, #286464);
  border: 1px solid var(--h2-teal, #286464);
}

.top .signup {
  padding: 0 16px;
  color: #fff;
  background: var(--h2-teal, #286464);
}

.top .signin:hover,
.top .signup:hover {
  color: #fff;
  background: #1f5050;
}

/* 国内线的语言切换就在页头这个下拉里（海外是页脚三语按钮），所以不藏。
 * 登录后由 www/assets/js/i18n.js 统一 hidden —— 类名 `.langdd` 是那条逻辑的抓手。 */
.langdd {
  position: relative;
}

.langdd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  color: var(--h2-muted, #91969b);
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .02em;
  cursor: pointer;
}

.langdd-btn:hover {
  color: var(--h2-ink, #282d32);
}

.langdd-btn .chev {
  width: 10px;
  height: 10px;
  transition: transform .18s;
}

.langdd.open .langdd-btn .chev {
  transform: rotate(180deg);
}

.langdd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: none;
  min-width: 148px;
  padding: 5px;
  border: 1px solid var(--line, #e7e3d9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px -18px rgba(26, 35, 51, .35);
}

.langdd.open .langdd-menu {
  display: block;
}

.langdd-menu [role="option"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: var(--body, #3a4358);
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.langdd-menu [role="option"]:hover {
  color: var(--ink, #1a2333);
  background: var(--paper2, #faf9f6);
}

.langdd-menu [role="option"][aria-selected="true"] {
  color: var(--indigo, #2847c4);
  font-weight: 700;
}

.langdd-menu .ck {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: 0;
  color: var(--indigo, #2847c4);
}

.langdd-menu [role="option"][aria-selected="true"] .ck {
  opacity: 1;
}

.top .userwrap {
  position: relative;
}

.top .userchip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line, #e7e3d9);
  border-radius: 50%;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  appearance: none;
  overflow: hidden;
  transition: box-shadow .15s;
}

.top .userchip:hover,
.top .userchip[aria-expanded="true"] {
  box-shadow: 0 0 0 3px rgba(40, 71, 196, .14);
}

.top .acctmenu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: none;
  width: 248px;
  padding: 6px;
  border: 1px solid var(--line, #e7e3d9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px -18px rgba(26, 35, 51, .35);
}

.top .acctmenu.is-open {
  display: block;
  animation: site-chrome-menuin .16s ease-out;
}

@keyframes site-chrome-menuin {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.top .acctmenu .head {
  padding: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line, #e7e3d9);
}

.top .acctmenu .head .nm {
  overflow-wrap: anywhere;
  color: var(--ink, #1a2333);
  font-size: 13.5px;
  font-weight: 700;
}

.top .acctmenu .head .em {
  overflow-wrap: anywhere;
  color: var(--mute, #6b7080);
  font-size: 12px;
}

.top .acctmenu a,
.top .acctmenu button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--body, #3a4358);
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.top .acctmenu .user-menu-plan {
  margin-left: auto;
  overflow: hidden;
  color: var(--mute, #6b7080);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top .acctmenu a:hover,
.top .acctmenu button:hover {
  color: var(--ink, #1a2333);
  background: var(--paper2, #faf9f6);
}

.top .acctmenu .logout,
.top .acctmenu .logout svg {
  color: var(--verm, #ba3b1d);
}

.top .acctmenu .sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--line, #e7e3d9);
}

.top .uc-av {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: var(--indigo, #2847c4);
  font-size: 13px;
  font-weight: 700;
}

.top .uc-av img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top .userchip:has(.uc-av.is-letter) {
  border: 0;
  overflow: visible;
}

.top .uc-av.is-letter {
  border: 2px solid #eae6e0;
  color: #286464;
  background: #faf5f0;
  font-family: var(--pingfang-bold, system-ui, sans-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 30px;
}

/** footer **/
.bigfoot {
  position: relative;
  /* min-height: 1050px; */
  padding: 120px max(24px, calc((100vw - 1200px) / 2)) 160px;
  overflow: hidden;
  color: #91969b;
  background: #000;
}

.status-foot-bg {
  position: absolute;
  right: max(24px, calc((100vw - 1200px) / 2));
  bottom: 200px;
  z-index: 0;
  width: 916px;
  height: 562px;
  pointer-events: none;
  user-select: none;
}

.status-foot-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.status-foot-inner,
.bigfoot .bf-bottom {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.status-foot-inner {
  display: block;
  width: 1200px;
  max-width: 1200px;
  /* height: 862px; */
}

.status-foot-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 1200px;
  height: 60px;
}

.status-foot-brand>img {
  width: 354px;
  height: 60px;
  object-fit: contain;
  filter: grayscale(1) brightness(5);
}

.bf-ask {
  display: flex;
  width: min(430px, 100%);
  height: 46px;
  margin-top: 30px;
  overflow: hidden;
  border: 2px solid var(--h2-teal, #286464);
  border-radius: 24px;
}

.status-foot-brand .bf-ask {
  width: 540px;
  max-width: 540px;
  height: 60px;
  margin: 0;
  border: 4px solid var(--h2-teal, #286464);
  border-radius: 40px;
  background: var(--h2-teal, #286464);
  transition: background-color .15s ease, border-color .15s ease;
}

.bf-ask input {
  flex: 1;
  min-width: 0;
  padding: 0 15px;
  border: 0;
  color: #282d32;
  background: #fff;
  font: inherit;
}

.status-foot-brand .bf-ask input {
  height: 52px;
  padding: 0 30px;
  border-radius: 34px;
  color: #282d32;
  font-size: 24px;
  line-height: 40px;
  background: #000;
}

.bf-ask button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  padding: 0;
  border: 0;
  color: #fff;
  background: var(--h2-teal, #286464);
  font-size: 24px;
  cursor: pointer;
}

.status-foot-brand .bf-ask button {
  width: 60px;
  min-height: 60px;
  height: 60px;
  margin: -4px -4px -4px 0;
  border-radius: 50%;
  background: var(--h2-teal, #286464);
  transition: background-color .15s ease, filter .15s;
}

.status-foot-brand .bf-ask button img {
  display: block;
  width: 24px;
  height: 32px;
  object-fit: contain;
}

.status-foot-brand .bf-ask:focus-within {
  border-color: var(--h2-green-light-2, #00b900);
  background: var(--h2-green-light-2, #00b900);
}

.status-foot-brand .bf-ask:focus-within input,
.status-foot-brand .bf-ask input:focus,
.status-foot-brand .bf-ask input:focus-visible {
  color: #282d32;
  background: #fff;
  outline: none;
}

.status-foot-brand .bf-ask:focus-within input::placeholder,
.status-foot-brand .bf-ask input:focus::placeholder {
  color: #dce1e6;
}

.status-foot-brand .bf-ask:focus-within button,
.status-foot-brand .bf-ask:focus-within button:hover {
  background: var(--h2-green-light-2, #00b900);
}

.status-foot-brand .bf-ask button img.focus-ico,
.status-foot-brand .bf-ask:focus-within button img {
  display: none;
}

.status-foot-brand .bf-ask:focus-within button img.focus-ico {
  display: block;
}

.status-foot-nav {
  margin-top: 40px;
  display: flex;
  gap: 0;
  flex-direction: column;
}

.status-foot-nav a {
  width: max-content;
  color: #91969b;
  font-size: 48px;
  line-height: 70px;
  text-decoration: none;
}

.status-foot-nav a:hover {
  color: #fff;
}

.bf-lang {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bf-lang button {
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  color: #91969b;
  background: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s;
}

.bf-lang button:hover,
.bf-lang button.on {
  color: #fff;
}

/* 备案号：SOA_ICP_TEXT 有值才渲染，域名备案下来填进去就出现。 */
.icp,
.bf-mail {
  color: #91969b;
  text-decoration: none;
}

.icp:hover,
.icp:focus-visible,
.bf-mail:hover,
.bf-mail:focus-visible {
  color: #fff;
}

.bigfoot .bf-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 12px;
  font-size: 20px;
  line-height: 28px;
  max-width: 1200px;
  margin: auto;
}

.bf-legal {
  display: flex;
  gap: 28px;
}

.bf-legal a {
  color: #91969b;
}

.bf-legal a:hover,
.bf-legal a:focus-visible {
  color: #fff;
}

@media (max-width: 900px) and (min-width: 701px) {
  .topnav {
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .top {
    height: 64px;
    padding: 0 16px;
  }

  .top .lk img {
    width: 130px;
    height: auto;
  }

  .topnav {
    display: none;
  }

  .top .topr {
    margin-left: auto;
  }

  .top .signup {
    padding: 0 10px;
    font-size: 12px;
  }

  .bigfoot {
    min-height: 0;
  }

  .status-foot-bg {
    bottom: 220px;
    width: 100%;
    height: auto;
    right: 0;
    padding:0 24px;
  }

  .status-foot-bg img {
    width: 100%;
    height: auto;
  }

  .status-foot-inner {
    width: 100%;
    height: auto;
  }

  .status-foot-brand {
    width: 100%;
    height: auto;
    flex-direction: column;
    gap: 52px;
  }

  .status-foot-brand>img {
    width: 177px;
    height: 30px;
  }

  .status-foot-brand .bf-ask {
    width: min(430px, 100%);
    height: 46px;
    border-width: 2px;
    border-radius: 30px;
  }

  .status-foot-brand .bf-ask input {
    height: 42px;
    padding: 0 15px;
    font-size: 16px;
  }

  .status-foot-brand .bf-ask button {
    width: 52px;
    min-height: 46px;
    height: 46px;
    margin: -2px -2px -2px 0;
  }

  .status-foot-nav {
    position: static;
    margin-top: 52px;
    gap: 5px;
  }

  .status-foot-nav a {
    font-size: 28px;
    line-height: 1.5;
  }

  .bigfoot .bf-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    height: auto;
    margin-top: calc(50px + 20%);
    padding-top: 22px;
    font-size: 18px;
    line-height: 1.4;
  }

  .bf-legal {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .top .acctmenu.is-open,
  .langdd-btn .chev,
  .status-foot-brand .bf-ask,
  .status-foot-brand .bf-ask button {
    animation: none;
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce),
(prefers-contrast: more) {
  .top {
    background: #fff !important;
    border-bottom: 0 !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .top {
    background: #fff;
  }
}

/* @media (min-width: 701px) and (max-width: 1248px) {
  .top {
    max-width: calc(100vw - 24px);
  }
} */

/* The footer has a 1200px desktop composition; make that composition fluid
 * before the 1440px artboard breakpoint so it cannot widen the document. */
@media (min-width: 701px) and (max-width: 1439px) {
  .bigfoot {
    padding: 88px max(24px, calc((100vw - 1120px) / 2)) 160px;
  }

  .status-foot-inner {
    width: 100%;
    max-width: 1120px;
  }

  .status-foot-brand {
    width: 100%;
    height: auto;
    gap: 28px;
  }

  .status-foot-brand>img {
    width: 240px;
    height: auto;
  }

  .status-foot-brand .bf-ask {
    width: min(460px, 52%);
    height: 52px;
  }

  .status-foot-brand .bf-ask input {
    height: 44px;
    font-size: 18px;
    padding: 0 20px;
  }

  .status-foot-brand .bf-ask button {
    width: 52px;
    min-height: 52px;
    height: 52px;
  }

  .status-foot-nav {
    top: 92px;
  }

  .status-foot-nav a {
    font-size: 36px;
    line-height: 1.2;
  }

  .bigfoot .bf-bottom {
    font-size: 18px;
  }

  .status-foot-bg {
    right: max(24px, calc((100vw - 1120px) / 2));
    max-width: min(80%, 760px);
    height: auto;
  }
}

.site-foot {
  flex-shrink: 0;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 80px;
  color: #91969b;
}

.site-foot-line {
  height: 1px;
  background: currentColor;
}

.site-foot-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  font-size: 20px;
  line-height: 28px;
}

.site-foot-legal {
  display: flex;
  gap: 42px;
}

.site-foot a {
  color: inherit;
  text-decoration: none;
}

.site-foot a:hover,
.site-foot a:focus-visible {
  color: #282d32;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 800px) {
  .site-foot {
    width: min(620px, calc(100% - 32px));
    padding: 32px 0 48px;
  }

  .site-foot-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    font-size: 16px;
  }

  .site-foot-legal {
    gap: 20px;
  }
}

@media (max-width: 520px) {
  .site-foot {
    width: calc(100% - 24px);
  }

  .site-foot-legal {
    flex-wrap: wrap;
  }
}

@media (prefers-contrast: more) {
  .site-foot {
    color: #282d32;
  }
}
