:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #0f1722;
  --muted: #647182;
  --line: #e8edf2;
  --accent: #1f6fe0;
  --accent-soft: #eef4ff;
  --shadow: 0 1px 2px rgba(15, 23, 34, 0.04);
  --shadow-hover: 0 10px 22px rgba(15, 23, 34, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.66;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.feed-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 250, 0.94);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(7px);
}

.feed-topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.topbar-inner {
  min-height: 66px;
  display: grid;
  grid-template-columns: 200px 1fr 300px;
  gap: 14px;
  align-items: center;
}

.logo {
  font-size: 1.26rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.2px;
}

.feed-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.feed-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
}

.feed-nav a:hover {
  text-decoration: none;
  background: var(--surface);
}

.feed-nav a.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
}

.search-box input:focus {
  outline: none;
  border-color: #c8d8ee;
}

.feed-main {
  padding: 24px 0 8px;
}

.feed-intro {
  margin-bottom: 16px;
}

.page-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  letter-spacing: 0.1px;
}

.intro-subtitle {
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.feed-result {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.feed-grid {
  column-count: 2;
  column-gap: 16px;
}

.post-card,
.post-detail,
.related,
.admin article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.post-card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 12px 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-main {
  display: block;
  color: inherit;
}

.card-main:hover {
  text-decoration: none;
}

.keyword-visual {
  background: linear-gradient(145deg, #f3f7fd, #f8fafc);
  border: 1px solid #e6eef7;
  border-radius: 11px;
  min-height: 90px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 2px;
  margin-bottom: 10px;
}

.keyword-visual span {
  font-size: 1.03rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #1b2f52;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-card h2,
.post-detail h1,
.related h2 {
  margin: 0 0 8px;
  line-height: 1.36;
}

.post-card h2 {
  font-size: 1.03rem;
  letter-spacing: 0.1px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

.chips a {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e7edf5;
  background: #fafbfd;
  color: #5b6a7b;
}

.chips a:hover {
  text-decoration: none;
  border-color: #d4dfed;
}

.desc,
.lead {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #2a3644;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.actions {
  margin-top: 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn,
button {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 7px 11px;
  font-size: 0.87rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-secondary {
  background: var(--accent-soft);
  color: #365486;
}

.pager {
  display: flex;
  gap: 8px;
  margin: 6px 0 0;
  padding-bottom: 6px;
}

.pager a {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 34px;
  text-align: center;
  padding: 6px 10px;
  color: var(--text);
  background: #fff;
}

.pager a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.post-page .site-header {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin-bottom: 18px;
  background: #fff;
}

.site-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.post-detail,
.related {
  padding: 16px;
}

.related ul {
  margin: 0;
  padding-left: 20px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding: 16px 0 30px;
  color: var(--muted);
  font-size: 0.87rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
}

.empty {
  color: var(--muted);
}

@media (max-width: 980px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 0;
  }

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

  .feed-grid {
    column-count: 1;
  }
}

@media (max-width: 860px) {
  .container {
    width: calc(100% - 24px);
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}
