/**
 * KGen 可见 — 官网设计系统
 * 配色取自 akta.pro（#03dc97 薄荷绿 + 炭黑），背景改为浅色
 */

/* ===== Local fonts ===== */
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("../fonts/space-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("../fonts/space-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f6f6;
  --bg-alt: #eceeee;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #434343;
  --muted: #8e8e96;
  --line: #e5e7eb;
  --line-strong: #d1d5dc;
  --accent: #03dc97;
  --accent-hover: #02c488;
  --accent-soft: #e6faf3;
  --accent-2: #90b9ff;
  --dark: #0a0a0a;
  --dark-text: #8e8e96;
  --radius: 4px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --font-sans: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --font-serif: "DM Sans", "PingFang SC", sans-serif;
  --shadow-soft: 0 18px 50px rgba(10, 10, 10, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[x-cloak] { display: none !important; }

.icon-lg { font-size: 1.5rem; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.page-wrap { background: var(--bg); }

/* ===== Layout ===== */
.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}
.wrap-wide {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
}

/* ===== Type ===== */
.font-serif { font-family: var(--font-serif); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--line-strong);
}
.display {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--ink);
}
.section-title {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink);
}
.lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
.muted { color: var(--muted); }
.body { color: var(--ink-soft); line-height: 1.75; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn .ph {
  font-size: 1.1em;
  line-height: 1;
  pointer-events: none;
  transition: transform .18s ease;
}
.ph-spinner { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-dark:hover {
  background: #222;
  border-color: #222;
  color: #fff;
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.18);
}
.btn-accent {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: #00c48a;
  border-color: #00c48a;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(3, 220, 151, 0.32);
}
.btn-accent:hover .ph-arrow-right { transform: translateX(3px); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-outline:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-light {
  background: #fff;
  color: var(--ink);
  border-color: transparent;
}
.btn-light:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.14);
}
.btn-block { width: 100%; }
.btn[disabled], .btn[disabled]:hover {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.band-dark .btn-outline {
  color: #fff;
  border-color: #3a3a3a;
  background: transparent;
}
.band-dark .btn-outline:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.band-dark .btn-accent:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
  box-shadow: none;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 246, 246, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  height: 24px;
  width: auto;
  display: block;
}
.site-footer .brand img {
  height: 18px;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  position: relative;
  font-size: 14px;
  color: var(--ink-soft);
  transition: color .15s ease;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.nav-active {
  color: var(--ink);
  font-weight: 650;
}
.nav-links a.nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
}
.btn.nav-cta-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.mobile-nav a.nav-active {
  color: var(--ink);
  font-weight: 650;
}
.header-cta { display: none; align-items: center; gap: 10px; }
.menu-btn {
  background: none;
  border: 0;
  color: var(--ink);
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color .15s ease;
}
.menu-btn:hover { background: var(--bg-alt); }
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px 0 20px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: color .15s ease;
}
.mobile-nav a:hover { color: var(--muted); }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .header-cta { display: flex; }
  .menu-btn { display: none; }
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.card:hover, .card:hover {
  transform: translateY(-3px);
  border-color: #cfeee3;
  box-shadow: var(--shadow-soft);
}
.card-static:hover { transform: none; box-shadow: none; border-color: var(--line); }
.offer-card .ph-arrow-right { transition: transform .18s ease; }
a.offer-card:hover .ph-arrow-right { transform: translateX(4px); }

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.input, .textarea, select.input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(3, 220, 151, 0.18);
}
.textarea { resize: none; min-height: 110px; }
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 700px) { .chip-grid { grid-template-columns: repeat(3, 1fr); } }
.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .15s ease;
}
.chip.active, .chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
.chip input { display: none; }
.chip:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}
.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
}
.alert-error { background: #fdecec; color: #9b2c2c; }
.alert-ok { background: var(--accent-soft); color: #0a5c42; }

/* ===== Hero visual ===== */
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 56px 0 36px;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr .95fr;
    padding: 72px 0 28px;
  }
}
.hero-visual {
  background: linear-gradient(180deg, #eef6f3 0%, #e4eeea 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.chat-panel {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.chat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
}
.bubble-user {
  align-self: flex-end;
  background: var(--bg-alt);
  color: var(--ink);
}
.bubble-ai {
  background: #f4fbf8;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.cite {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

/* ===== Logo marquee ===== */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px 40px;
  padding: 28px 0 48px;
  opacity: .72;
}
.logo-row img { height: 28px; width: auto; filter: grayscale(1); }

/* ===== Stats ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (min-width: 800px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.stat-label { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ===== Offerings ===== */
.offer-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 800px) { .offer-grid { grid-template-columns: 1fr 1fr; } }
.offer-card {
  padding: 28px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
}
.offer-kicker { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.offer-card h3 {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  margin: 10px 0 12px;
  letter-spacing: -0.04em;
}

/* ===== Use cases ===== */
.use-grid {
  display: grid;
  gap: 22px;
}
@media (min-width: 900px) { .use-grid { grid-template-columns: 1fr 1fr; gap: 28px 40px; } }
.use-no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: var(--surface);
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
a.tag:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ===== Bars ===== */
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 48px; gap: 12px; align-items: center; }
.bar-name { font-size: 13px; color: var(--ink-soft); }
.bar-track { height: 8px; background: var(--bg-alt); border-radius: var(--radius-sm); overflow: hidden; }
.bar-fill { height: 100%; background: var(--ink); border-radius: var(--radius-sm); }
.bar-fill.accent { background: var(--accent); }
.bar-val { font-size: 13px; font-weight: 650; text-align: right; }

/* ===== Dark band ===== */
.band-dark {
  background: var(--dark);
  color: #fff;
}
.band-dark .section-title,
.band-dark .display { color: #fff; }
.band-dark .lede,
.band-dark .body { color: var(--dark-text); }
.band-dark .stat-num { color: #fff; }
.band-dark .stat-label { color: var(--dark-text); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.4fr .7fr .7fr .9fr; }
}
.footer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-list a, .footer-list li { font-size: 13px; color: var(--ink-soft); }
.footer-list a:hover { color: var(--ink); }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 40px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.hm {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
}

/* ===== Page heroes ===== */
.page-hero { padding: 64px 0 36px; text-align: center; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.split {
  display: grid;
  gap: 40px;
}
@media (min-width: 900px) {
  .split-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .split-form { grid-template-columns: .9fr 1.2fr; }
}

/* ===== FAQ ===== */
.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.faq + .faq { margin-top: 10px; }
.faq button {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: background-color .15s ease;
}
.faq button:hover { background: var(--bg-alt); }
.faq button .ph { color: var(--muted); font-size: 1.1em; }
.faq-body { padding: 0 20px 18px; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }

/* ===== Article ===== */
.article-body { color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.85; }
.article-body p { margin: 0 0 1.25rem; }
.article-body h2 { font-family: var(--font-sans); font-size: 1.6rem; font-weight: 650; color: var(--ink); margin: 2.2rem 0 .8rem; }
.article-body h3 { font-size: 1.2rem; font-weight: 650; color: var(--ink); margin: 1.6rem 0 .6rem; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
.article-body img { border-radius: var(--radius); margin: 1.4rem 0; }
.article-body blockquote {
  margin: 1.6rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.geo-summary-box {
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid #b7f0d8;
}
.geo-toc-sidebar {
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.geo-toc-link { color: var(--muted); font-size: 13px; display: block; padding: 6px 8px; border-radius: var(--radius-sm); }
.geo-toc-link:hover { color: var(--ink); background: var(--bg-alt); }

/* ===== Insight cards (homepage) ===== */
.insight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .insight-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.insight-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.insight-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  overflow: hidden;
  flex-shrink: 0;
}
.insight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
a.insight-card:hover .insight-media img { transform: scale(1.03); }
.insight-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 20px 24px;
  min-height: 148px;
}
.insight-meta {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
}
.insight-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.insight-excerpt {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.insight-card-empty {
  padding: 28px 20px;
  min-height: 220px;
  justify-content: center;
}

/* ===== Pagination ===== */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; }
.pager a, .pager span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ink-soft);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pager a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

@media (max-width: 768px) {
  .wrap, .wrap-wide, .wrap-narrow { width: calc(100% - 32px); }
  .display { font-size: 36px !important; }
  .section { padding: 56px 0; }
  .page-hero { padding: 44px 0 24px; }
  .brand img { height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .card, .btn .ph, .offer-card .ph-arrow-right { transition: none; }
  .btn:hover, a.card:hover, .card:hover { transform: none; }
  .ph-spinner { animation: none; }
}
