:root {
  --bg: #f5f9fc;
  --paper: #ffffff;
  --ink: #142033;
  --muted: #506073;
  --line: #d8e3ef;
  --blue: #0b5ea8;
  --blue-2: #e8f3ff;
  --teal: #087b82;
  --teal-2: #e8f7f5;
  --red: #b52b2b;
  --red-2: #fff0f0;
  --shadow: 0 18px 46px rgba(24, 48, 78, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.75;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 44px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 227, 239, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #33445a;
  font-size: 14px;
  white-space: nowrap;
}

.nav-cta {
  padding: 9px 14px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 800;
}

.article-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 24px 24px;
}

.breadcrumb {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: 0;
}

.intro {
  max-width: 820px;
  margin: 18px 0 0;
  color: #354258;
  font-size: 18px;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.toc a {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 14px;
}

.toc a:hover {
  color: var(--blue);
  background: var(--blue-2);
  text-decoration: none;
}

.article {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  scroll-margin-top: 104px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.25;
}

.panel h3 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 18px;
  line-height: 1.35;
}

.panel p {
  margin: 0;
  color: #354258;
}

.article-image {
  margin: 18px 0;
  overflow-x: auto;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
}

.article-image figcaption {
  padding: 10px 14px 12px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
}

.real-photo-card {
  overflow: hidden;
  margin: 18px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(33, 55, 84, 0.07);
}

.real-photo-card img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.real-photo-card.is-portrait img {
  object-position: center 56%;
}

.real-photo-card figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

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

.visual-grid.is-two {
  grid-template-columns: repeat(2, 1fr);
}

.visual-card {
  overflow: hidden;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.visual-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #fbfdff;
}

.visual-card.is-contain img {
  height: 170px;
  object-fit: contain;
  padding: 18px;
}

.visual-card figcaption {
  padding: 10px 14px 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
}

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

.card {
  min-width: 0;
  padding: 18px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

a.card {
  display: block;
  color: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

a.card:hover {
  border-color: #9fc6ea;
  box-shadow: 0 14px 34px rgba(24, 48, 78, 0.1);
  text-decoration: none;
  transform: translateY(-2px);
}

.card p,
.card li,
.list li {
  color: var(--muted);
  font-size: 14px;
}

.card ul,
.list {
  margin: 10px 0 0;
  padding-left: 20px;
}

.callout {
  margin-top: 16px;
  padding: 14px 16px;
  color: #224b4d;
  background: var(--teal-2);
  border: 1px solid #b9dedb;
  border-radius: 8px;
  font-size: 14px;
}

.warning {
  margin-top: 16px;
  padding: 14px 16px;
  color: #5c2828;
  background: var(--red-2);
  border: 1px solid #efbaba;
  border-radius: 8px;
  font-size: 14px;
}

.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.next-links a {
  padding: 9px 12px;
  color: var(--blue);
  background: var(--blue-2);
  border: 1px solid #c8ddf3;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

footer {
  padding: 34px 24px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 980px) {
  .site-header {
    padding: 0 22px;
  }

  .nav a:not(.nav-cta) {
    display: none;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .grid,
  .visual-grid,
  .visual-grid.is-four,
  .visual-grid.is-two {
    grid-template-columns: 1fr;
  }

  .article-image {
    margin: 14px 0;
    overflow: hidden;
  }

  .article-image img {
    width: 100% !important;
    max-width: 100%;
    min-inline-size: 0 !important;
    min-width: 0 !important;
  }

  .real-photo-card img {
    height: 210px;
  }

  .visual-card img {
    height: 210px;
  }

  .visual-card.is-contain img {
    height: 150px;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .article-hero,
  .article-layout {
    padding-right: 16px;
    padding-left: 16px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .panel {
    padding: 22px;
    min-width: 0;
    overflow: hidden;
  }

  .article-image {
    max-width: calc(100vw - 76px);
  }

  .nav-cta {
    display: none;
  }
}
