/* ============================================================
   fake-error · 其他模板族样式
   仅供 /s 渲染器使用：family=cf | server | platform
   ============================================================ */

/* ---- 接管整页（覆盖原浏览器模板的 100vh / overflow:hidden） ---- */
html.fam body {
  margin: 0;
  height: auto;
  min-height: 100%;
  overflow: auto;
  -webkit-user-select: text;
  user-select: text;
  background: #fff;
}
html.fam #main, html.fam #progress { display: none !important; }

/* ==================== Cloudflare 错误页 ==================== */
.cf {
  --ink: #404040;
  --gray: #999;
  --line: #ebebeb;
  --link: #2f7bbf;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: #fff;
  min-height: 100vh;
}
.cf * { box-sizing: border-box; }
.cf a { color: var(--link); text-decoration: none; transition: color .15s ease; }
.cf a:hover { color: #f68b1f; }
.cf strong { font-weight: 600; }

.cf-wrap { width: 100%; }

/* 顶部标题区 */
.cf-head { max-width: 960px; margin: 0 auto; padding: 40px 0 0; }
.cf-h1 {
  margin: 0 0 8px;
  font-size: 60px;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.cf-h1 .txt { display: inline-block; }
.cf-code {
  display: inline-block;
  background: #d9d9d9;
  color: #313131;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: .1px;
}
.cf-visit { font-size: 16px; }
.cf-time { margin-top: 12px; font-size: 16px; }

/* 三段状态条 */
.cf-band {
  margin: 32px 0;
  padding: 60px 0;
  background-image: linear-gradient(to bottom, #dedede, #ebebeb 3%, #ebebeb 97%, #dedede);
}
.cf-band-in { max-width: 960px; margin: 0 auto; display: flex; }
.cf-col { width: 33.3333%; text-align: center; position: relative; }
.cf-dev { position: relative; margin: 0 auto 40px; width: 100px; }
.cf-ic {
  display: block;
  width: 100px;
  height: 80px;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: contain;
}
.cf-badge {
  position: absolute;
  left: 50%;
  bottom: -16px;
  margin-left: -24px;
  width: 48px;
  height: 48px;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: contain;
}
.cf-loc {
  display: block;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}
.cf-name { display: inline-block; margin: 12px 0 0; font-size: 24px; font-weight: 300; color: var(--gray); line-height: 1.3; }
.cf-state { display: block; font-size: 24px; line-height: 1.3; color: #9bca3e; }
.cf-state.err { color: #bd2426; }

/* 图标（真实页面的同一批 data-uri） */
.ic-browser{background-image:url("data:image/svg+xml;utf8,%3Csvg%20id%3D%22a%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20100%2080.7362%22%3E%3Cpath%20d%3D%22M89.8358.1636H10.1642C4.6398.1636.1614%2C4.6421.1614%2C10.1664v60.4033c0%2C5.5244%2C4.4784%2C10.0028%2C10.0028%2C10.0028h79.6716c5.5244%2C0%2C10.0027-4.4784%2C10.0027-10.0028V10.1664c0-5.5244-4.4784-10.0028-10.0027-10.0028ZM22.8323%2C9.6103c1.9618%2C0%2C3.5522%2C1.5903%2C3.5522%2C3.5521s-1.5904%2C3.5522-3.5522%2C3.5522-3.5521-1.5904-3.5521-3.5522%2C1.5903-3.5521%2C3.5521-3.5521ZM12.8936%2C9.6103c1.9618%2C0%2C3.5522%2C1.5903%2C3.5522%2C3.5521s-1.5904%2C3.5522-3.5522%2C3.5522-3.5521-1.5904-3.5521-3.5522%2C1.5903-3.5521%2C3.5521-3.5521ZM89.8293%2C70.137H9.7312V24.1983h80.0981v45.9387ZM89.8293%2C16.1619H29.8524v-5.999h59.977v5.999Z%22%20style%3D%22fill%3A%20%23999%3B%22/%3E%3C/svg%3E")}
.ic-cloud{background-image:url("data:image/svg+xml;utf8,%3Csvg%20id%3D%22a%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20152%2078.9141%22%3E%3Cpath%20d%3D%22M132.2996%2C77.9927v-.0261c10.5477-.2357%2C19.0305-8.8754%2C19.0305-19.52%2C0-10.7928-8.7161-19.5422-19.4678-19.5422-2.9027%2C0-5.6471.6553-8.1216%2C1.7987C123.3261%2C18.6624%2C105.3419.9198%2C83.202.9198c-17.8255%2C0-32.9539%2C11.5047-38.3939%2C27.4899-3.0292-2.2755-6.7818-3.6403-10.8622-3.6403-10.0098%2C0-18.1243%2C8.1145-18.1243%2C18.1243%2C0%2C1.7331.258%2C3.4033.7122%2C4.9905-.2899-.0168-.5769-.0442-.871-.0442-8.2805%2C0-14.993%2C6.7503-14.993%2C15.0772%2C0%2C8.2795%2C6.6381%2C14.994%2C14.8536%2C15.0701v.0054h.1069c.0109%2C0%2C.0215.0016.0325.0016s.0215-.0016.0325-.0016%22%20style%3D%22fill%3A%20%23999%3B%22/%3E%3C/svg%3E")}
.ic-server{background-image:url("data:image/svg+xml;utf8,%3Csvg%20id%3D%22a%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2095%2075%22%3E%3Cpath%20d%3D%22M94.0103%2C45.0775l-12.9885-38.4986c-1.2828-3.8024-4.8488-6.3624-8.8618-6.3619l-49.91.0065c-3.9995.0005-7.556%2C2.5446-8.8483%2C6.3295L1.0128%2C42.8363c-.3315.971-.501%2C1.9899-.5016%2C3.0159l-.0121%2C19.5737c-.0032%2C5.1667%2C4.1844%2C9.3569%2C9.3513%2C9.3569h75.2994c5.1646%2C0%2C9.3512-4.1866%2C9.3512-9.3512v-17.3649c0-1.0165-.1657-2.0262-.4907-2.9893ZM86.7988%2C65.3097c0%2C1.2909-1.0465%2C2.3374-2.3374%2C2.3374H9.9767c-1.2909%2C0-2.3374-1.0465-2.3374-2.3374v-18.1288c0-1.2909%2C1.0465-2.3374%2C2.3374-2.3374h74.4847c1.2909%2C0%2C2.3374%2C1.0465%2C2.3374%2C2.3374v18.1288Z%22%20style%3D%22fill%3A%20%23999%3B%22/%3E%3Ccircle%20cx%3D%2274.6349%22%20cy%3D%2256.1889%22%20r%3D%224.7318%22%20style%3D%22fill%3A%20%23999%3B%22/%3E%3Ccircle%20cx%3D%2259.1472%22%20cy%3D%2256.1889%22%20r%3D%224.7318%22%20style%3D%22fill%3A%20%23999%3B%22/%3E%3C/svg%3E")}
.ic-ok{background-image:url("data:image/svg+xml;utf8,%3Csvg%20id%3D%22a%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%2224%22%20r%3D%2223.4815%22%20style%3D%22fill%3A%20%239bca3e%3B%22/%3E%3Cpolyline%20points%3D%2217.453%2024.9841%2021.7183%2030.4504%2030.2076%2016.8537%22%20style%3D%22fill%3A%20none%3B%20stroke%3A%20%23fff%3B%20stroke-linecap%3A%20round%3B%20stroke-linejoin%3A%20round%3B%20stroke-width%3A%204px%3B%22/%3E%3C/svg%3E")}
.ic-err{background-image:url("data:image/svg+xml;utf8,%3Csvg%20id%3D%22a%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2047.9145%2047.9641%22%3E%3Ccircle%20cx%3D%2223.9572%22%20cy%3D%2223.982%22%20r%3D%2223.4815%22%20style%3D%22fill%3A%20%23bd2426%3B%22/%3E%3Cline%20x1%3D%2219.0487%22%20y1%3D%2219.0768%22%20x2%3D%2227.8154%22%20y2%3D%2228.8853%22%20style%3D%22fill%3A%20none%3B%20stroke%3A%20%23fff%3B%20stroke-linecap%3A%20round%3B%20stroke-linejoin%3A%20round%3B%20stroke-width%3A%203px%3B%22/%3E%3Cline%20x1%3D%2227.8154%22%20y1%3D%2219.0768%22%20x2%3D%2219.0487%22%20y2%3D%2228.8853%22%20style%3D%22fill%3A%20none%3B%20stroke%3A%20%23fff%3B%20stroke-linecap%3A%20round%3B%20stroke-linejoin%3A%20round%3B%20stroke-width%3A%203px%3B%22/%3E%3C/svg%3E")}

/* 正文两栏 */
.cf-body { max-width: 960px; margin: 0 auto 32px; }
.cf-cols { display: flex; gap: 24px; }
.cf-half { width: 50%; line-height: 1.625; font-size: 15px; }
.cf-half h2 {
  margin: 0 0 16px;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}
.cf-half p { margin: 0 0 12px; }
.cf-half p.sub { color: var(--gray); margin-bottom: 6px; }
.cf-half ul { margin: 0 0 12px; padding-left: 20px; }
.cf-half li { margin: 0 0 4px; }
.cf-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--gray);
  font-size: 13px;
  line-height: 1.6;
}

/* 页脚 */
.cf-foot {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
}
.cf-foot span.item { display: inline-block; margin: 0 2px; }
.cf-foot .sep { color: #b6b6b6; margin: 0 6px; }
.cf-ip-btn {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #0051c3;
  cursor: pointer;
}
.cf-ip-btn:hover { color: #ee730a; }

/* ==================== Cloudflare 拦截页（1020 / 403） ==================== */
.cfb { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: #fff; min-height: 100vh; color: #404040; }
.cfb-top { border-bottom: 1px solid #ebebeb; }
.cfb-top-in { max-width: 960px; margin: 0 auto; padding: 18px 0; display: flex; align-items: center; gap: 14px; }
.cfb-logo { display: flex; align-items: center; gap: 10px; color: #f6821f; font-weight: 600; letter-spacing: .3px; font-size: 15px; }
.cfb-logo svg { width: 34px; height: 16px; }
.cfb-title { font-size: 13px; color: #7d7d7d; padding-left: 14px; border-left: 1px solid #e3e3e3; }
.cfb-main { max-width: 960px; margin: 0 auto; padding: 64px 0 40px; }
.cfb-h1 { font-size: 44px; font-weight: 300; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.4px; }
.cfb-sub { font-size: 20px; color: #7d7d7d; font-weight: 300; margin: 0 0 8px; }
.cfb-ray { font-size: 13px; color: #999; margin-bottom: 44px; }
.cfb-cols { display: flex; gap: 48px; }
.cfb-half { width: 50%; }
.cfb-half h2 { font-size: 22px; font-weight: 400; margin: 0 0 14px; }
.cfb-half p { font-size: 15px; line-height: 1.65; color: #5b5b5b; margin: 0 0 12px; }
.cfb-foot { border-top: 1px solid #ebebeb; margin-top: 56px; }
.cfb-foot-in { max-width: 960px; margin: 0 auto; padding: 26px 0; font-size: 13px; color: #6d6d6d; }
.cfb-foot-in .sep { color: #c4c4c4; margin: 0 8px; }
.cfb a { color: #2f7bbf; text-decoration: none; }
.cfb a:hover { color: #f68b1f; }

/* ==================== Cloudflare 质询页 ==================== */
.cfc {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f7f7f7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #313131;
}
.cfc-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .045);
  padding: 34px 30px 26px;
  text-align: center;
}
.cfc-logo { color: #f6821f; display: flex; justify-content: center; margin-bottom: 22px; }
.cfc-logo svg { width: 96px; height: 44px; }
.cfc h1 { font-size: 19px; font-weight: 500; line-height: 1.45; margin: 0 0 12px; }
.cfc p { font-size: 13.5px; line-height: 1.65; color: #6d6d6d; margin: 0 0 8px; }
.cfc .host { color: #313131; font-weight: 500; word-break: break-all; }
.cfc-bar { margin: 24px 0 10px; height: 3px; border-radius: 2px; background: #eee; overflow: hidden; }
.cfc-bar i { display: block; height: 100%; width: 12%; background: #f6821f; transition: width .55s ease; }
.cfc-count { font-size: 12px; color: #9a9a9a; font-variant-numeric: tabular-nums; }
.cfc-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid #eee; font-size: 12px; color: #9a9a9a; line-height: 1.8; }
.cfc-foot b { font-weight: 500; color: #7d7d7d; }

/* ==================== nginx / Apache（保持原样极简） ==================== */
.srv {
  font-family: "Times New Roman", Times, serif;
  background: #fff;
  color: #000;
  min-height: 100vh;
  padding: 8px;
}
.srv h1 { font-size: 2em; font-weight: bold; margin: .67em 0; text-align: center; }
.srv center { display: block; text-align: center; }
.srv hr { border: 0; border-top: 1px solid #999; margin: 8px 0; }
.srv p { margin: 1em 0; }
.srv .apache-note { font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: #333; }

/* ==================== Vercel 404 ==================== */
.vc {
  min-height: 100vh;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.vc svg.mark { width: 76px; height: 62px; margin-bottom: 26px; fill: #000; }
.vc h1 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0;
}
.vc .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; margin-top: 14px; }
.vc p { font-size: 14px; color: #666; margin: 18px 0 0; line-height: 1.6; }

/* ==================== Netlify 404 ==================== */
.nl {
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
}
.nl h1 { font-size: 46px; font-weight: 700; margin: 0 0 18px; letter-spacing: -0.5px; }
.nl p { max-width: 520px; font-size: 16px; line-height: 1.65; color: #666; margin: 0 0 8px; }
.nl a {
  display: inline-block;
  margin-top: 28px;
  color: #00ad9f;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #00ad9f;
  border-radius: 4px;
  padding: 11px 20px;
  transition: background .15s, color .15s;
}
.nl a:hover { background: #00ad9f; color: #fff; }

/* ==================== Chrome 崩溃页 ==================== */
.cr {
  background: #fff;
  min-height: 100vh;
  padding: 14vh 0 70px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Roboto, system-ui, sans-serif;
  color: #202124;
  font-size: 14px;
  line-height: 1.6;
}
.cr-in { max-width: 600px; margin: 0 auto; padding: 0 20px; }
.cr-face { width: 72px; height: 72px; margin-bottom: 40px; stroke: #5f6368; }
.cr h1 { font-size: 1.6em; font-weight: 500; line-height: 1.25; margin: 0 0 16px; }
.cr p { color: #5f6368; margin: 0 0 10px; }
.cr .code { margin-top: 18px; font-size: 12px; color: #80868b; font-family: ui-monospace, Consolas, monospace; }
.cr .btns { margin-top: 26px; display: flex; gap: 10px; }
.cr .btn {
  border: 1px solid #dadce0;
  background: #fff;
  color: #1a73e8;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: default;
}
.cr .btn.primary { background: #1a73e8; border-color: #1a73e8; color: #fff; }

/* ==================== Firefox 证书风险页 ==================== */
.ffc {
  background: #fff;
  min-height: 100vh;
  padding: 8vh 0 60px;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Roboto, sans-serif;
  color: #15141a;
  font-size: 15px;
  line-height: 1.65;
}
.ffc-in { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.ffc-badge { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ffc-badge svg { width: 56px; height: 56px; flex: 0 0 auto; }
.ffc-site { font-size: 13px; color: #5b5b66; word-break: break-all; }
.ffc h1 { font-size: 31px; line-height: 1.25; font-weight: 700; margin: 0 0 18px; }
.ffc p { margin: 0 0 12px; }
.ffc h2 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.ffc ul { margin: 0 0 12px; padding-left: 22px; }
.ffc li { margin: 0 0 4px; }
.ffc details { margin: 18px 0 0; }
.ffc summary { cursor: pointer; color: #0060df; font-size: 14px; }
.ffc .btns { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.ffc .btn {
  border: 0;
  border-radius: 4px;
  padding: 11px 18px;
  font-size: 14px;
  font-family: inherit;
  cursor: default;
  background: #0060df;
  color: #fff;
}
.ffc .btn.ghost { background: #f0f0f4; color: #15141a; }

/* ==================== 窄屏适配 ==================== */
@media (max-width: 960px) {
  .cf-head, .cf-body, .cf-foot, .cfb-main, .cfb-top-in, .cfb-foot-in { padding-left: 20px; padding-right: 20px; }
  .cf-h1 { font-size: 34px; }
  .cf-band { padding: 34px 0; }
  .cf-col { width: 100%; padding: 18px 0; }
  .cf-band-in { flex-direction: column; }
  .cf-dev { margin-bottom: 26px; }
  .cf-ic { width: 72px; height: 58px; }
  .cf-badge { width: 34px; height: 34px; margin-left: -17px; bottom: -12px; }
  .cf-name, .cf-state { font-size: 20px; }
  .cf-cols { flex-direction: column; gap: 8px; }
  .cf-half { width: 100%; }
  .cf-half h2 { font-size: 24px; }
  .cfb-h1 { font-size: 30px; }
  .cfb-sub { font-size: 17px; }
  .cfb-cols { flex-direction: column; gap: 8px; }
  .cfb-half { width: 100%; }
  .cfb-main { padding-top: 40px; }
  .vc h1 { font-size: 32px; }
  .nl h1 { font-size: 34px; }
  .ffc h1 { font-size: 24px; }
  .cr { padding-top: 9vh; }
  .cr h1 { font-size: 1.4em; }
}

/* 深色模式：Cloudflare / 服务器类页面都是固定浅色，避免系统深色把白底刷黑 */
@media (prefers-color-scheme: dark) {
  html.fam body { background: #fff; }
}
