/* 倚风听海 — 全局样式 */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --text: #1a1a1a;
  --text-muted: #8a8f98;
  --line: #e8eaed;
  --black: #111111;
  --accent: #0d7377;
  --accent-deep: #095456;
  --hero-a: #1a0a2e;
  --hero-b: #2d1b4e;
  --hero-c: #0ea5e9;
  --hero-d: #a855f7;
  --radius: 10px;
  --radius-pill: 999px;
  --shadow: 0 8px 28px rgba(17, 17, 17, 0.06);
  --header-bg: rgba(255, 255, 255, 0.92);
  --card: #ffffff;
  --tag-bg: #f3f4f6;
  --input-bg: #ffffff;
  --panel: #ffffff;
  --code-bg: #f3f4f6;
  --btn-bg: #111111;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --font-brand: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --header-h: 64px;
  --max: 1180px;
}

html[data-theme="dark"] {
  --bg: #0f1419;
  --bg-soft: #171e27;
  --text: #e8eaed;
  --text-muted: #9aa3ad;
  --line: #2a3441;
  --black: #e8eaed;
  --accent: #2bb3b8;
  --accent-deep: #5ec4c8;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --header-bg: rgba(15, 20, 25, 0.94);
  --card: #171e27;
  --tag-bg: #243040;
  --input-bg: #1a222c;
  --panel: #171e27;
  --code-bg: #243040;
  --btn-bg: #2bb3b8;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 24px, var(--max));
  margin-inline: auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #134e4a, #0ea5e9);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.brand-avatar-img {
  object-fit: cover;
  padding: 0;
  background: #eee;
  display: block;
}

.hero-visual.has-photo {
  background: #0b1620;
  overflow: hidden;
}

.hero-photo-layer {
  position: absolute;
  inset: -4%;
  background-image: var(--hero-photo);
  background-size: cover;
  background-position: center;
  animation: hero-drift 22s ease-in-out infinite alternate;
  z-index: 0;
}

.hero-photo-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 18, 28, 0.55), rgba(8, 18, 28, 0.22) 55%, rgba(8, 18, 28, 0.42));
  z-index: 1;
}

.hero-visual.has-photo .hero-content {
  z-index: 2;
}

@keyframes hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

.brand-text {
  font-family: var(--font-brand);
  font-size: 22px;
  letter-spacing: 0.04em;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item > a:hover,
.nav-item.is-active > a {
  background: var(--bg-soft);
  color: var(--accent-deep);
}

.caret {
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.nav-item:hover .caret {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 280px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 50;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-grid {
  display: grid;
  gap: 2px 16px;
}

.dropdown-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
  min-width: 320px;
}

.dropdown-grid a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
}

.dropdown-grid a:hover {
  background: var(--bg-soft);
  color: var(--accent);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.theme-toggle {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.header-search {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--input-bg);
}

.header-search input {
  width: 160px;
  border: 0;
  outline: 0;
  padding: 7px 12px;
  font-size: 13px;
  background: transparent;
  color: var(--text);
}

.header-search button {
  border: 0;
  background: var(--btn-bg);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.header-search button:hover {
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

/* Hero */
.hero {
  background: #0b0614;
}

.hero-visual {
  position: relative;
  height: clamp(120px, 14vw, 168px);
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
  animation: drift 12s ease-in-out infinite alternate;
}

.hero-glow-a {
  width: 55%;
  height: 80%;
  left: -10%;
  top: -20%;
  background: radial-gradient(circle, var(--hero-d), transparent 70%);
}

.hero-glow-b {
  width: 50%;
  height: 70%;
  right: -5%;
  bottom: -30%;
  background: radial-gradient(circle, var(--hero-c), transparent 70%);
  animation-delay: -4s;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 90%);
  animation: grid-shift 20s linear infinite;
}

.hero-car {
  position: absolute;
  right: 8%;
  bottom: 12%;
  width: min(38%, 280px);
  aspect-ratio: 16 / 7;
  background:
    linear-gradient(100deg, transparent 20%, rgba(14, 165, 233, 0.35), rgba(168, 85, 247, 0.45)),
    linear-gradient(180deg, #1e293b, #0f172a);
  clip-path: polygon(8% 70%, 22% 35%, 55% 28%, 78% 40%, 92% 55%, 95% 75%, 10% 82%);
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.35);
  animation: pulse-car 4s ease-in-out infinite;
}

.hero-car::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 45%;
  width: 70%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #67e8f9, #c084fc, transparent);
  filter: blur(1px);
  animation: streak 2.8s linear infinite;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 2;
}

.hero-title {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.12em;
  text-shadow: 0 0 40px rgba(168, 85, 247, 0.55);
  animation: fade-up 0.8s ease both;
}

.hero-sub {
  position: absolute;
  right: 3%;
  bottom: 10%;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  letter-spacing: 0.2em;
  animation: fade-up 1s ease 0.15s both;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, 20px) scale(1.08); }
}

@keyframes grid-shift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}

@keyframes pulse-car {
  0%, 100% { opacity: 0.85; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(-8px); }
}

@keyframes streak {
  from { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateX(180%); opacity: 0; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Notice */
.notice-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.notice-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.notice-inner p {
  margin: 0;
}

.notice-icon {
  color: #9aa0a6;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Mega search */
.search-hero {
  padding: 36px 0 20px;
}

.search-hero.compact {
  padding: 20px 0 8px;
}

.mega-search {
  display: flex;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--input-bg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s;
}

.mega-search:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.mega-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 22px;
  font-size: 16px;
  background: transparent;
  color: var(--text);
}

.mega-search button {
  border: 0;
  background: var(--btn-bg);
  color: #fff;
  padding: 0 32px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s;
}

.mega-search button:hover {
  filter: brightness(1.08);
}

/* Home feed (latest + hot) */
.home-feed {
  padding: 8px 0 48px;
}

.home-feed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

.home-feed-main .section-head,
.home-feed-side .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.home-feed-side .section-more {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.home-feed-side .section-more:hover {
  color: var(--accent-deep);
}

.feed-list {
  border-top: 1px solid var(--line);
}

.feed-item {
  border-bottom: 1px solid var(--line);
}

.feed-item-link {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  color: inherit;
}

.feed-item-link:hover {
  color: inherit;
}

.feed-item-link:hover .feed-title {
  color: var(--accent-deep);
}

.feed-thumb {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.35), transparent 50%),
    linear-gradient(145deg, #0f172a, #134e4a);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.feed-thumb.has-image {
  background-color: #e5e7eb;
}

.feed-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.feed-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  flex: 1;
  min-width: 0;
}

.feed-date {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 2px;
}

.feed-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.feed-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.hot-list {
  border-top: 1px solid var(--line);
}

.hot-item {
  border-bottom: 1px solid var(--line);
}

.hot-item-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  color: inherit;
}

.hot-item-link:hover {
  color: inherit;
}

.hot-item-link:hover .hot-title {
  color: var(--accent-deep);
}

.hot-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.35), transparent 50%),
    linear-gradient(145deg, #0f172a, #134e4a);
  background-size: cover;
  background-position: center;
}

.hot-body {
  min-width: 0;
}

.hot-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-desc {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 8px;
  justify-content: center;
}

.pager-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  box-sizing: border-box;
}

.pager-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pager-btn.is-active {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: #fff;
  font-weight: 600;
}

.pager-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pager-ellipsis {
  color: var(--text-muted);
  padding: 0 2px;
}

.pager-total {
  margin-left: 4px;
  font-size: 14px;
  color: var(--text);
}

.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  font-size: 14px;
  color: var(--text);
}

.pager-jump-label {
  color: var(--text);
}

.pager-jump input {
  width: 52px;
  height: 34px;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  padding: 0 6px;
  font: inherit;
  text-align: center;
}

.pager-jump button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  background: #fff;
  font: inherit;
  cursor: pointer;
  color: #333;
}

.pager-jump button:hover {
  border-color: #bbb;
}

.section-more {
  font-size: 14px;
  color: var(--text-muted);
}

.section-more:hover {
  color: var(--accent-deep);
}

.empty-state.compact {
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Latest / lists */
.latest-section,
.list-section {
  padding: 12px 0 48px;
}

.list-section .feed-list {
  max-width: 920px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.section-more {
  font-size: 14px;
  color: var(--text-muted);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.resource-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d5d9e0;
}

.resource-card-link {
  display: block;
  color: inherit;
}

.resource-card-link:hover {
  color: inherit;
}

.resource-cover {
  height: 120px;
  background:
    radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(13, 115, 119, 0.4), transparent 50%),
    linear-gradient(145deg, #0f172a, #134e4a 60%, #1e293b);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.resource-cover.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55));
}

.resource-cover.has-image .cover-no,
.resource-cover.has-image .cover-cat {
  position: relative;
  z-index: 1;
}

.cover-no {
  font-family: var(--font-brand);
  font-size: 28px;
  letter-spacing: 0.04em;
}

.cover-no.large {
  font-size: 56px;
}

.cover-cat {
  font-size: 12px;
  opacity: 0.8;
  align-self: flex-end;
}

.resource-body {
  padding: 14px 16px 16px;
}

.resource-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.resource-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: #9aa0a6;
}

/* Page banner */
.page-banner {
  padding: 28px 0 8px;
  background: linear-gradient(180deg, #f4f7f7, #fff);
}

.page-title {
  margin: 8px 0 4px;
  font-family: var(--font-brand);
  font-size: 32px;
  font-weight: 400;
}

.page-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.subnav-section {
  padding: 8px 0 0;
}

.subnav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  transition: 0.2s;
}

.chip:hover,
.chip.is-active {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}

.btn-dark,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.2s;
}

.btn-dark {
  background: var(--black);
  color: #fff;
  border: 0;
}

.btn-dark:hover {
  background: #333;
  color: #fff;
}

.btn-outline {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--black);
  color: var(--text);
}

/* Detail */
.article-page {
  padding: 20px 0 56px;
  background: var(--bg);
}

.article-wrap {
  max-width: 860px;
}

.article-crumb {
  margin-bottom: 18px;
}

.article-body {
  background: transparent;
}

.article-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.article-meta .dot {
  opacity: 0.5;
}

.article-meta .views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-downloads {
  margin: 0 0 28px;
}

.article-downloads h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.article-downloads ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-downloads li {
  margin: 0 0 10px;
  line-height: 1.6;
  word-break: break-all;
}

.article-downloads a {
  color: var(--accent);
  text-decoration: underline;
}

.article-downloads a:hover {
  color: var(--accent-deep);
}

.article-downloads .pwd-tip {
  display: inline-block;
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.article-downloads code {
  background: #f5f5f5;
  padding: 1px 6px;
  border-radius: 4px;
}

.dl-report-btn {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d0d0d0;
  background: #f0f0f0;
  color: #888;
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.dl-report-btn:hover {
  background: #e8e8e8;
  color: #666;
}

.dl-report-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.dl-report-msg {
  margin: 8px 0 0;
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

.article-friendly-tip {
  margin: 0 0 24px;
  padding: 0;
  font-size: 13px;
  line-height: 1.75;
  color: #b0b0b0;
}

.article-friendly-tip strong {
  font-weight: 500;
  color: #a3a3a3;
  margin-right: 4px;
}

/* Related */
.related-section {
  margin-top: 40px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.related-section .section-head {
  margin-bottom: 8px;
}

.related-section .section-head h2 {
  margin: 0;
  font-size: 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.related-card-link {
  display: block;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.related-card-link:hover {
  color: inherit;
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.related-thumb {
  height: 110px;
  background:
    radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.35), transparent 50%),
    linear-gradient(145deg, #0f172a, #134e4a);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.related-body {
  padding: 12px 12px 14px;
}

.related-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-date {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* Float rail + modal */
/* Side ads */
.side-ads {
  pointer-events: none;
}

.side-ads-col {
  position: fixed;
  top: 140px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.side-ads-left {
  left: 12px;
}

.side-ads-right {
  right: 12px;
}

.side-ad {
  position: relative;
  pointer-events: auto;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.side-ad img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-ad a {
  display: block;
  width: 100%;
  height: 100%;
}

.side-ad-close {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.side-ad-close:hover {
  background: rgba(0, 0, 0, 0.75);
}

@media (max-width: 1280px) {
  .side-ads {
    display: none !important;
  }
}

.float-rail {
  position: fixed;
  right: 18px;
  bottom: 28%;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: rgba(55, 55, 55, 0.88);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.float-btn:hover {
  background: rgba(35, 35, 35, 0.95);
}

.float-btn-top {
  /* always visible under contact button */
}

.float-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.float-btn-contact:hover .float-tooltip,
.float-btn-contact:focus-visible .float-tooltip {
  opacity: 1;
}

.float-modal[hidden] {
  display: none !important;
}

.float-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.float-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.float-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.float-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.float-modal-close:hover {
  color: var(--text);
}

.float-modal-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
}

.float-modal-qr img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  background: #fafafa;
}

.float-modal-qr-empty {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  background: #f5f5f5;
  color: #999;
  font-size: 12px;
  text-align: center;
  border-radius: 6px;
  padding: 10px;
}

.float-modal-title {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.float-modal-name {
  margin: 0;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
}

body.float-modal-open {
  overflow: hidden;
}

.article-content {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.85;
  color: #333;
}

.article-block {
  margin: 0 0 22px;
}

.article-block:last-child {
  margin-bottom: 0;
}

.article-block-image {
  margin: 0 0 22px;
}

.article-block-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.article-preview {
  margin: 0 0 28px;
}

.article-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.article-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.detail-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  background: #fff;
}

.detail-cover {
  background:
    radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.4), transparent 50%),
    linear-gradient(160deg, #0f172a, #134e4a);
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  min-height: 240px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.detail-cover.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
}

.detail-cover.has-image .cover-no,
.detail-cover.has-image .detail-cover-hint {
  position: relative;
  z-index: 1;
}

.detail-cover-hint {
  margin: 8px 0 0;
  opacity: 0.7;
  font-size: 13px;
}

.detail-title {
  margin: 0 0 12px;
  font-size: 28px;
  font-family: var(--font-brand);
  font-weight: 400;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  color: #555;
}

.detail-desc {
  margin: 0 0 20px;
  color: #555;
  font-size: 15px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 24px;
}

.detail-meta div {
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 8px;
}

.detail-meta dt {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.detail-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.password-box {
  border: 1px dashed #c5cad3;
  border-radius: 12px;
  padding: 16px;
  background: #fafbfc;
  margin-bottom: 20px;
}

.password-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.password-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.password-row code {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 8px;
}

.password-tip {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sitemap */
.sitemap {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 40px 0 48px;
}

.sitemap-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.6fr 1.6fr 1fr 1.1fr;
  gap: 28px;
}

.sitemap-col h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}

.sitemap-col h3 a:hover {
  color: var(--accent);
}

.sitemap-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px 16px;
}

.sitemap-links.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.sitemap-links a {
  font-size: 13px;
  color: var(--text-muted);
}

.sitemap-links a:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  position: relative;
  border-top: 0;
  padding: 28px 0 32px;
  background: #2f2f2f;
  color: #cfcfcf;
}

.footer-inner {
  text-align: center;
  min-height: 28px;
}

.footer-beian,
.footer-copy,
.footer-note {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #cfcfcf;
}

.footer-note {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-size: 12px;
  color: #9a9a9a;
  line-height: 1.7;
}

.footer-beian:last-child,
.footer-copy:last-child,
.footer-note:last-child {
  margin-bottom: 0;
}

.footer-beian a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-beian a:hover {
  color: #fff;
}

.footer-qq {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d0d0d0;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.footer-qq:hover {
  color: #fff;
}

.footer-qq-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .footer-qq {
    position: static;
    transform: none;
    display: flex;
    justify-content: center;
    margin: 12px auto 0;
  }
}

.footer-beian-badge {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.footer-brand {
  display: none;
}

/* Toast */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--black);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 200;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .home-feed-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
  }

  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sitemap-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .detail-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .home-feed-grid {
    grid-template-columns: 1fr;
  }

  .home-feed-side {
    order: 2;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px;
    display: none;
    justify-content: stretch;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: 0;
    padding: 4px 0 8px 12px;
    display: none;
  }

  .nav-item.is-open .dropdown {
    display: block;
  }

  .dropdown-grid.cols-2 {
    min-width: 0;
  }

  .header-search {
    display: none;
  }

  .header-tools {
    margin-left: auto;
  }

  .header-inner {
    position: relative;
  }

  .sitemap-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .float-rail {
    right: 12px;
    bottom: 18%;
  }

  .float-modal-body {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .float-modal-title {
    justify-content: center;
  }

  .feed-item-link {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
  }

  .feed-thumb {
    width: 84px;
    height: 84px;
  }

  .feed-title {
    font-size: 15px;
  }

  .feed-title-row {
    flex-direction: column;
    gap: 4px;
  }

  .pager-jump {
    width: 100%;
    margin-left: 0;
    margin-top: 6px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .mega-search button {
    padding: 0 20px;
  }

  .hero-car {
    opacity: 0.45;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}

/* Dark mode: surfaces that still use fixed light colors */
html[data-theme="dark"] .dropdown-grid a {
  color: var(--text) !important;
}

html[data-theme="dark"] .dropdown-grid a:hover {
  color: var(--accent-deep) !important;
  background: var(--bg-soft);
}

html[data-theme="dark"] .pager-btn {
  background: var(--card);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .pager-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .pager-jump input,
html[data-theme="dark"] .pager-jump button {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .float-modal-panel,
html[data-theme="dark"] .side-ad {
  background: var(--card);
  color: var(--text);
}

html[data-theme="dark"] .float-modal-qr img,
html[data-theme="dark"] .float-modal-qr-empty {
  background: var(--bg-soft);
  color: var(--text-muted);
}

html[data-theme="dark"] .site-footer {
  background: #1a1f26;
  border-top-color: var(--line);
}

html[data-theme="dark"] .sitemap h3,
html[data-theme="dark"] .sitemap h3 a,
html[data-theme="dark"] .sitemap-links a {
  color: var(--text-muted);
}

html[data-theme="dark"] .sitemap-links a:hover,
html[data-theme="dark"] .sitemap h3 a:hover {
  color: var(--accent);
}

html[data-theme="dark"] .article-downloads,
html[data-theme="dark"] .article-content,
html[data-theme="dark"] code {
  background-color: var(--code-bg);
  color: var(--text);
}

html[data-theme="dark"] .dl-report-btn {
  background: var(--tag-bg);
  color: var(--text-muted);
}

html[data-theme="dark"] .btn-outline {
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .btn-dark {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: #fff;
}

html[data-theme="dark"] .nav-toggle span {
  background: var(--text);
}

html[data-theme="dark"] .page-banner,
html[data-theme="dark"] .notice-bar,
html[data-theme="dark"] .subnav-section,
html[data-theme="dark"] .list-section,
html[data-theme="dark"] .home-feed,
html[data-theme="dark"] .search-hero {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .feed-title,
html[data-theme="dark"] .hot-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .related-title {
  color: var(--text);
}

html[data-theme="dark"] .chip {
  background: var(--tag-bg);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .chip.is-active,
html[data-theme="dark"] .chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .password-box,
html[data-theme="dark"] .password-row code {
  background: var(--card);
  color: var(--text);
  border-color: var(--line);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
