:root {
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: rgba(26, 26, 26, 0.6);
  --color-excerpt: rgba(26, 26, 26, 0.8);
  --color-accent: #0088cc;
  --color-line: rgba(26, 26, 26, 0.07);
  --color-footer: #2d3236;
  --font-body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --wrap: 1200px;
  --main: 860px;
  --sidebar: 300px;
  --gap: 20px;
  --radius: 12px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(100% - 20px, var(--wrap));
  margin: 0 auto;
  padding: 0 10px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--color-surface);
  box-shadow: 0 0 3px 1px rgba(26, 26, 26, 0.06);
}

.site-header .header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 8px;
}

.brand img {
  height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 22px;
  padding: 8px;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.main-nav a {
  display: block;
  padding: 0 14px;
  height: var(--header-h);
  line-height: var(--header-h);
  white-space: nowrap;
  font-size: 14px;
}

.main-nav a.is-active,
.main-nav a:hover {
  color: var(--color-accent);
}

/* Layout */
.page-main {
  flex: 1 0 auto;
  width: 100%;
  padding: 20px 0 40px;
}

body[data-page="detail"] .page-main {
  padding: 28px 0 48px;
}

.home-grid {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.main-col {
  width: var(--main);
  max-width: 100%;
  flex: 0 0 auto;
}

.sidebar {
  width: var(--sidebar);
  flex: 0 0 auto;
  position: sticky;
  top: 84px;
  align-self: flex-start;
}

/* Slider */
.slider-wrap {
  position: relative;
  margin: 0 0 20px;
  height: 320px;
}

.slider-viewport {
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(26, 26, 26, 0.04);
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hero-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.slide-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 28px 18px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  transform: translateY(8px);
  opacity: 0.85;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.hero-slide.is-active .slide-title {
  transform: translateY(0);
  opacity: 1;
}

.slide-title a {
  color: #fff;
}

.hero-dots {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--color-accent);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  opacity: 0;
  transform: translateY(0) scale(0.92);
  transition: background 0.2s ease, opacity 0.25s ease, transform 0.25s ease;
}

.slider-wrap.is-ready:hover .hero-arrow,
.slider-wrap.is-ready:focus-within .hero-arrow {
  opacity: 1;
  transform: scale(1);
}

.hero-arrow svg {
  display: block;
  flex-shrink: 0;
}

.hero-arrow:hover {
  background: rgba(26, 26, 26, 0.7);
}

.hero-arrow.prev {
  left: 12px;
}

.hero-arrow.next {
  right: 12px;
}

/* Featured banner: 底图 + 标题 */
.feat-banner-wrap {
  margin: 0 0 20px;
}

.feat-banner {
  position: relative;
  display: block;
  height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  background: #1a2a24;
}

.feat-banner-media {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: transform 0.7s ease;
}

.feat-banner:hover .feat-banner-media {
  transform: scale(1.08);
}

.feat-banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 20%,
    rgba(0, 0, 0, 0.55) 70%,
    rgba(0, 0, 0, 0.78) 100%
  );
  transition: background 0.35s ease;
}

.feat-banner:hover .feat-banner-shade {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 10%,
    rgba(0, 0, 0, 0.5) 65%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

.feat-banner-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 22px 20px 18px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  transition: transform 0.35s ease;
}

.feat-banner:hover .feat-banner-title {
  transform: translateY(-3px);
}

.feat-banner:hover {
  color: #fff;
}

/* Motion: reveal */
.reveal-ready {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-ready.is-in {
  opacity: 1;
  transform: none;
}

/* Feed panel */
.sec-panel {
  background: var(--color-surface);
  border-radius: var(--radius);
  margin: 0 0 20px;
  overflow: hidden;
}

.sec-panel-head {
  padding: 18px 20px 0;
}

.sec-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.post-loop {
  list-style: none;
  margin: 0;
  padding: 0 20px;
}

.post-loop .item {
  display: flex;
  gap: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-line);
}

.post-loop .item:last-child {
  border-bottom: 0;
}

.item-img {
  position: relative;
  flex: 0 0 246px;
  width: 246px;
  margin: 0;
}

.item-img-inner {
  display: block;
  width: 246px;
  height: 154px;
  border-radius: 6px;
  overflow: hidden;
  background: #e8eef2;
}

.item-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.item:hover .item-img-inner img {
  transform: scale(1.05);
}

.item-title a {
  transition: color 0.2s ease;
}

.item-category {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  padding: 2px 8px;
  background: rgba(80, 80, 80, 0.78);
  color: #fff !important;
  font-size: 12px;
  border-bottom-right-radius: 4px;
  line-height: 1.6;
}

.item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0 0 20px;
}

.item-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.item-title a {
  color: var(--color-text);
}

.item-title a:hover {
  color: var(--color-accent);
}

.item-excerpt {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-excerpt);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta {
  margin-top: auto;
  font-size: 12px;
  color: var(--color-muted);
}

.item-meta a {
  color: var(--color-muted);
}

.item-meta a:hover {
  color: var(--color-accent);
}

/* 穿插大图竖排：标题 → 大图 → 摘要 → 日期·栏目 */
.post-loop .item.item-cover {
  display: block;
  padding: 24px 0;
}

.item-cover .item-content {
  padding: 0;
}

.item-cover .item-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
}

.item-cover-media {
  display: block;
  margin: 0 0 14px;
  border-radius: 8px;
  overflow: hidden;
  background: #e8eef2;
  line-height: 0;
}

.item-cover-media img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.item-cover:hover .item-cover-media img {
  transform: scale(1.04);
}

.item-cover .item-excerpt {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.8;
  -webkit-line-clamp: 3;
}

.item-cover .item-meta {
  margin-top: 0;
  font-size: 13px;
}

/* Sidebar widgets */
.widget {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 15px;
  margin: 0 0 20px;
}

.widget-title {
  position: relative;
  margin: 0 0 14px;
  padding-left: 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.widget-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--color-accent);
}

.search-box {
  display: flex;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  border: 0;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  min-width: 0;
}

.search-box button {
  border: 0;
  width: 44px;
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-box button svg {
  display: block;
}

.search-box button:hover {
  background: #0077b3;
}

.search-box button:active {
  transform: scale(0.96);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
}

.side-list li:last-child {
  border-bottom: 0;
}

.side-list li a.side-row {
  display: flex;
  gap: 10px;
  color: inherit;
}

.side-list .item-no-thumb .item-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-list .thumb {
  flex: 0 0 100px;
  width: 100px;
  height: 63px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8eef2;
}

.side-list .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-list .side-body {
  flex: 1;
  min-width: 0;
}

.side-list .side-body .item-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-list .item-date {
  margin: 0;
  font-size: 12px;
  color: var(--color-muted);
}

.side-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.side-grid li a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: inherit;
}

.side-grid .thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8eef2;
}

.side-grid .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-grid .title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inner pages */
.page-head {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 16px;
}

.page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.article-detail {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 36px 40px 48px;
}

.article-detail h1 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.4;
}

.article-detail .meta {
  color: var(--color-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.article-detail .cover {
  margin: 0 0 32px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 420px;
  background: #e8eef2;
}

.article-detail .cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.article-body {
  font-size: 16px;
  line-height: 2;
  color: #333;
}

.article-body p {
  margin: 0 0 1.35em;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.about-body,
.contact-body,
.form-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-size: 15px;
  line-height: 1.9;
}

.form-card {
  max-width: 720px;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.btn {
  display: inline-block;
  border: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}

.form-msg {
  margin-top: 12px;
  color: var(--color-muted);
}

.contact-body dt {
  font-weight: 500;
  margin-top: 12px;
}

.contact-body dd {
  margin: 4px 0 0;
}

.empty-tip {
  padding: 28px 8px;
  color: var(--color-muted);
  text-align: center;
}

/* Partner strip above footer */
.partner-section {
  margin: 0 auto 20px;
}

.partner-section .sec-panel {
  margin-bottom: 0;
}

.partner-section .sec-panel-head {
  padding: 20px 20px 0;
}

.partner-section .sec-panel-head h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.partner-section .sec-panel-head small {
  font-size: 13px;
  color: var(--color-muted);
  font-weight: 400;
}

.partner-section .sec-panel-head .more {
  margin-left: auto;
  font-size: 13px;
  color: var(--color-accent);
}

.list-partner {
  list-style: none;
  margin: 0;
  padding: 16px 20px 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.list-partner a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f5f6;
  min-height: 72px;
  line-height: 72px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.list-partner a:hover {
  color: var(--color-accent);
}

/* 友情链接 */
.friend-section {
  margin: 0 auto 20px;
}

.friend-links {
  list-style: none;
  margin: 0;
  padding: 14px 20px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.friend-links a {
  font-size: 14px;
  color: #444;
}

.friend-links a:hover {
  color: var(--color-accent);
}

.friend-links .empty {
  color: var(--color-muted);
  font-size: 13px;
}

/* Footer: logo + about/copyright only */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.7);
  padding: 50px 0;
  font-size: 14px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a:hover {
  color: #fff;
}

.footer-col-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  width: min(100% - 20px, 1180px);
  margin: 0 auto;
  padding: 0 10px;
}

.footer-col-logo {
  flex: 0 0 auto;
}

.footer-col-logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

.footer-col-copy {
  flex: 1;
  min-width: 0;
}

.footer-nav {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.footer-nav a {
  font-size: 14px;
}

.copyright p {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1100px) {
  .home-grid {
    flex-direction: column;
  }

  .main-col,
  .sidebar {
    width: 100%;
  }

  .sidebar {
    position: static;
  }

  .slider-wrap {
    height: 260px;
  }

  .list-partner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: #fff;
    flex-direction: column;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    padding: 8px 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    height: 44px;
    line-height: 44px;
  }

  .slider-wrap {
    height: 200px;
  }

  .hero-arrow {
    opacity: 1;
    transform: none;
    width: 34px;
    height: 34px;
    margin-top: -17px;
  }

  .feat-banner {
    height: 150px;
  }

  .feat-banner-title {
    font-size: 16px;
    padding: 16px 14px 14px;
  }

  .post-loop .item {
    flex-direction: column;
  }

  .item-img,
  .item-img-inner {
    width: 100%;
    flex-basis: auto;
  }

  .item-img-inner {
    height: 180px;
  }

  .item-content {
    padding: 12px 0 0;
  }

  .item-cover .item-content {
    padding: 0;
  }

  .item-cover-media img {
    height: 200px;
  }

  .item-cover .item-title {
    font-size: 18px;
  }

  .item-title {
    font-size: 17px;
  }

  .item-excerpt {
    font-size: 14px;
  }

  .footer-col-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-detail {
    padding: 24px 18px 36px;
  }

  .article-detail .cover {
    margin-bottom: 24px;
  }

  .article-body {
    font-size: 15px;
    line-height: 1.9;
  }
}

/* rich-text body (API content HTML) */
.article-body img,
.detail-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em 0;
}
.article-body h2,
.detail-body h2 {
  margin: 1.4em 0 0.6em;
  font-size: 1.35em;
  line-height: 1.35;
}
.article-body h3,
.detail-body h3 {
  margin: 1.25em 0 0.5em;
  font-size: 1.18em;
}
.article-body h4,
.detail-body h4 {
  margin: 1.1em 0 0.45em;
  font-size: 1.05em;
}
.article-body ul,
.article-body ol,
.detail-body ul,
.detail-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}
.article-body li,
.detail-body li {
  margin: 0.25em 0;
}
.article-body blockquote,
.detail-body blockquote {
  margin: 1em 0;
  padding: 0.6em 1em;
  border-left: 3px solid currentColor;
  opacity: 0.92;
}
.article-body a,
.detail-body a {
  text-decoration: underline;
}
.article-body table,
.detail-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95em;
}
.article-body th,
.article-body td,
.detail-body th,
.detail-body td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 8px 10px;
  text-align: left;
}

