:root {
  --bg: var(--wh-bg, #f4f7f6);
  --bg-alt: var(--wh-primary-soft, #eaf1ef);
  --surface: var(--wh-surface, #ffffff);
  --surface-soft: var(--wh-card-bg, #edf4f2);
  --ink: var(--wh-text, #10212a);
  --muted: var(--wh-muted, #587078);
  --line: var(--border, #d4e2de);
  --accent: var(--wh-primary, #138b80);
  --accent-strong: var(--wh-primary-deep, #0e5f58);
  --accent-soft: var(--wh-primary-soft, #d7f8f3);
  --hero-a: var(--wh-primary-deep, #0c2424);
  --hero-b: var(--wh-primary, #15645b);
  --hero-c: var(--wh-secondary, #132d2d);
  --hero-text: var(--on-primary, #f7fcfb);
  --warn-bg: #f7f2e7;
  --warn-text: #6f5523;
  --shadow: 0 24px 60px rgba(16, 33, 42, 0.08);
  --shadow-soft: 0 16px 40px rgba(16, 33, 42, 0.06);
  --radius: 22px;
  --radius-lg: 30px;
  --shell: min(1180px, calc(100% - 32px));
  --font-head: "Space Grotesk", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.7 var(--font-body);
  background:
    radial-gradient(circle at top right, var(--accent-soft), transparent 35%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: .22s ease; }
a:hover, a:focus-visible { transform: translateY(-1px); }
a:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.tg-shell { width: var(--shell); margin: 0 auto; }
.tg-page { min-height: 100vh; }

.tg-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(244, 247, 246, 0.92);
  border-bottom: 1px solid rgba(212, 226, 222, 0.9);
}

.tg-nav {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.tg-brand { display: inline-flex; align-items: center; gap: 14px; }
.tg-brand-mark {
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, var(--accent-soft));
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}
.tg-brand-title { display: block; font: 700 18px/1.1 var(--font-head); letter-spacing: -.02em; }
.tg-brand-subtitle { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.tg-nav-links, .tg-page-nav, .tg-chip-row, .tg-meta-row, .tg-footer-links, .tg-pagination-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tg-nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.tg-nav-link.is-active, .tg-nav-link:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.tg-nav-cta, .tg-button-primary, .tg-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-weight: 700;
}

.tg-nav-cta, .tg-button-primary {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 14px 28px rgba(9, 58, 53, 0.16);
}

.tg-button-secondary {
  color: var(--hero-text);
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

.tg-hero {
  padding: 64px 0 88px;
  color: var(--hero-text);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, var(--accent-soft), transparent 24%),
    radial-gradient(circle at 88% 18%, var(--accent-soft), transparent 20%),
    linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 54%, var(--hero-c) 100%);
}

.tg-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .98fr);
  gap: 56px;
  align-items: center;
}

.tg-hero-pill, .tg-chip, .tg-breadcrumb {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.tg-hero-pill {
  margin-bottom: 24px;
  color: var(--accent-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.tg-chip, .tg-breadcrumb {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.tg-hero h1, .tg-section-heading h2, .tg-page-hero h1, .tg-content-hero h1,
.tg-card-title, .tg-article-card-title, .tg-footer-title, .tg-article-prose h2, .tg-article-prose h3 {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: -.03em;
}

.tg-hero h1 { font-size: clamp(42px, 7vw, 68px); line-height: .98; max-width: 9ch; }
.tg-hero h1 span { display: block; padding-top: 14px; color: var(--accent-soft); }
.tg-hero p, .tg-page-hero p, .tg-content-hero p, .tg-page-subtle {
  margin: 16px 0 0;
  color: rgba(247, 252, 251, 0.8);
}

.tg-glass-note {
  display: flex;
  gap: 14px;
  margin: 28px 0 30px;
  padding: 18px 20px;
  max-width: 600px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.tg-glass-note-badge {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-soft);
  font: 700 18px/1 var(--font-head);
}

.tg-glass-note p { margin: 0; font-size: 14px; }
.tg-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.tg-hero-media { display: flex; justify-content: center; }
.tg-device-frame { position: relative; width: min(100%, 540px); }
.tg-device-frame img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.tg-float-card {
  position: absolute;
  right: -18px;
  bottom: -18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 48px rgba(12, 36, 36, 0.2);
  color: var(--ink);
}

.tg-float-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--hero-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font: 700 20px/1 var(--font-head);
}

.tg-float-label { display: block; font-weight: 700; }
.tg-float-subtext { display: block; font-size: 13px; color: var(--muted); }

.tg-stack, .tg-page-hero, .tg-content-hero { padding: 72px 0; }
.tg-stack-alt { background: linear-gradient(180deg, rgba(234, 241, 239, 0.7), rgba(244, 247, 246, 0)); }
.tg-stack-dark {
  color: var(--hero-text);
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 24%),
    linear-gradient(135deg, var(--hero-a) 0%, var(--hero-c) 100%);
}

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

.tg-section-heading h2, .tg-page-hero h1, .tg-content-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.02;
}

.tg-section-heading p, .tg-page-hero p, .tg-content-hero p { color: var(--muted); max-width: 720px; }
.tg-stack-dark .tg-page-subtle { color: rgba(247, 252, 251, 0.78); }
.tg-link-inline, .tg-article-card-link, .tg-download-card-link { color: var(--accent-strong); font-weight: 700; }

.tg-grid-3, .tg-grid-articles, .tg-download-grid, .tg-faq-grid {
  display: grid;
  gap: 22px;
}

.tg-grid-3, .tg-faq-grid, .tg-grid-articles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-download-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tg-card, .tg-article-card, .tg-download-card, .tg-content-panel, .tg-sidebar-card, .tg-pagination {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tg-card, .tg-download-card, .tg-content-panel, .tg-sidebar-card { padding: 24px; }
.tg-card-title { margin-top: 14px; font-size: clamp(22px, 3vw, 28px); line-height: 1.08; }
.tg-card p, .tg-download-card p, .tg-sidebar-card p, .tg-content-panel p { margin: 12px 0 0; color: var(--muted); }

.tg-article-card { overflow: hidden; display: flex; flex-direction: column; }
.tg-article-card-media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,0)), var(--surface-soft); }
.tg-article-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tg-article-card-body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 22px; }
.tg-meta-row { font-size: 12px; font-weight: 700; color: var(--muted); }
.tg-article-card-title { font-size: 22px; line-height: 1.16; }
.tg-article-card-summary { flex: 1; margin: 0; color: var(--muted); }

.tg-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 340px);
  gap: 28px;
}

.tg-sidebar { display: grid; gap: 22px; align-content: start; }
.tg-sidebar-card:first-child { position: sticky; top: 112px; }

.tg-download-card { display: flex; flex-direction: column; gap: 16px; }
.tg-download-card-icon {
  width: 72px;
  height: 72px;
  padding: 14px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,0));
}
.tg-download-card-icon img { width: 100%; height: 100%; object-fit: contain; }
.tg-download-card h2, .tg-download-card h3, .tg-sidebar-card h2, .tg-sidebar-card h3 { margin: 0; font: 700 24px/1.08 var(--font-head); }
.tg-download-meta span {
  display: inline-flex;
  padding: 6px 10px;
  margin: 0 8px 8px 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tg-divider { height: 1px; margin: 24px 0; background: linear-gradient(90deg, transparent, var(--accent-soft), transparent); }
.tg-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tg-list li { position: relative; padding-left: 18px; color: var(--muted); }
.tg-list li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }

.tg-article-prose { font-size: 16px; }
.tg-featured-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 26px;
  margin-bottom: 24px;
}
.tg-article-prose > :first-child { margin-top: 0; }
.tg-article-prose h2 { margin: 34px 0 14px; font-size: clamp(28px, 4vw, 38px); }
.tg-article-prose h3 { margin: 24px 0 12px; font-size: clamp(22px, 3vw, 28px); }
.tg-article-prose p, .tg-article-prose ul, .tg-article-prose ol, .tg-article-prose blockquote, .tg-article-prose table { margin: 0 0 16px; }
.tg-article-prose ul, .tg-article-prose ol { padding-left: 22px; }
.tg-article-prose a { color: var(--accent-strong); font-weight: 700; }
.tg-article-prose img { margin: 20px 0; border-radius: 20px; box-shadow: var(--shadow-soft); }
.tg-article-prose blockquote {
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 16px 16px 0;
  background: var(--accent-soft);
}
.tg-article-prose table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); }
.tg-article-prose th, .tg-article-prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tg-article-prose thead th { background: var(--surface-soft); }

.tg-pagination {
  margin-top: 30px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.tg-pagination-links a, .tg-pagination-links span {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.tg-pagination-links .is-current { color: var(--hero-text); background: var(--accent-strong); border-color: var(--accent-strong); }

.tg-site-footer {
  padding: 72px 0 28px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 20% 0%, var(--accent-soft), transparent 22%),
    linear-gradient(180deg, var(--hero-c) 0%, var(--hero-a) 100%);
}

.tg-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(180px, .9fr));
  gap: 28px;
}

.tg-footer-title { margin-bottom: 12px; font-size: 20px; }
.tg-site-footer p, .tg-site-footer li, .tg-site-footer a { color: rgba(247, 252, 251, 0.74); }
.tg-site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tg-site-footer a:hover { color: #fff; }

.tg-footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.tg-empty {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1120px) {
  .tg-grid-3, .tg-faq-grid, .tg-grid-articles, .tg-download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-layout-grid { grid-template-columns: 1fr; }
  .tg-sidebar-card:first-child { position: static; }
  .tg-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .tg-nav { min-height: 72px; flex-wrap: wrap; justify-content: center; padding: 14px 0 18px; }
  .tg-brand { width: 100%; justify-content: center; }
  .tg-nav-links, .tg-nav-cta { justify-content: center; }
  .tg-hero { padding: 42px 0 72px; }
  .tg-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .tg-hero h1 { max-width: none; }
  .tg-section-heading { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  :root { --shell: min(100%, calc(100% - 24px)); --radius: 20px; --radius-lg: 26px; }
  .tg-grid-3, .tg-grid-articles, .tg-download-grid, .tg-faq-grid, .tg-footer-grid { grid-template-columns: 1fr; }
  .tg-button-primary, .tg-button-secondary, .tg-nav-cta { width: 100%; }
  .tg-hero-actions { width: 100%; }
  .tg-card, .tg-download-card, .tg-content-panel, .tg-sidebar-card { padding: 20px; }
  .tg-float-card { position: static; margin-top: 16px; }
  .tg-pagination { padding: 16px; flex-direction: column; align-items: flex-start; }
}
