:root {
  --bg: #f5fafb;
  --surface: #ffffff;
  --surface-alt: #eef7f8;
  --text: #06363d;
  --text-muted: #567b80;
  --brand: #1fa6b3;
  --brand-dark: #008c99;
  --brand-deep: #004047;
  --line: #d4e6e8;
  --warn: #ffc845;
  --warn-deep: #f3b92d;
  --danger: #c23b32;
  --radius: 14px;
  --shadow: 0 18px 34px rgba(0, 64, 71, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: radial-gradient(circle at 90% -20%, #d7f4f8 0, transparent 36%),
    radial-gradient(circle at 10% -40%, #e3fbfc 0, transparent 44%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin-inline: auto;
}

.announce {
  background: linear-gradient(90deg, var(--brand-deep), #045965);
  color: #dbfbff;
  font-size: 12px;
}

.announce .container {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand img {
  width: 30px;
  height: 30px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 3px;
}

.menu-item {
  position: relative;
}

.menu-item > a,
.menu-item > button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 12px;
  min-height: 44px;
  border-radius: 9px;
  cursor: pointer;
}

.menu-item > a:hover,
.menu-item > button:hover,
.menu-item > a.active {
  background: #e7f6f8;
  color: var(--brand-deep);
}

.mega {
  position: absolute;
  left: 0;
  top: 46px;
  width: 430px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
  display: none;
}

.menu-item:hover .mega,
.menu-item:focus-within .mega {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mega a {
  border: 1px solid #e2efef;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.mega strong {
  display: block;
  color: var(--brand-deep);
  font-size: 13px;
  margin-bottom: 3px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-main {
  background: var(--warn);
  color: #3e3100;
  box-shadow: 0 12px 24px rgba(255, 200, 69, 0.34);
}

.btn-main:hover {
  background: var(--warn-deep);
}

.btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 20px rgba(31, 166, 179, 0.3);
}

.btn-ghost {
  background: #e9f8fa;
  color: var(--brand-deep);
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.hero {
  padding: 42px 0 22px;
}

.hero-wrap {
  border-radius: 22px;
  border: 1px solid #d5ebee;
  background: linear-gradient(125deg, #ffffff 0, #f2fafb 62%, #e7f7f9 100%);
  box-shadow: var(--shadow);
  padding: 34px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(31px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: 0.2px;
}

.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
}

.hero-kpis {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-kpis .k {
  border: 1px solid #d7eaed;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
}

.hero-kpis .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-dark);
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-chips span {
  border: 1px solid #c2dfe4;
  background: #f3fcfd;
  border-radius: 999px;
  color: #265e66;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
}

.status-mini {
  border: 1px dashed #c5e0e4;
  border-radius: 12px;
  background: #f4fcfd;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.status-mini div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.status-mini b {
  color: #1e525a;
}

.status-mini span {
  color: #0d525a;
  font-weight: 700;
}

.hero-illu {
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dbedf0;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  border: 1px solid #b8dde3;
  background: #effbfc;
  padding: 6px 10px;
  border-radius: 999px;
}

.trust-strip {
  padding: 8px 0 14px;
}

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

.logo-pill {
  border: 1px dashed #c6e3e8;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #386b72;
  min-height: 46px;
  display: grid;
  place-items: center;
}

.section {
  padding: 18px 0;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.section .lead {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.content-block {
  margin-top: 10px;
  border: 1px solid #d4e8eb;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

.content-block p {
  margin: 0 0 10px;
  color: var(--text-muted);
  line-height: 1.8;
}

.coverage-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coverage-list span {
  border: 1px solid #c9e2e6;
  border-radius: 999px;
  background: #f4fcfd;
  color: #2d646b;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.review-meta {
  margin-top: 8px !important;
  color: #6b8d91 !important;
  font-size: 12px !important;
}

.status-board {
  margin-top: 12px;
  border: 1px solid #cfe6e9;
  border-radius: 14px;
  background: linear-gradient(120deg, #f1fbfc, #fff);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status-board div {
  border: 1px solid #d5eaed;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.status-board span {
  font-size: 12px;
  color: #557b80;
}

.status-board strong {
  font-size: 18px;
  color: var(--brand-deep);
}

.grid-2,
.grid-3,
.grid-4,
.pricing-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 8px 0;
  font-size: 20px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 14px;
}

.price-card {
  position: relative;
  overflow: hidden;
}

.price-card .price {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-deep);
}

.price-card ul {
  margin: 0;
  padding-left: 17px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.price-card .tag {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--warn), #ffe396);
  color: #5f3f00;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-bottom-left-radius: 12px;
}

.calculator {
  border: 1px solid #cae6ea;
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(120deg, #f0fafb, #fff);
}

.form-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

label {
  display: block;
  font-size: 12px;
  color: #466d73;
  margin-bottom: 6px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #c9e0e3;
  background: #fff;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 166, 179, 0.16);
}

.calc-result {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px dashed #b9dce1;
  border-radius: 12px;
  padding: 12px;
}

.calc-result .v {
  font-size: 30px;
  font-weight: 800;
  color: var(--brand-deep);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

table.compare th,
table.compare td {
  font-size: 14px;
  padding: 12px;
  border-bottom: 1px solid #e1edef;
  text-align: left;
}

table.compare th {
  background: #ebf6f8;
  color: var(--brand-deep);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: #124f56;
}

.faq-a {
  display: none;
  padding: 0 14px 13px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 14px;
}

.faq-item.open .faq-a {
  display: block;
}

.cta {
  margin-top: 16px;
  border: 1px solid #cae7eb;
  border-radius: 16px;
  background: linear-gradient(125deg, #e9fbfd, #fdfdf7);
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.auth-card {
  max-width: 470px;
  margin: 30px auto;
}

.dash-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 12px;
  margin-top: 16px;
}

.side-nav {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow);
}

.side-nav a {
  display: block;
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 14px;
  color: #285d64;
  font-weight: 600;
}

.side-nav a:hover,
.side-nav a.active {
  background: #e9f8fa;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.kpi {
  border: 1px solid #d5e8ea;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.kpi .k {
  color: #50757b;
  font-size: 12px;
}

.kpi .v {
  margin-top: 8px;
  font-weight: 800;
  font-size: 24px;
  color: var(--brand-deep);
}

.node {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin-top: 12px;
}

.qr {
  width: 200px;
  height: 200px;
  margin-inline: auto;
  border-radius: 10px;
  border: 1px solid #d1e6e9;
  box-shadow: inset 0 0 0 14px #fff;
  background:
    linear-gradient(90deg, #083f46 12px, transparent 12px) 0 0/24px 24px,
    linear-gradient(#083f46 12px, transparent 12px) 0 0/24px 24px,
    #fff;
}

.footer {
  margin-top: 30px;
  background: #073b42;
  color: #d4f2f6;
  padding: 28px 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
}

.footer h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.footer p,
.footer a,
.footer li {
  color: #a7d4db;
  font-size: 13px;
  line-height: 1.75;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  margin-top: 12px;
  border-top: 1px solid rgba(181, 222, 228, 0.2);
  padding-top: 10px;
  font-size: 12px;
  color: #9dcad1;
}

.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .7s ease forwards;
}

.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }

@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

@media (max-width: 1050px) {
  .topbar-inner {
    grid-template-columns: auto auto;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .menu {
    grid-column: 1 / -1;
    display: none;
    flex-wrap: wrap;
    padding-bottom: 8px;
  }

  body.menu-open .menu {
    display: flex;
  }

  .top-actions {
    justify-self: end;
  }

  .hero-wrap,
  .grid-3,
  .grid-4,
  .pricing-grid,
  .status-board,
  .kpi-grid,
  .node,
  .footer-grid,
  .dash-grid,
  .logo-grid {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-kpis {
    grid-template-columns: 1fr;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .mega {
    position: static;
    width: auto;
    margin: 8px 0;
  }

  .menu-item:hover .mega,
  .menu-item:focus-within .mega {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* pricing page v2 layout */
.pricing-hero {
  border: 1px solid #cfe8eb;
  border-radius: 16px;
  background: linear-gradient(120deg, #eefafb, #fffdf7);
  padding: 20px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.pricing-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
}

.pricing-hero p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.quick-pills {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-pills a {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  border: 1px solid #bbdde2;
  background: #f3fcfd;
  border-radius: 999px;
  padding: 6px 10px;
}

.quick-pills a:hover {
  background: #e2f8fb;
}

.pricing-hero .right {
  display: grid;
  gap: 10px;
  align-content: center;
}

.info-list {
  border: 1px solid #d5e9ec;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.info-list div {
  font-size: 13px;
  color: #3b6c74;
  padding: 7px 0;
  border-bottom: 1px dashed #e1eff1;
}

.info-list div:last-child {
  border-bottom: 0;
}

.pricing-layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
  align-items: start;
}

.sticky-stack {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}

.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.sidebar-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.sidebar-card p,
.sidebar-card li {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.sidebar-card ul {
  margin: 0;
  padding-left: 18px;
}

.pricing-main {
  display: grid;
  gap: 12px;
}

.tier-group {
  border: 1px solid #d3e8eb;
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.tier-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tier-title h3 {
  margin: 0;
  font-size: 22px;
}

.tier-title p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.price-v2 {
  border: 1px solid #d8e8eb;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbfeff);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.price-v2.popular {
  border-color: #f4d372;
  background: linear-gradient(180deg, #fffef4, #ffffff);
  box-shadow: 0 10px 24px rgba(255, 200, 69, 0.25);
}

.price-v2 .name {
  font-weight: 700;
  font-size: 17px;
}

.price-v2 .fee {
  font-size: 34px;
  color: var(--brand-deep);
  font-weight: 800;
  line-height: 1;
}

.price-v2 .fee small {
  font-size: 13px;
  color: #4f7780;
}

.price-v2 ul {
  margin: 0;
  padding-left: 17px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.price-v2 .ops {
  display: flex;
  gap: 8px;
}

.price-v2 .ops .btn {
  width: 100%;
  text-align: center;
}

.tag-hot {
  display: inline-flex;
  width: fit-content;
  font-size: 12px;
  font-weight: 700;
  color: #6f4d00;
  background: #ffe59e;
  border-radius: 999px;
  padding: 5px 10px;
}

.note-strip {
  border-radius: 12px;
  border: 1px dashed #bfdde2;
  background: #f6fcfd;
  padding: 10px;
  color: #3c6d75;
  font-size: 13px;
}

@media (max-width: 1050px) {
  .pricing-hero,
  .pricing-layout,
  .tier-grid {
    grid-template-columns: 1fr;
  }

  .sticky-stack {
    position: static;
  }
}

/* --- layout fix: button overlap prevention --- */
.price-card {
  display: flex;
  flex-direction: column;
  min-height: 370px;
}

.price-card .price {
  margin-bottom: 4px;
}

.price-card ul {
  margin: 0 0 10px;
}

.price-card .btn {
  margin-top: auto;
  align-self: flex-start;
  min-width: 124px;
}

.tier-grid {
  align-items: stretch;
}

.price-v2 {
  display: flex;
  flex-direction: column;
  min-height: 385px;
}

.price-v2 .name {
  min-height: 46px;
}

.price-v2 ul {
  margin: 0 0 10px;
}

.price-v2 .ops {
  margin-top: auto;
  padding-top: 8px;
}

.price-v2 .ops .btn {
  min-height: 42px;
}

/* --- mobile optimization for all pages --- */
@media (max-width: 768px) {
  .container {
    width: min(1240px, calc(100% - 20px));
  }

  .announce .container {
    min-height: 42px;
    line-height: 1.45;
    text-align: center;
    padding: 0 6px;
  }

  .brand {
    font-size: 17px;
  }

  .topbar-inner {
    min-height: 70px;
    gap: 10px;
  }

  .top-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .top-actions .btn {
    width: 100%;
    text-align: center;
    padding: 12px 8px;
    font-size: 13px;
    min-height: 48px;
  }

  .menu-item > a,
  .menu-item > button,
  .btn {
    min-height: 48px;
  }

  .hero {
    padding: 20px 0 12px;
  }

  .hero-wrap {
    padding: 16px;
    border-radius: 16px;
  }

  .hero h1,
  .pricing-hero h1 {
    font-size: 28px;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .keyword-chips {
    gap: 6px;
  }

  .keyword-chips span,
  .coverage-list span {
    font-size: 11px;
    padding: 5px 8px;
  }

  .content-block {
    padding: 12px;
  }

  .section {
    padding: 14px 0;
  }

  .section h2 {
    font-size: 24px;
  }

  .card {
    padding: 14px;
  }

  .pricing-hero {
    padding: 14px;
    border-radius: 14px;
  }

  .tier-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-card,
  .price-v2 {
    min-height: unset;
  }

  .price-v2 .name {
    min-height: unset;
  }

  .price-v2 .ops .btn,
  .price-card .btn {
    width: 100%;
  }

  .kpi .v {
    font-size: 20px;
  }

  .auth-card {
    margin: 14px auto;
  }

  .faq-q {
    font-size: 14px;
    padding: 12px 12px;
    min-height: 48px;
  }

  .footer {
    margin-top: 22px;
    padding: 20px 0 24px;
  }
}

.exit-popup {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(360px, calc(100% - 24px));
  border: 1px solid #c9e2e7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(0, 64, 71, 0.16);
  padding: 14px;
  z-index: 120;
  display: none;
}

.exit-popup.show {
  display: block;
}

.exit-popup h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.exit-popup p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.exit-popup .ops {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.exit-popup .ops .btn {
  flex: 1;
  text-align: center;
}
