/*
 * 首页专属基础主题。
 * 只通过 .home-page 限定作用域，避免影响后台和其他公共页面。
 * 具体模块视觉在后续首页还原阶段继续补充。
 */
.home-page {
  --home-blue: #1264db;
  --home-blue-deep: #083fc4;
  --home-blue-soft: #eaf4ff;
  --home-cyan: #08c9c5;
  --home-green: #18d99a;
  --home-text: #123c9e;
  --home-muted: #7394ce;
  --home-line: #d9e9fb;
  --home-surface: #ffffff;
  --home-page-bg: #f7fbff;
  color: var(--home-text);
  background: var(--home-page-bg);
  overflow: hidden;
}

/* Shared .shell widths (including recent entries and the capability strip)
 * are owned by public-layout.css, not by homepage breakpoint overrides. */

.home-page .hero,
.home-page .section {
  border-color: var(--home-line);
}

.home-page .hero {
  background: linear-gradient(180deg, #f8fcff 0%, #ffffff 48%, #f7fbff 100%);
}

.home-page .section-tint {
  background: #f1f8ff;
}

.home-page h1,
.home-page h2,
.home-page h3,
.home-page p {
  overflow-wrap: anywhere;
}

.home-page h2 {
  color: var(--home-blue-deep);
}

.home-page .eyebrow {
  color: var(--home-blue);
}

.home-page .entry-card,
.home-page .checker-panel,
.home-page .ranking-table-wrap,
.home-page .station-card,
.home-page .precheck-aside {
  border-color: var(--home-line);
  background: var(--home-surface);
  box-shadow: 0 12px 34px rgba(42, 117, 218, 0.08);
}

.home-page .entry-helper {
  border-color: var(--home-line);
  background: rgba(255, 255, 255, 0.82);
}

.home-page .button.primary,
.home-page .button.primary:hover {
  background: var(--home-blue-deep);
}

.home-page .button.ghost,
.home-page .text-link {
  color: var(--home-blue);
}

.home-page .trust-row span,
.home-page .chip,
.home-page .status-label,
.home-page .family-label {
  border-color: var(--home-line);
  background: #ffffff;
  color: var(--home-muted);
}

.home-page .section-heading {
  gap: 24px;
}

.home-page .section-heading h2 {
  letter-spacing: -0.045em;
}

/* The detection card owns its layout; no shared form or catalog styles change. */
.home-page .home-check-section {
  width: min(
    calc(100% - var(--public-content-gutter)),
    var(--public-content-max)
  );
  margin: 14px auto 0;
}

.home-check-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 30px;
  padding: 18px;
  border: 1px solid #e4efff;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 15% 85%, #dceeff 0, transparent 44%),
    linear-gradient(115deg, #f6fbff, #eaf4ff);
}

.home-check-intro {
  position: relative;
  min-width: 0;
  padding: 18px 18px 8px;
  isolation: isolate;
}

.home-check-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 48% 55% 0 -18px;
  background: radial-gradient(circle, #b9dcff 1px, transparent 1.5px) 0 0 / 16px 16px;
  mask-image: linear-gradient(90deg, #000, transparent);
  pointer-events: none;
}

.home-page #home-check-title {
  margin: 0;
  color: #083fc4;
  font-family: inherit;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.3;
}

.home-check-lead {
  margin: 12px 0 0;
  color: #6384bd;
  font-size: 17px;
  line-height: 1.7;
}

.home-product-logos {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px 2%;
  margin: 38px auto 28px;
  padding-block: 8px;
  max-width: 480px;
}

.home-product-logos:has(.home-product-logo)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -16px -2% -18px;
  pointer-events: none;
  background:
    radial-gradient(circle at 4% 20%, #cfe5ff 0 8px, transparent 9px),
    radial-gradient(circle at 97% 28%, #c4e0ff 0 8px, transparent 10px),
    radial-gradient(circle at 95% 79%, #c5e1ff 0 9px, transparent 11px),
    radial-gradient(circle at 36% 98%, #cfe5ff 0 8px, transparent 10px);
}

.home-product-logo {
  display: flex;
  flex: 0 0 23%;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  color: #164fc1;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
}

/* Ten families form the reference's 3–4–3 arrangement; other counts wrap naturally. */
.home-product-logo:first-child:nth-last-child(10),
.home-product-logo:first-child:nth-last-child(10) ~ .home-product-logo:nth-child(2),
.home-product-logo:first-child:nth-last-child(10) ~ .home-product-logo:nth-child(3) {
  flex-basis: 30%;
}

.home-product-disc {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #e0edff;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff 50%, #f2f8ff);
  box-shadow: 0 4px 9px #296bcc1c, 0 1px 3px #367ae91a, inset 0 1px 2px #fff;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.home-product-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  object-fit: contain;
  border-radius: 0;
}

.home-product-logo:hover .home-product-disc,
.home-product-logo:focus-visible .home-product-disc {
  transform: translateY(-2px);
  border-color: #9ec8ff;
  box-shadow: 0 7px 16px #347de526;
}

.home-product-logo.is-active .home-product-disc {
  border-color: var(--home-blue);
  box-shadow: 0 0 0 3px #1264db12, 0 5px 12px #347de51f;
}

.home-check-section a:focus-visible,
.home-check-help summary:focus-visible {
  outline: 3px solid #1264db;
  outline-offset: 3px;
}

.home-catalog-note {
  margin: 0 0 16px;
  font-size: 12px;
  color: #617da7;
  line-height: 1.7;
}

.home-check-links,
.home-owner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 12px;
}

.home-check-links > span {
  color: #617da7;
}

.home-check-links a,
.home-owner-links a,
.home-key-note a {
  color: #1264db;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-check-help {
  margin-top: 16px;
  border-top: 1px solid #d3e4f9;
  padding-top: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: #526e96;
}

.home-check-help summary {
  cursor: pointer;
  color: #1c56b7;
  font-weight: 600;
}

.home-check-section .home-check-panel {
  min-width: 0;
  align-self: start;
  border-radius: 9px;
  scroll-margin-top: 96px;
}

.home-check-section .checker-head {
  padding: 12px 20px;
}

.home-check-section #request-estimate,
.home-check-section .scope-option small {
  color: #526e9b;
  font-size: 12px;
  line-height: 1.6;
}

.home-check-section #check-form {
  gap: 9px;
  padding: 18px 20px;
}

.home-check-section #check-form > input,
.home-check-section .secret-field input {
  min-height: 44px;
  font-size: 14px;
  color: #294b80;
}

.home-check-section .secret-field button {
  top: 0;
  right: 0;
  min-height: 44px;
  min-width: 52px;
  border-radius: 8px;
  cursor: pointer;
}

.home-check-section .scope-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-check-section .scope-option > span {
  padding: 10px;
  min-height: 64px;
}

.home-check-section .scope-option strong::before {
  content: "";
  display: inline-block;
  vertical-align: -2px;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border: 2px solid #9ab2df;
  border-radius: 50%;
  box-sizing: border-box;
}

.home-check-section .scope-option input:checked + span strong::before {
  border: 4px solid #1472ee;
}

.home-check-section .check-tier {
  margin: 1px 0 0;
  padding: 0;
  border: 0;
}

.home-check-section .check-tier legend {
  margin-bottom: 6px;
  color: #31598c;
  font-size: 12px;
  font-weight: 700;
}

.home-check-section .tier-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-check-section .tier-option {
  position: relative;
  display: block;
  min-width: 0;
  color: #31598c;
  cursor: pointer;
}

.home-check-section .tier-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.home-check-section .tier-option > span {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.home-check-section .tier-option strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.home-check-section .tier-option strong::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid #9ab2df;
  border-radius: 50%;
  box-sizing: border-box;
}

.home-check-section .tier-option input:checked + span {
  border-color: #1472ee;
  background: #f1f7ff;
  box-shadow: 0 0 0 2px #1472ee14;
}

.home-check-section .tier-option input:checked + span strong::before {
  border: 4px solid #1472ee;
}

.home-check-section .tier-option input:focus-visible + span {
  outline: 3px solid #1264db;
  outline-offset: 2px;
}

.home-check-section .tier-option small {
  padding-left: 21px;
  color: #617da7;
  font-size: 11px;
  line-height: 1.45;
}

.home-check-section .tier-option.is-disabled {
  cursor: not-allowed;
}

.home-check-section .tier-option.is-disabled > span {
  background: #f7faff;
  color: #8299bd;
  opacity: .78;
}

.home-check-section .tier-option.is-disabled small {
  color: #8299bd;
}

.home-check-section .tier-note {
  margin-top: 6px;
}

.home-check-section .tier-note[data-error="true"] {
  color: #a33d3d;
}

.home-check-section .field-note,
.home-check-section .required,
.home-check-section .consent {
  color: #5c759a;
  font-size: 12px;
}

.home-check-section .consent {
  margin: 0 0 4px;
  align-items: flex-start;
  line-height: 1.7;
}

.home-check-section .consent input {
  flex: 0 0 17px;
}

.home-key-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0;
  color: #527497;
  font-size: 12px;
  line-height: 1.7;
}

.home-key-note svg {
  flex: 0 0 22px;
  width: 22px;
  height: 24px;
  fill: none;
  stroke: #08b88c;
  stroke-width: 1.8;
}

.home-check-section #check-form > .button {
  min-height: 48px;
  font-size: 15px;
}

@media (max-width: 900px) {
  .home-check-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .home-check-intro {
    padding: 12px 14px 0;
  }
  .home-product-logos {
    margin-block: 26px 20px;
  }
}

@media (max-width: 720px) {
  .home-page .home-check-section {
    width: calc(100% - 24px);
    margin-top: 12px;
  }
  .home-check-card {
    padding: 12px;
  }
  .home-check-intro {
    padding: 10px 4px 0;
  }
  .home-check-lead {
    font-size: 14px;
  }
  .home-product-logo {
    font-size: 11px;
  }
  .home-product-disc {
    width: 48px;
    height: 48px;
  }
  .home-product-icon {
    width: 30px;
    height: 30px;
  }
  .home-check-section #check-form {
    padding: 16px 12px;
  }
  .home-check-section .checker-head {
    padding: 12px;
  }
  .home-check-section .tier-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-product-disc {
    transition: none;
  }
}

/* Stage E: homepage brand navigation and model switching only. */
.home-page .section.home-ranking-section {
  width: min(
    calc(100% - var(--public-content-gutter)),
    var(--public-content-max)
  );
  margin: 12px auto 30px;
  padding: 18px 14px 12px;
  border: 1px solid #e1edfc;
  border-radius: 12px;
  background: linear-gradient(120deg, #f3f9ff, #eaf4ff 75%, #f3f8ff);
  scroll-margin-top: 90px;
}

.home-ranking-intro { padding: 0 4px; margin-bottom: 14px; }
.home-page #home-ranking-title {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.4;
}
.home-ranking-intro p {
  margin: 4px 0 0;
  color: #6787bb;
  font-size: 13px;
  line-height: 1.7;
}
.home-page .home-model-switcher {
  position: relative;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  margin: 0 0 10px;
  overflow: visible;
}
.home-model-tabs {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 6px;
  padding: 4px 2px 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-behavior: auto;
}
.home-model-tabs::-webkit-scrollbar { display: none; }
.home-model-series-group {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  border: 1px solid #dce9fb;
  border-radius: 10px;
  background: #f9fcffcc;
}
.home-model-series-label {
  padding: 0 6px;
  color: #5073a7;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}
.home-model-series-models {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
}
.home-page .home-model-tab,
.home-model-more > summary {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d9e6fb;
  border-radius: 999px;
  background: #ffffffed;
  color: #526e9b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.home-page .home-model-tab { max-width: 240px; }
.home-model-series-group .home-model-tab {
  border-color: #e2ecfb;
  background: #fff;
}
.home-model-tab > span { overflow: hidden; text-overflow: ellipsis; }
.home-page .home-model-tab.active {
  border-color: #0877ef;
  color: #fff;
  background: linear-gradient(110deg, #008cff, #0867ef);
  box-shadow: 0 3px 9px #1672e926;
}
.home-page .home-model-tab:focus-visible,
.home-model-more > summary:focus-visible,
.home-model-menu-link:focus-visible {
  outline: 2px solid var(--home-blue);
  outline-offset: 2px;
}
.home-model-more { flex: 0 0 auto; }
.home-model-more > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  list-style: none;
  cursor: pointer;
  color: #3567b1;
}
.home-model-more > summary::-webkit-details-marker { display: none; }
.home-model-more > summary svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.home-model-more[open] > summary { border-color: #8ebaff; background: #fff; }
.home-model-more[open] > summary svg { transform: rotate(180deg); }
.home-model-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  width: min(360px, 100%);
  padding: 12px;
  border: 1px solid #cddffa;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px #24518a26;
}
.home-model-menu[data-side="above"] { top: auto; bottom: calc(100% + 4px); }
.home-model-menu-search { margin-bottom: 8px; }
.home-model-menu-search label { display: block; margin-bottom: 6px; font-size: 12px; color: #426698; }
.home-model-menu-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8e5f9;
  border-radius: 6px;
  background: #f8fbff;
  color: #31598c;
  font-size: 13px;
}
.home-model-menu-search input:focus { outline: 2px solid #a8ccff; outline-offset: 1px; }
.home-model-menu-list {
  display: grid;
  gap: 3px;
  max-height: var(--home-model-menu-height, 276px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px;
}
.home-model-menu-series {
  display: grid;
  gap: 3px;
  padding-top: 5px;
}
.home-model-menu-series:first-of-type { padding-top: 0; }
.home-model-menu-series-label {
  margin: 0;
  padding: 2px 8px 3px;
  color: #5073a7;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}
.home-model-menu-series[hidden] { display: none; }
.home-model-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  border-radius: 6px;
  color: #42638f;
  font-size: 13px;
}
.home-model-menu-link > span { min-width: 0; overflow-wrap: anywhere; }
.home-model-menu-link strong { display: block; font-weight: 600; }
.home-model-menu-link small { display: block; margin-top: 2px; color: #526e9b; font-size: 12px; }
.home-model-menu-link:hover,
.home-model-menu-link.active { background: #edf5ff; color: #1264db; }
.home-model-menu-link.active::after { content: "✓"; flex: 0 0 auto; margin-left: auto; font-weight: 700; }
.home-model-menu-link[hidden] { display: none; }
.home-menu-logo { flex: 0 0 26px; width: 26px; height: 26px; padding: 2px; }
.home-model-menu-empty { margin: 12px 4px; color: #526e9b; font-size: 13px; }
.home-ranking-body { padding: 16px 12px 12px; border: 1px solid #e5eefb; border-radius: 9px; background: #fff; }
.home-page .home-ranking-selection { align-items: center; flex-wrap: wrap; margin-bottom: 14px; gap: 12px; }
.home-ranking-selection h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: #0849c7;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.4;
}
.home-ranking-selection h3 > span { min-width: 0; overflow-wrap: anywhere; }
.home-ranking-selection .text-link { flex: 0 0 auto; font-size: 12px; }
.home-page .home-ranking-tools { justify-content: flex-end; gap: 8px; margin: 0 0 0 auto; max-width: 100%; }
.home-ranking-all,
.home-ranking-dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #d7e4f6;
  border-radius: 999px;
  background: #fff;
  color: #42638f;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.home-ranking-dropdown { position: relative; }
.home-ranking-dropdown > summary { list-style: none; }
.home-ranking-dropdown > summary::-webkit-details-marker { display: none; }
.home-ranking-dropdown > summary::after { content: "⌄"; margin-left: 3px; }
.home-ranking-dropdown[open] > summary,
.home-ranking-all:hover { border-color: #8db8f4; color: #1264db; background: #f6faff; }
.home-ranking-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 160px;
  padding: 5px;
  border: 1px solid #d7e4f6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #244d841f;
}
.home-ranking-dropdown:not([open]) > .home-ranking-dropdown-menu { display: none; }
.home-ranking-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  color: #42638f;
  font-size: 12px;
}
.home-ranking-dropdown-menu a:hover,
.home-ranking-dropdown-menu a.active { background: #edf5ff; color: #1264db; }
.home-ranking-dropdown-menu a.active::after { content: "✓"; margin-left: 12px; }
.home-ranking-dropdown a:focus-visible,
.home-ranking-dropdown > summary:focus-visible,
.home-ranking-all:focus-visible { outline: 2px solid #1264db; outline-offset: 2px; }
@media (max-width: 720px) {
  .home-page .home-ranking-tools { justify-content: flex-start; gap: 6px; margin: 0; }
  .home-ranking-all, .home-ranking-dropdown > summary { min-height: 44px; padding-inline: 9px; }
  .home-ranking-dropdown-menu { right: auto; left: 0; min-width: 150px; }
  .home-ranking-dropdown-menu a { min-height: 44px; }
}
.home-ranking-model-logo { flex: 0 0 26px; width: 26px; height: 26px; padding: 0; }
.home-ranking-section { position: relative; }
.home-ranking-feedback {
  position: absolute;
  z-index: 21;
  top: 8px;
  right: 12px;
  max-width: calc(100% - 24px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--home-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 12px #24518a14;
  color: #426698;
  font-size: 12px;
}
.home-ranking-feedback[hidden],
#home-ranking-retry[hidden] { display: none; }
.home-ranking-feedback[data-error="true"] { color: #a33d3d; }
#home-ranking-retry {
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--home-blue);
  background: var(--home-blue-soft);
  cursor: pointer;
}
.home-ranking-section[aria-busy="true"] .ranking-table-wrap { opacity: .55; }

/* Keep the shared ranking table's warm palette out of the homepage only.
   Local tokens also cover its existing mobile card layout. */
.home-page .home-ranking-section .ranking-table-wrap {
  --surface: var(--home-surface);
  --line: var(--home-line);
  --muted: #637fa5;
  color: #365d8d;
  border-color: var(--home-line);
  border-radius: 12px;
  background: #fbfdff;
  box-shadow: 0 8px 24px rgba(45, 103, 177, .06);
}
.home-page .home-ranking-section .ranking-table {
  color: #365d8d;
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
}
.home-page .home-ranking-section .ranking-table th {
  padding: 13px 18px;
  border-bottom: 1px solid #d9e9fb;
  background: linear-gradient(180deg, #f6faff, #edf5ff);
  color: #4e709d;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
}
.home-page .home-ranking-section .ranking-table th:nth-child(1) { width: 22%; }
.home-page .home-ranking-section .ranking-table th:nth-child(2) { width: 13%; }
.home-page .home-ranking-section .ranking-table th:nth-child(3) { width: 14%; }
.home-page .home-ranking-section .ranking-table th:nth-child(4) { width: 12%; }
.home-page .home-ranking-section .ranking-table th:nth-child(5) { width: 12%; }
.home-page .home-ranking-section .ranking-table th:nth-child(6) { width: 11%; }
.home-page .home-ranking-section .ranking-table th:nth-child(7) { width: 16%; }
.home-page .home-ranking-section .ranking-table td {
  padding: 7px 18px;
  border-top-color: #e5effb;
}
.home-page .home-ranking-section .ranking-table tbody tr:first-child td { border-top: 0; }
.home-page .home-ranking-section .ranking-table tbody tr:hover {
  background: #f3f8ff;
}
.home-page .home-ranking-section .ranking-table td strong,
.home-page .home-ranking-section .station-name {
  color: var(--home-blue);
}
.home-page .home-ranking-section .station-name:hover {
  color: var(--home-blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-page .home-ranking-section .station-name:focus-visible {
  outline: 2px solid var(--home-blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.home-page .home-ranking-section .rank-number {
  color: #5e7fac;
  font-family: inherit;
  font-weight: 600;
}
.home-page .home-ranking-section .ranking-table td:nth-child(3) strong {
  color: #1264db;
  font-size: 16px;
}
.home-page .home-ranking-section .ranking-table td:nth-child(4) {
  color: #237c69;
  font-weight: 650;
}
.home-page .home-ranking-section .ranking-table td:nth-child(5),
.home-page .home-ranking-section .ranking-table td:nth-child(6) {
  color: #57779f;
}
.home-page .home-ranking-section .ranking-response-online,
.home-page .home-ranking-section .ranking-status-online { color: #0a9b72; }
.home-page .home-ranking-section .ranking-response-degraded,
.home-page .home-ranking-section .ranking-status-degraded { color: #c47a13; }
.home-page .home-ranking-section .ranking-response-offline,
.home-page .home-ranking-section .ranking-status-offline { color: #c04e5b; }
.home-page .home-ranking-section .ranking-response-stale,
.home-page .home-ranking-section .ranking-status-stale { color: #8b6f39; }
.home-page .home-ranking-section .ranking-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  white-space: nowrap;
}
.home-page .home-ranking-section .ranking-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}
.home-page .home-ranking-section .ranking-table td small {
  margin-top: 3px;
  color: #526e9b;
  font-size: 12px;
}
.home-page .home-ranking-section .empty-cell {
  min-height: 92px;
  padding: 30px 20px !important;
  background: #fbfdff;
  color: #637fa5;
  font-size: 13px;
  line-height: 1.85;
  text-align: center;
}
@media (max-width: 720px) {
  .home-page .section.home-ranking-section { width: calc(100% - 24px); padding: 14px 10px 10px; scroll-margin-top: 78px; }
  .home-page #home-ranking-title { font-size: 21px; letter-spacing: -.055em; }
  .home-ranking-intro { padding: 0 2px; margin-bottom: 10px; }
  .home-ranking-intro p { font-size: 12px; }
  .home-page .home-model-tab,
  .home-model-more > summary { min-height: 44px; padding-inline: 10px; }
  .home-model-menu-search input,
  .home-model-menu-link { min-height: 44px; }
  .home-model-tabs { align-items: stretch; }
  .home-model-series-group { padding: 4px; }
  .home-model-series-label { padding-inline: 5px; }
  .home-ranking-body { padding: 12px 10px 10px; }
  .home-page .home-ranking-selection { align-items: flex-start; flex-direction: column; gap: 6px; }
  .home-ranking-selection h3 { font-size: 19px; }
  .home-product-logos { gap: 26px 2%; }
  .home-page .home-ranking-section .ranking-table-wrap { background: transparent; }
  .home-page .home-ranking-section .ranking-table tr { padding-block: 6px; margin-bottom: 8px; }
  .home-page .home-ranking-section .ranking-table tr:last-child { margin-bottom: 0; }
  .home-page .home-ranking-section .ranking-table .empty-cell { padding: 24px 12px !important; }
  .home-page .home-ranking-section .ranking-table { table-layout: auto; }
  .home-page .home-ranking-section .ranking-table td {
    padding: 4px 0;
  }
  .home-page .home-ranking-section .ranking-table td:nth-child(3) strong {
    font-size: 15px;
  }
}

/* 宽屏基线：沿用公共内容轨道，但保留表单和文字列的可读宽度。 */
@media (min-width: 1440px) {
  body:has(.home-page) .home-banner {
    width: min(
      calc(100% - var(--public-content-gutter)),
      var(--public-content-max)
    );
  }

  body:has(.home-page) .home-banner-inner {
    padding-inline: 92px;
  }

  body:has(.home-page) .home-banner-art {
    right: 3%;
    width: 540px;
    height: 410px;
  }

  body:has(.home-page) .home-banner-features {
    padding-inline: 100px;
  }

  .home-check-card {
    grid-template-columns: minmax(0, 1fr) minmax(500px, 560px);
    gap: 44px;
    padding: 24px;
  }

  .home-check-intro {
    padding-inline: 28px;
  }

  .home-product-logos {
    max-width: 560px;
  }

  .home-check-section .home-check-panel {
    width: 100%;
    justify-self: end;
  }

  .home-page .home-ranking-section {
    padding-inline: 20px;
  }

  .home-ranking-body {
    padding-inline: 18px;
  }
}

/* Hourly history is homepage-only; no synthetic "live" animation. */
.home-page .home-ranking-section .ranking-table td:last-child { padding-inline: 10px; }
.uptime-history {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 3px;
  width: 81px;
  max-width: 100%;
  direction: ltr;
}
.home-page .uptime-hour {
  display: block;
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 22px;
  margin: 0;
  padding: 3px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.uptime-hour::after {
  content: "";
  display: block;
  width: 4px;
  max-width: 100%;
  height: 15px;
  margin-inline: auto;
  border-radius: 999px;
  background: var(--uptime-color);
  transition: transform .12s ease, filter .12s ease;
}
[data-status="online"].uptime-hour,
.uptime-legend [data-status="online"],
.uptime-tooltip[data-status="online"] { --uptime-color: #0bc981; }
[data-status="degraded"].uptime-hour,
.uptime-legend [data-status="degraded"],
.uptime-tooltip[data-status="degraded"] { --uptime-color: #efbc24; }
[data-status="offline"].uptime-hour,
.uptime-legend [data-status="offline"],
.uptime-tooltip[data-status="offline"] { --uptime-color: #eb626e; }
[data-status="unknown"].uptime-hour,
.uptime-legend [data-status="unknown"],
.uptime-tooltip[data-status="unknown"] { --uptime-color: #cbd5e1; }
[data-speed="fast"].uptime-hour { --uptime-color: #0bc981; }
[data-speed="normal"].uptime-hour { --uptime-color: #efbc24; }
[data-speed="slow"].uptime-hour { --uptime-color: #eb626e; }
.home-page .uptime-hour:hover::after,
.home-page .uptime-hour[aria-describedby]::after { filter: brightness(.9); transform: scaleY(1.15); }
.home-page .uptime-hour:focus-visible { outline: 2px solid #1264db; outline-offset: 1px; }
.uptime-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 12px 2px 0;
  color: #526e9b;
  font-size: 12px;
  line-height: 1.8;
}
.uptime-legend [data-status] { display: inline-flex; align-items: center; gap: 5px; }
.uptime-legend [data-status]::before {
  content: "";
  width: 5px;
  height: 11px;
  border-radius: 3px;
  background: var(--uptime-color);
}
.uptime-tooltip {
  position: fixed;
  z-index: 1200;
  box-sizing: border-box;
  display: grid;
  gap: 5px;
  width: max-content;
  padding: 12px 14px;
  border: 1px solid #d9e9fb;
  border-radius: 10px;
  background: #fff;
  color: #42658e;
  box-shadow: 0 8px 28px #244d8426;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  pointer-events: auto;
  overflow-wrap: anywhere;
}
.uptime-tooltip[hidden] { display: none; }
.uptime-tooltip strong { display: flex; align-items: center; gap: 7px; color: #244c7c; font-size: 13px; }
.uptime-tooltip strong::before {
  content: "";
  width: 7px;
  height: 12px;
  border-radius: 4px;
  background: var(--uptime-color);
}
@media (max-width: 720px) {
  .home-page .home-ranking-section .ranking-table td:last-child { padding-inline: 0; align-items: center; }
  .uptime-legend > span:first-child { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .uptime-hour::after { transition: none; }
}

/* 阶段 G：首页宣传能力条与公共页脚的蓝白主题统一。 */
.home-page ~ .home-capability-strip,
body:has(.home-page) .home-capability-strip {
  border-top-color: #dcecff;
  border-bottom-color: #dcecff;
  background: linear-gradient(90deg, #f8fbff, #eef7ff 52%, #f8fbff);
}
body:has(.home-page) .home-capability-item {
  border-left-color: #d8e8fb;
}
.home-page .home-capability-note {
  margin-block: 16px 0;
  padding-inline: 24px;
  color: #526e9b;
  font-size: 13px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .home-page .home-capability-note {
    text-align: center;
  }
}
body:has(.home-page) .site-footer {
  border-top-color: #dcecff;
  background: #f5f9ff;
}
body:has(.home-page) .footer-grid > div > a {
  color: #4b6d9b;
}
body:has(.home-page) .footer-grid > div > a:hover,
body:has(.home-page) .footer-grid > div > a:focus-visible {
  color: var(--home-blue);
}
body:has(.home-page) .footer-grid p {
  color: #526e9b;
}
body:has(.home-page) .footer-bottom {
  border-top-color: #dbe9fa;
  color: #526e9b;
}

.home-page .station-card small {
  color: #526e9b;
  font-size: 12px;
}

/* 阶段 C：仅在首页覆盖公共导航，避免影响后台及其他页面。 */
.home-model-controls {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.home-model-picker { min-width: 0; }
.home-check-section .home-check-panel { overflow: visible; }
.home-check-section .checker-head { border-radius: 8px 8px 0 0; }
.home-check-section #check-form { border-radius: 0 0 8px 8px; }
.home-model-input,
.home-check-section #fetch-models {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid #d9e7fb;
  border-radius: 8px;
  background: #fff;
  color: #31598c;
  font-size: 13px;
}
.home-model-input { min-width: 0; gap: 4px; padding: 4px 5px 4px 8px; }
.home-model-input:focus-within {
  border-color: #2877ed;
  box-shadow: 0 0 0 3px rgba(40, 119, 237, 0.12);
}
.home-check-section #model-picker-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #527497;
  cursor: pointer;
}
.home-check-section #model-picker-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.home-model-input #model-chips {
  flex: 0 1 auto;
  max-width: 55%;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
}
.home-model-input #model-chips::-webkit-scrollbar { display: none; }
.home-model-input #model-chips > span {
  flex: 0 0 auto;
  max-width: 150px;
  height: 28px;
  padding: 2px 4px 2px 7px;
  border-radius: 5px;
  background: #edf4ff;
  border-color: #d5e4fc;
  font-size: 12px;
}
.home-model-input #model-chips button { flex: 0 0 20px; }
.home-check-section #model-search {
  flex: 1 1 80px;
  width: 0;
  min-width: 0;
  height: 32px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  color: #31598c;
  font-size: 13px;
}
.home-check-section #model-search[hidden] { display: none; }
.home-model-input[data-full="true"] #model-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 1;
  max-width: none;
  overflow: visible;
  gap: 4px;
}
.home-model-input[data-full="true"] #model-chips > span {
  min-width: 0;
  max-width: none;
  gap: 3px;
  padding-inline: 4px;
}
.home-model-input[data-full="true"] #model-chips > span > span { min-width: 0; flex: 1; }
.home-model-input[data-full="true"] #model-chips button { flex-basis: 16px; width: 16px; }
.home-check-section #fetch-models {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  gap: 6px;
  border-color: #1472ee;
  color: #1264db;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  min-width: 102px;
}
#fetch-models svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#fetch-models[aria-busy="true"] svg {
  animation: home-model-fetch-spin .85s linear infinite;
  transform-origin: center;
  transform-box: view-box;
}
@keyframes home-model-fetch-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  #fetch-models[aria-busy="true"] svg { animation: none; }
}
.home-check-section #fetch-models:hover { background: #eff6ff; }
.home-check-section #fetch-models:disabled { opacity: .6; cursor: wait; }
#model-picker-panel {
  position: absolute;
  z-index: 30;
  inset: calc(100% + 6px) 0 auto;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #c9dffc;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 10px 28px #1b4d9426;
}
#model-picker-panel[data-side="above"] { top: auto; bottom: calc(100% + 6px); }
#model-options { display: grid; gap: 2px; }
#model-options [role="option"] {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 9px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #31598c;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
#model-options [role="option"] > span:last-child { min-width: 0; overflow-wrap: anywhere; }
#model-options [role="option"]:hover,
#model-options [data-active="true"],
#model-options [aria-selected="true"] { background: #edf4ff; color: #1264db; }
#model-options [aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.home-model-option-mark {
  flex: 0 0 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid #9eb6d6;
  border-radius: 50%;
  font-size: 12px;
  line-height: 14px;
  text-align: center;
}
#model-options[aria-multiselectable="true"] .home-model-option-mark { border-radius: 3px; }
#model-options [aria-selected="true"] .home-model-option-mark { background: #1472ee; border-color: #1472ee; color: #fff; }
#model-picker-empty { padding: 8px; }
#model-fetch-status, #model-picker-empty { margin: 0; font-size: 12px; line-height: 1.6; color: #527497; overflow-wrap: anywhere; }
#model-fetch-status { min-height: 20px; }
#model-fetch-status:empty { display: none; }
#model-fetch-status[data-error="true"] { color: #b53535; }
.home-check-section #model-picker-toggle:focus-visible,
.home-check-section #fetch-models:focus-visible { outline: 3px solid #a8ccff; outline-offset: 2px; }
@media (max-width: 720px) {
  .home-model-input {
    height: 46px;
    padding-block: 0;
    padding-right: 1px;
  }
  .home-check-section #model-picker-toggle {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 7px;
  }
  .home-check-section #model-search { height: 44px; }
  #model-options [role="option"] { min-height: 44px; }
}
@media (max-width: 430px) {
  .home-model-controls { gap: 6px; }
  .home-check-section #fetch-models { padding-inline: 8px; min-width: 94px; }
  .home-model-input #model-chips { max-width: 45%; }
  .home-model-input #model-chips > span { max-width: 84px; }
}

/*
 * Stage 3: homepage open-white composition.
 *
 * This layer changes only the homepage presentation. The existing template
 * structure, data attributes, form controls and business states stay intact.
 */
.home-page {
  --home-blue: #1264db;
  --home-blue-deep: #0844b7;
  --home-blue-soft: #f2f7ff;
  --home-text: #173d72;
  --home-muted: #5a708d;
  --home-line: #dfe9f4;
  --home-surface: #fff;
  --home-page-bg: #fff;
  background: var(--home-page-bg);
}

.home-page .home-check-section {
  margin-top: 44px;
}

.home-check-card {
  gap: clamp(34px, 4vw, 64px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-check-intro {
  padding: 22px 0 8px;
}

.home-check-intro::before {
  opacity: .42;
}

.home-page #home-check-title {
  color: var(--home-blue-deep);
}

.home-check-lead {
  color: var(--home-muted);
}

.home-page .home-check-section .home-check-panel {
  border: 1px solid #dfe9f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(35, 87, 145, .1);
}

.home-check-section .checker-head {
  background: #fff;
}

.home-page .home-check-section #check-form {
  background: #fff;
}

.home-page .home-model-switcher {
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid #d7e4f6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 87, 145, .06);
}

.home-page .home-model-tabs {
  padding: 0 2px 2px;
}

.home-page .section.home-ranking-section {
  margin-top: 0;
  margin-bottom: 0;
  padding: 76px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-ranking-intro {
  padding: 0;
  margin-bottom: 20px;
}

.home-ranking-intro p {
  color: var(--home-muted);
}

.home-model-series-group {
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.home-model-series-label {
  padding-inline: 4px;
  color: var(--home-muted);
}

.home-page .home-model-tab,
.home-model-more > summary {
  border-color: #dfe9f4;
  background: #fff;
}

.home-ranking-body {
  padding: 5px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-page .home-ranking-section .ranking-table-wrap {
  border: 1px solid #dfe9f4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(35, 87, 145, .06);
}

.home-page .home-ranking-section .ranking-table th {
  background: #f8fbff;
}

.home-page .home-ranking-section .ranking-table tbody tr:hover {
  background: #fbfdff;
}

.home-page .section-tint {
  border-block: 0;
  background: transparent;
  padding-block: 76px;
}

.home-page .section-tint .section-heading {
  margin-bottom: 24px;
}

.home-page .station-card {
  border-color: #dfe9f4;
  background: #fff;
  box-shadow: 0 8px 22px rgba(35, 87, 145, .07);
}

.home-page .mc-ad {
  border-color: #dfe9f4;
  background: #fff;
  box-shadow: none;
}

body:has(.home-page) .home-capability-strip {
  border-top-color: #e4ecf5;
  border-bottom-color: #e4ecf5;
  background: #fff;
}

body:has(.home-page) .home-capability-item {
  border-left-color: #e4ecf5;
}

.home-page .editorial-home {
  padding-block: 76px;
  border: 0;
  background: transparent;
}

.home-page .editorial-news-strip {
  border-top-color: #e4ecf5;
}

body:has(.home-page) .site-footer {
  border-top-color: #e4ecf5;
  background: #fff;
}

@media (max-width: 900px) {
  .home-page .home-check-section {
    margin-top: 36px;
  }

  .home-page .home-ranking-section,
  .home-page .section-tint,
  .home-page .editorial-home {
    padding-block: 58px;
  }
}

@media (max-width: 720px) {
  .home-page .home-check-section {
    margin-top: 28px;
  }

  .home-check-intro {
    padding: 10px 4px 0;
  }

  .home-page .home-ranking-section,
  .home-page .section-tint,
  .home-page .editorial-home {
    padding-block: 48px;
  }

  .home-page .home-ranking-body {
    padding-top: 14px;
  }
}

.home-banner {
  position: relative;
  isolation: isolate;
  margin-top: 0;
  border-radius: 0 0 10px 10px;
}

.home-banner::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 62% 54%, rgba(50, 157, 255, 0.13), transparent 28%),
    radial-gradient(circle at 15% 72%, rgba(255, 196, 132, 0.12), transparent 30%);
}

.home-banner-inner {
  min-height: 430px;
  padding-top: 54px;
  padding-bottom: 36px;
}

.home-banner-copy h1 {
  color: #073bd0;
  font-size: clamp(54px, 5vw, 78px);
  letter-spacing: -0.1em;
}

.home-banner-copy p {
  color: #6386c8;
  font-weight: 600;
}

.home-banner-art {
  top: 10px;
  right: 1%;
  width: min(48%, 540px);
  height: 390px;
  opacity: 0.98;
  background-size: contain;
}

.home-banner-features {
  position: relative;
  z-index: 2;
  padding-top: 2px;
}

.home-banner-feature {
  color: #0b48c9;
}

.banner-feature-icon {
  border-color: #d3e7ff;
  color: #1174ee;
  box-shadow: 0 4px 12px rgba(50, 139, 239, 0.08);
}

@media (max-width: 720px) {
  .home-banner {
    border-radius: 0 0 8px 8px;
  }

  .home-banner-inner {
    min-height: 460px;
    padding-top: 36px;
  }

  .home-banner-copy h1 {
    max-width: 100%;
    font-size: 42px;
  }

  .home-banner-art {
    top: 180px;
    right: -36px;
    width: 420px;
    height: 300px;
    opacity: 0.28;
  }

  .home-page .hero,
  .home-page .section {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .home-page .home-model-switcher {
    margin-bottom: 4px;
    padding: 6px;
    border-radius: 12px;
  }

  .home-page .home-ranking-body {
    padding-top: 4px;
  }
}
