/* IDN 域名钱包 · 服务器 B 商户管理后台官网 */
:root {
  --bg: #f0f4f3;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --brand: #047857;
  --brand-dark: #065f46;
  --brand-light: #d1fae5;
  --accent: #0ea5e9;
  --warn: #b45309;
  --danger: #b91c1c;
  --header-h: 64px;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #f1f5f9;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* Promo */
.site-promo {
  background: linear-gradient(90deg, #064e3b, #047857 55%, #0d9488);
  color: #ecfdf5;
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.5rem 1rem;
  line-height: 1.45;
}
.site-promo__badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-right: 0.35rem;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}
.site-logo:hover { color: var(--brand-dark); text-decoration: none; }

.site-logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #047857, #0d9488);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.nav-item__link {
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-item__link:hover {
  color: var(--brand-dark);
  background: var(--brand-light);
  text-decoration: none;
}
.nav-item__link.is-active {
  color: var(--brand-dark);
  background: var(--brand-light);
  font-weight: 600;
}

main {
  min-height: calc(100vh - var(--header-h) - 120px);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header__lang {
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
}

.site-header__account {
  gap: 0.4rem;
  min-width: 0;
}
.site-header__account-icon {
  display: none;
  flex-shrink: 0;
}
.site-header__account-label {
  display: inline;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--brand);
  color: #fff;
}
.btn--primary:hover {
  background: var(--brand-dark);
  color: #fff;
}
.btn--ghost {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: #f8fafc; }

.site-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.site-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Home hero */
.hero-b {
  background: linear-gradient(160deg, #022c22 0%, #064e3b 45%, #0f766e 100%);
  color: #ecfdf5;
  padding: 3.5rem 1.25rem 4rem;
}

.hero-b__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero-b__badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero-b h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-b__lead {
  font-size: 1.125rem;
  color: #a7f3d0;
  margin: 0 0 1.25rem;
  max-width: 52ch;
}

.hero-b__sub {
  color: #d1fae5;
  max-width: 60ch;
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.hero-b__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-b .btn--primary {
  background: #fff;
  color: var(--brand-dark);
}
.hero-b .btn--primary:hover { background: #ecfdf5; }
.hero-b .btn--ghost {
  border-color: rgba(255,255,255,0.35);
  color: #ecfdf5;
  background: transparent;
}
.hero-b .btn--ghost:hover { background: rgba(255,255,255,0.08); }

/* Sections */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section--alt { background: #fff; }

.section__title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: var(--brand-dark);
}

.section__intro {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 60ch;
}

/* Architecture diagram */
.arch-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
  margin: 1.5rem 0;
}

.arch-node {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.arch-node--a { border-top: 3px solid var(--accent); }
.arch-node--b { border-top: 3px solid var(--brand); }

.arch-node h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.arch-node p { margin: 0; font-size: 0.875rem; color: var(--muted); }
.arch-node ul { margin: 0.75rem 0 0; padding-left: 1.1rem; font-size: 0.875rem; }

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  min-width: 80px;
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.feature-card__num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Forbidden list */
.forbidden-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.forbidden-box h3 {
  color: var(--danger);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.forbidden-box ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #7f1d1d;
  font-size: 0.9rem;
}

/* Inner pages */
.inner-page {
  padding-bottom: 2.5rem;
}

.inner-page__hero {
  background: linear-gradient(160deg, #022c22 0%, #064e3b 50%, #0f766e 100%);
  color: #ecfdf5;
  padding: 2.5rem 0 2rem;
  margin-bottom: -1.5rem;
}

.inner-page__hero .page-hero__badge {
  background: rgba(255,255,255,0.12);
  color: #ecfdf5;
  border: 1px solid rgba(255,255,255,0.2);
}

.inner-page__hero .page-hero h1 {
  color: #fff;
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.inner-page__hero .page-hero__intro {
  color: #a7f3d0;
  max-width: 65ch;
  font-size: 1rem;
  line-height: 1.6;
}

.page-hero__sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.page-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 2rem;
}

.page-panel--legal {
  padding: 2rem 2rem 2.5rem;
}

.page-hero {
  margin-bottom: 0;
}

.page-hero__badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.page-body {
  font-size: 0.975rem;
}

.content-section {
  margin-bottom: 0;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.content-section:first-child { padding-top: 0; }
.content-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.content-section__title {
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.content-section__title::before {
  content: "";
  width: 4px;
  height: 1.1em;
  background: var(--brand);
  border-radius: 2px;
  flex-shrink: 0;
}

.content-section__body p {
  margin: 0 0 0.75rem;
  color: var(--text);
}
.content-section__body p:last-child { margin-bottom: 0; }

.content-section__body ul,
.content-section__body ol {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.35rem;
}

.content-section__body li {
  margin-bottom: 0.4rem;
  color: #334155;
}

.content-section__body li::marker {
  color: var(--brand);
}

.info-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.info-card:hover {
  border-color: #bbf7d0;
  box-shadow: 0 4px 16px rgba(4, 120, 87, 0.08);
}

.info-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--brand-dark);
}

.info-card__body p { margin: 0 0 0.5rem; }

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table thead {
  background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 700;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag--yes {
  background: var(--brand-light);
  color: var(--brand-dark);
}
.tag--no {
  background: #f1f5f9;
  color: var(--muted);
}

/* Contact highlight */
.contact-highlight {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  text-align: center;
}
.contact-highlight__label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.contact-highlight__email {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
}
.contact-highlight__email a {
  color: var(--brand-dark);
}
.contact-highlight__hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Link cards list */
.link-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}
.link-cards li { margin: 0; }
.link-cards a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 500;
  transition: all 0.15s;
}
.link-cards a::after {
  content: "→";
  color: var(--brand);
  font-weight: 700;
}
.link-cards a:hover {
  background: var(--brand-light);
  border-color: #86efac;
  text-decoration: none;
  color: var(--brand-dark);
}

/* Prose (legal) */
.prose h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--text);
}
.prose h2 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.65rem;
  color: var(--brand-dark);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--brand-light);
}
.prose h2:first-child { margin-top: 0; }
.prose-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.prose p { margin: 0 0 0.75rem; color: #334155; }
.prose ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}
.prose li { margin-bottom: 0.35rem; color: #334155; }

/* FAQ */
.faq-list details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.65rem;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.faq-list details:hover {
  border-color: #bbf7d0;
}
.faq-list details[open] {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(4, 120, 87, 0.1);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 1.15rem 1rem 2.75rem;
  list-style: none;
  position: relative;
  color: var(--text);
  transition: background 0.15s;
}
.faq-list summary:hover { background: #f8fafc; }

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::before {
  content: "+";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}
.faq-list details[open] summary::before {
  content: "−";
  background: var(--brand);
  color: #fff;
}

.faq-list details[open] summary {
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.faq-list .faq-answer {
  padding: 1rem 1.15rem 1.15rem;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
}
.faq-list .faq-answer p { margin: 0 0 0.65rem; }
.faq-list .faq-answer p:last-child { margin-bottom: 0; }

/* Old inner page rules removed below - keeping config preview, steps, footer */
.config-preview {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.25rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2.5rem 1.25rem;
  font-size: 0.875rem;
}

.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.footer-brand strong {
  color: #f1f5f9;
  font-size: 1rem;
}

.footer-brand p {
  margin: 0.35rem 0 1.25rem;
  max-width: 40ch;
}

.footer-nav,
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }

.footer-meta p { margin: 0.25rem 0; }

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.8rem;
}

/* Legal docs — legacy class kept for compatibility */
.doc-page__body { }

/* Config preview */
@media (max-width: 960px) {
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-header { position: relative; }
  .site-menu-toggle { display: flex; }
  .arch-diagram { grid-template-columns: 1fr; }
  .arch-arrow { padding: 0.5rem 0; }
  .page-panel { padding: 1.25rem 1.15rem 1.5rem; }
  .data-table { font-size: 0.8125rem; }
  .data-table th,
  .data-table td { padding: 0.55rem 0.65rem; }
}

@media (max-width: 768px) {
  .site-header__account-label { display: none; }
  .site-header__account-icon { display: block; }
  .site-header__account.btn {
    padding: 0.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border-radius: 999px;
  }
}

.app-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.app-download-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.app-download-card h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.1rem;
}

.app-download-card p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.app-download-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.app-download-card__icon--dining {
  background: #eff6ff;
}

.app-download-card__icon--booking {
  background: #f0fdfa;
}

.app-download-card__icon--merchant {
  background: #eff6ff;
}

.app-download-card__meta {
  font-size: 0.8125rem !important;
  color: var(--muted) !important;
}

.app-download-card__icon--coupon {
  background: #fef3c7;
}

.app-download-card__soon {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 600;
}

.app-download-card__btn {
  display: inline-block;
  margin-top: 0.75rem;
  text-decoration: none;
}
