:root {
  --bg: #f2eee7;
  --bg-deep: #e6ddcf;
  --surface: #fffaf2;
  --surface-strong: #fff1d8;
  --ink: #191f2a;
  --muted: #596175;
  --line: #d1c3af;
  --primary: #0f5f9f;
  --primary-strong: #0b3f67;
  --success: #0f7a45;
  --warn: #9d5b00;
  --danger: #ab2020;
  --accent: #c65c21;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow: 0 14px 34px rgba(26, 32, 44, 0.12);
  --shadow-soft: 0 8px 22px rgba(26, 32, 44, 0.08);
  --font-display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 2%, rgba(252, 227, 166, 0.66) 0, transparent 28%),
    radial-gradient(circle at 94% 92%, rgba(157, 196, 226, 0.42) 0, transparent 32%),
    linear-gradient(165deg, var(--bg) 0%, #f7f0e4 56%, var(--bg-deep) 100%);
  font-family: var(--font-body);
  line-height: 1.68;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: linear-gradient(rgba(25, 31, 42, 0.05) 1px, transparent 1px);
  background-size: 100% 3px;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(103, 109, 122, 0.25);
  background: rgba(247, 242, 233, 0.84);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.nav-list {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.38rem 0.82rem;
  font-size: 0.92rem;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(255, 250, 242, 0.9);
  color: var(--ink);
}

.nav-primary {
  color: var(--primary-strong);
  font-weight: 700;
}

.is-active {
  color: var(--primary-strong);
  background: rgba(161, 203, 235, 0.35);
}

.page {
  padding: 2.2rem 0 4rem;
}

.page-home {
  padding-top: 1.2rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.62rem;
  font-family: var(--font-display);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4.1vw, 3.2rem);
}

h2 {
  font-size: clamp(1.38rem, 2.6vw, 1.95rem);
  margin-top: 2rem;
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0 0 0.95rem;
}

.lead {
  color: var(--muted);
  max-width: 64ch;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.page-hero {
  margin-bottom: 1.1rem;
}

.content-block {
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.94), rgba(255, 246, 232, 0.9));
  border: 1px solid rgba(113, 106, 95, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.3rem;
  margin-bottom: 1.2rem;
}

.home-shell {
  display: grid;
  gap: 1.2rem;
}

.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(94, 87, 75, 0.34);
  background:
    radial-gradient(circle at 84% 16%, rgba(248, 202, 129, 0.4) 0, transparent 34%),
    linear-gradient(145deg, rgba(255, 248, 235, 0.96) 0%, rgba(247, 231, 208, 0.96) 100%);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.4rem);
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -34px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 2px dashed rgba(11, 63, 103, 0.2);
  transform: rotate(8deg);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 63, 103, 0.28);
  padding: 0.2rem 0.72rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-strong);
  background: rgba(245, 252, 255, 0.7);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.2rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.58rem 1.12rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
}

.cta-primary {
  color: #f6f8fc;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 8px 24px rgba(15, 95, 159, 0.32);
}

.cta-ghost {
  color: var(--primary-strong);
  border-color: rgba(11, 63, 103, 0.28);
  background: rgba(255, 250, 242, 0.7);
}

.hero-metrics {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.hero-metrics li {
  border: 1px solid rgba(105, 111, 124, 0.24);
  border-radius: 12px;
  padding: 0.68rem 0.75rem;
  background: rgba(255, 252, 245, 0.75);
}

.hero-metrics strong {
  display: block;
  font-size: 1.34rem;
  font-family: var(--font-display);
  color: var(--primary-strong);
}

.hero-metrics span {
  color: var(--muted);
  font-size: 0.9rem;
}

.portal-strip {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.portal-card {
  --tone: var(--primary-strong);
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: var(--ink);
  border-radius: 18px;
  border: 1px solid rgba(101, 94, 82, 0.32);
  background: linear-gradient(165deg, rgba(255, 251, 243, 0.95), rgba(246, 236, 219, 0.95));
  padding: 1rem 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--tone) 0%, rgba(255, 255, 255, 0) 100%);
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-4px) rotate(-0.35deg);
  box-shadow: 0 18px 34px rgba(26, 32, 44, 0.16);
}

.portal-card p {
  margin-bottom: 0.46rem;
  font-size: 0.85rem;
  color: var(--tone);
  font-weight: 700;
}

.portal-card h2 {
  margin: 0 0 0.38rem;
  font-size: 1.45rem;
}

.portal-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.tone-chatgpt {
  --tone: #0b4d85;
}

.tone-gemini {
  --tone: #2f6a86;
}

.tone-claude {
  --tone: #92522f;
}

.tone-grok {
  --tone: #7b3b55;
}

.home-content h2:first-child {
  margin-top: 0;
}

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

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

.quick-link-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 1rem 0 0.6rem;
}

.quick-link {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(105, 97, 84, 0.34);
  background: rgba(255, 251, 244, 0.94);
  border-radius: 14px;
  padding: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 4px 14px rgba(26, 32, 44, 0.08);
}

.quick-link:hover,
.quick-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(26, 32, 44, 0.12);
  border-color: rgba(11, 63, 103, 0.36);
}

.quick-link-kicker {
  display: inline-block;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 63, 103, 0.24);
  padding: 0.12rem 0.55rem;
  color: var(--primary-strong);
  background: rgba(245, 252, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
}

.quick-link strong {
  display: block;
  margin-bottom: 0.34rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.quick-link em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(105, 97, 84, 0.34);
  background: rgba(255, 251, 244, 0.94);
  border-radius: 13px;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(26, 32, 44, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(26, 32, 44, 0.12);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.badge.success {
  background: #e1f4e9;
  color: var(--success);
}

.badge.warn {
  background: #fff1db;
  color: var(--warn);
}

.badge.danger {
  background: #ffe5e7;
  color: var(--danger);
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.92rem;
}

a {
  color: var(--primary-strong);
}

a:hover,
a:focus-visible {
  color: var(--primary);
}

.footer {
  border-top: 1px solid rgba(107, 101, 90, 0.3);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.4rem 0 2.5rem;
}

.footer a {
  color: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.65rem;
  text-align: left;
  white-space: nowrap;
  background: rgba(255, 251, 244, 0.75);
}

.content-figure {
  margin: 1.2rem auto;
  text-align: center;
}

.content-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
}

.content-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

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

@media (max-width: 980px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .home-hero::after {
    width: 170px;
    height: 170px;
    right: -64px;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 0;
  }

  .nav-list {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 1.4rem 0 3rem;
  }

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

  .home-hero {
    padding: 1.2rem;
  }

  .home-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta {
    width: 100%;
  }

  .portal-card h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 520px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
