:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --surface: #ffffff;
  --surface-soft: #eef4ef;
  --ink: #1d2420;
  --muted: #68736c;
  --line: #dfe5df;
  --green: #257a4b;
  --green-dark: #135c35;
  --blue: #346fb7;
  --orange: #d76b24;
  --shadow: 0 18px 50px rgba(26, 41, 32, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 122, 75, 0.11), transparent 26rem),
    linear-gradient(180deg, #fbfcf8 0%, var(--bg) 48%, #ffffff 100%);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(251, 252, 248, 0.82);
  border-bottom: 1px solid rgba(223, 229, 223, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
  color: #fff;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(19, 92, 53, 0.18);
}

.brand-mark::before {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 8px;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.82);
  transform: rotate(45deg);
  transform-origin: right center;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.nav-link,
.ghost-btn,
.pill,
.icon-btn {
  border: 0;
  cursor: pointer;
}

.nav-link {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--surface-soft);
  color: var(--green-dark);
}

.hero {
  min-height: 58vh;
  display: grid;
  place-items: center;
  padding: clamp(56px, 10vw, 110px) 18px 38px;
}

.hero-inner {
  width: min(820px, 100%);
  text-align: center;
}

.notice,
.eyebrow,
.mini-note {
  margin: 0;
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 18px 0 12px;
  font-size: clamp(56px, 11vw, 118px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.tagline {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
}

.search-box,
.compact-search,
.code-row {
  display: flex;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-box {
  height: 64px;
}

.search-box input,
.compact-search input,
.code-row input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
}

.search-box input {
  padding: 0 22px;
  font-size: 18px;
}

.search-box button,
.compact-search button,
.code-row button,
.plain-form button,
.link-box button {
  border: 0;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.search-box button {
  width: 118px;
  border-radius: 0 8px 8px 0;
  font-size: 18px;
}

.search-box button:hover,
.compact-search button:hover,
.code-row button:hover,
.plain-form button:hover,
.link-box button:hover {
  background: var(--green-dark);
}

.cloud-switch,
.promo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.pill {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.pill.active {
  border-color: rgba(37, 122, 75, 0.32);
  background: var(--surface-soft);
  color: var(--green-dark);
}

.promo-strip a,
.promo-strip button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  cursor: pointer;
}

.ad-slot,
.campaign-strip {
  width: 100%;
  margin-top: 16px;
}

.ad-card,
.campaign-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  box-shadow: 0 12px 32px rgba(26, 41, 32, 0.06);
}

.ad-card span,
.campaign-card span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff3e8;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

.ad-card strong,
.campaign-card h3 {
  margin: 0;
  color: var(--ink);
}

.ad-card small,
.campaign-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.campaign-card a {
  width: max-content;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.provider-warning {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #f0c89d;
  border-radius: 8px;
  background: #fff3e8;
  color: #8a3f08;
  font-weight: 700;
}

.content-shell,
.split-band {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto 34px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.hot-grid,
.results-grid,
.site-grid,
.business-board {
  display: grid;
  gap: 14px;
}

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

.hot-panel,
.resource-card,
.business-board > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(26, 41, 32, 0.06);
}

.hot-panel {
  padding: 18px;
}

.hot-panel h3 {
  color: var(--green-dark);
}

.hot-panel ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.hot-panel button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.hot-panel button:hover {
  color: var(--blue);
}

.split-band {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 34px;
  background: #18231d;
  color: #fff;
  border-radius: 8px;
}

.split-band p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.8;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-row div {
  min-height: 112px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.metric-row strong {
  display: block;
  margin-bottom: 8px;
  font-size: 34px;
}

.metric-row span {
  color: rgba(255, 255, 255, 0.74);
}

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

.site-grid a,
.site-grid button {
  display: grid;
  min-height: 86px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.result-toolbar {
  display: grid;
  grid-template-columns: 1fr 150px 170px;
  gap: 12px;
  margin-bottom: 18px;
}

.compact-search {
  height: 46px;
  box-shadow: none;
}

.compact-search input {
  padding: 0 14px;
}

.compact-search button,
.code-row button {
  min-width: 82px;
  border-radius: 0 8px 8px 0;
}

.result-toolbar select,
.plain-form input,
.plain-form select,
.plain-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: 0;
}

.result-toolbar select {
  padding: 0 12px;
}

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

.resource-card {
  padding: 18px;
}

.resource-card p {
  color: var(--muted);
  line-height: 1.7;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.card-meta span,
.detail-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--green-dark);
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.card-actions button,
.ghost-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
}

.card-actions button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.panel-view {
  padding-top: 24px;
}

.plain-form {
  display: grid;
  gap: 16px;
  max-width: 720px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.plain-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.plain-form input,
.plain-form select,
.plain-form textarea {
  padding: 12px 13px;
}

.plain-form button {
  width: max-content;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 8px;
}

.order-form {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.form-msg {
  min-height: 24px;
  margin: 0;
  color: var(--green-dark);
}

.business-board,
.plan-grid {
  grid-template-columns: repeat(3, 1fr);
}

.business-board > div,
.plan-card {
  padding: 20px;
}

.plan-grid {
  display: grid;
  gap: 14px;
}

.plan-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(26, 41, 32, 0.06);
}

.plan-card strong {
  font-size: 32px;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.plan-card button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.plan-card button:hover {
  background: var(--green-dark);
}

.business-board p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.business-contact-btn {
  width: max-content;
  min-height: 38px;
  margin-top: 14px;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.detail-dialog {
  width: min(720px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 24px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(17, 24, 20, 0.48);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 24px;
}

.detail-desc {
  color: var(--muted);
  line-height: 1.8;
}

.activation-wall,
.link-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.activation-wall p {
  margin-bottom: 12px;
  color: var(--green-dark);
  font-weight: 700;
}

.code-row {
  height: 44px;
  box-shadow: none;
}

.code-row input {
  padding: 0 12px;
}

.link-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow-wrap: anywhere;
}

.link-box button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
}

.site-footer {
  width: min(1100px, calc(100% - 36px));
  margin: 48px auto 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.api-error {
  padding: 12px 18px;
  background: #fff3e8;
  color: #8a3f08;
  border-bottom: 1px solid #f0c89d;
  font-weight: 700;
}

@media (max-width: 820px) {
  .site-header {
    align-items: start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .search-box {
    height: auto;
    flex-direction: column;
  }

  .search-box input {
    min-height: 56px;
  }

  .search-box button {
    width: 100%;
    min-height: 52px;
    border-radius: 0 0 8px 8px;
  }

  .hot-grid,
  .results-grid,
  .site-grid,
  .business-board,
  .plan-grid,
  .campaign-strip,
  .split-band,
  .metric-row,
  .result-toolbar {
    grid-template-columns: 1fr;
  }

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