/* ==========================================================================
   Editorial theme — 编辑部杂志风
   仅视觉层：保留全部 JS 依赖的类名 / ID / --color1 变量槽位
   ========================================================================== */

:root {
  --color1: #145f39; /* 模板工具会替换此变量：用作点缀色，不承担正文对比度 */
  --color2: #eba0c6; /* 深墨蓝，标题与强调文字 */
  --paper: #f7f4ed;
  --paper-2: #fffdf8;
  --ink: #1c1b19;
  --ink-soft: #3d3a35;
  --muted: #756f66;
  --line: #ded8cc;
  --line-strong: #b8ae9e;
  --serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

ul,
li {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--color1);
  color: var(--ink);
}

.fixed {
  position: fixed;
}

.dsn {
  display: none;
}

main {
  margin-bottom: 72px;
}

.page-content {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Header — 细顶线 + 刊名标识
   -------------------------------------------------------------------------- */

.header {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  height: 76px;
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--color1);
  border-bottom: 1px solid rgba(28, 27, 25, 0.12);
}

.header.scrolled {
  box-shadow: 0 6px 24px rgba(28, 27, 25, 0.07);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo::before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--color1);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}

.logo p {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}

.sidebar-toggle svg {
  width: 21px;
  height: 21px;
}

.back-button-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.back-button-header:hover {
  color: var(--ink);
  border-color: var(--color1);
}

.back-button-header svg {
  width: 17px;
  height: 17px;
}

/* --------------------------------------------------------------------------
   Search — 单线输入框
   -------------------------------------------------------------------------- */

.search-bar {
  position: relative;
  z-index: 999;
  background: transparent;
  transition: padding 0.25s ease;
  padding-bottom: 15px;
}

.search-bar.fixed {
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  background: rgba(247, 244, 237, 0.96);
  border-bottom: 1px solid var(--line);
  animation: slideDown 0.25s ease;
  backdrop-filter: blur(10px);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.search-container {
  display: flex;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-input {
  width: 100%;
  max-width: 760px;
  padding: 15px 52px 15px 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input::placeholder {
  color: var(--muted);
  font-style: italic;
}

.search-input:focus {
  border-bottom-color: var(--color2);
}

.search-icon {
  position: absolute;
  right: calc(50% - 380px + 12px);
  top: 50%;
  z-index: 2;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

.search-clear {
  position: absolute;
  right: calc(50% - 380px + 8px);
  top: 50%;
  display: none;
  padding: 6px;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}

.search-clear:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.search-clear svg {
  width: 15px;
  height: 15px;
}

.search-results-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 10px auto 0;
  padding: 12px 20px;
  background: var(--paper-2);
  border-left: 3px solid var(--color1);
}

.search-results-info {
  color: var(--muted);
  font-size: 13px;
}

.search-results-info span {
  color: var(--ink);
  font-weight: 700;
}

.clear-search-btn {
  padding: 7px 14px;
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--ink);
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.clear-search-btn:hover {
  background: var(--color2);
}

/* --------------------------------------------------------------------------
   Category bar — 文字标签 + 下划线
   -------------------------------------------------------------------------- */

.categories-title {
  margin: 30px 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.categories-title::before {
  display: none;
}

.category-bar {
  padding: 0 20px;
  overflow-x: auto;
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.category-container {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 9px 0;
  flex-wrap: nowrap;
}

.category-btn {
  position: relative;
  flex-shrink: 0;
  width: auto;
  height: auto;
  padding: 7px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.category-btn:hover {
  color: var(--ink);
}

.category-btn.active {
  color: var(--ink);
  background: var(--color1);
}

.category-btn.active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  background: var(--color2);
}

.category-name {
  font-size: inherit;
  font-weight: inherit;
}

/* --------------------------------------------------------------------------
   Layout + 双栏卡片流
   -------------------------------------------------------------------------- */

.home-page-content,
.category-page-content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.articles-container {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.home-page-content .articles-container::before {
  content: "Latest Stories";
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 24px;
  padding-bottom: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-left: 12px;
  border-bottom: 3px solid var(--ink);
  border-left: 5px solid var(--color1);
  box-shadow: 0 3px 0 var(--color1);
}

#articlesGrid,
#categoryArticlesGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 30px;
  padding: 0;
}

.home_article-item {
  display: flex;
  min-width: 0;
  margin: 0;
}

.home_article-item:hover {
  transform: none;
}


.ads {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.ads > div {
  display: flex;
  justify-content: center;
  align-items: center;
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
  padding: 0 0 18px;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}

.article-card:active {
  transform: none;
}

.article-card::before,
.article-card::after,
.article-image::before,
.article-image::after,
.article-content::before,
.article-arrow::before {
  display: none;
}

.article-card:hover {
  border-bottom-color: var(--color1);
  box-shadow: none;
  transform: none;
}

.article-image {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9e3d7;
  border: 1px solid var(--line);
  border-top: 3px solid var(--color1);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.04);
}

.article-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-top: 16px;
}

.article-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.article-title::first-letter {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.article-card:hover .article-title {
  color: var(--color2);
}

.article-summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-summary::before {
  display: none;
}

.article-arrow {
  position: absolute;
  right: 0;
  bottom: 18px;
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.article-card:hover .article-arrow {
  color: var(--ink);
  transform: translateX(3px);
}

.article-arrow svg {
  width: 19px;
  height: 19px;
  filter: none;
}

.article-type-tag {
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 8px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--color1);
  border: 1px solid var(--line-strong);
}

.article-meta,
.article-type,
.article-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.article-meta {
  gap: 12px;
}

.article-type {
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Featured — 编辑精选
   -------------------------------------------------------------------------- */

.featured-section {
  margin: 54px 0 10px;
  padding: 18px 0 0;
  background: transparent;
  border: 0;
  border-top: 3px solid var(--ink);
  box-shadow: none;
}

.featured-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.featured-icon {
  font-size: 18px;
  animation: none;
}

.featured-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
}

.featured-header::after {
  content: "";
  flex: 1;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color1) 0,
    var(--color1) 60px,
    var(--line) 60px,
    var(--line) 100%
  );
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.featured-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(28, 27, 25, 0.08);
  border-color: var(--line-strong);
}

.featured-image {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9e3d7;
  border-top: 3px solid var(--color1);
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.featured-card:hover .featured-image img {
  transform: scale(1.05);
}

.featured-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--color1);
  border: 1px solid var(--line-strong);
}

.featured-content {
  padding: 15px 16px 18px;
}

.featured-title-text {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-card:hover .featured-title-text {
  color: var(--color2);
}

.featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.featured-type {
  padding: 2px 7px;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
}

/* --------------------------------------------------------------------------
   Detail — 阅读页
   -------------------------------------------------------------------------- */

.detail-page-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

.article-detail {
  width: 100%;
  padding: 42px 0 20px;
}

.article-header {
  padding-bottom: 22px;
  text-align: left;
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--color1);
}

.article-header::before {
  content: "Feature Story";
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--color2);
}

.article-detail-title {
  margin: 0 0 0px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.article-meta-top,
.article-meta-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
}

.article-meta-top span,
.article-meta-bottom span {
  margin: 0;
}

.article-meta-top span:not(:last-child)::after {
  content: "·";
  margin-left: 18px;
  color: var(--line-strong);
}

.article-detail-content {
  line-height: 1.9;
  color: var(--ink-soft);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.article-item {
  width: 100%;
  margin-bottom: 26px;
  padding: 0;
}

.article-item p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.9;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.article-item:first-child p:first-child::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  color: var(--color2);
  font-family: var(--serif);
  font-size: 62px;
  line-height: 0.82;
}

.article-item h1,
.article-item h2,
.article-item h3,
.article-item h4,
.article-item h5,
.article-item h6,
.article-detail-content h3 {
  margin: 34px 0 14px;
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.3;
}

.article-item h3,
.article-detail-content h3 {
  padding-bottom: 8px;
  font-size: 23px;
  border-bottom: 1px solid var(--line);
}

.article-item ul,
.article-item ol,
.article-detail-content ul,
.article-detail-content ol {
  margin: 18px 0;
  padding-left: 26px;
  list-style: disc;
}

.article-item li,
.article-detail-content li {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.article-item strong,
.article-detail-content strong {
  color: var(--ink);
  font-weight: 700;
}

.article-detail-content p {
  margin-bottom: 16px;
  color: var(--ink-soft);
}

.article-detail-content img,
.article-detail-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  margin: 24px 0;
  object-fit: contain;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 0;
}

.article-detail-section {
  margin-top: 30px;
  padding: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--color1);
}

.article-detail-section p {
  color: var(--ink-soft);
  font-size: 16px;
  text-align: left;
}

.article-item table,
.article-detail-content table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.article-detail-content th,
.article-detail-content td {
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  white-space: normal !important;
  border-bottom: 1px solid var(--line);
}

.article-detail-content th {
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--ink);
}

.article-detail-content td {
  color: var(--ink-soft);
}

.table-responsive {
  width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--paper);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

.recommended-section {
  margin-top: 46px;
  padding-top: 0;
  border-top: 3px solid var(--ink);
}

.recommended-section::before {
  content: "Keep Reading";
  display: block;
  margin: 18px 0 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
}

.recommended-articles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
}

.recommended-articles > p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

.error-message {
  padding: 30px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  text-align: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--color1);
}

.article-meta,
.article-actions {
  margin: 20px 0;
}

.back-button {
  padding: 9px 16px;
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  border: 0;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Category page
   -------------------------------------------------------------------------- */

.category-page-content {
  padding-top: 28px;
}

.category-page-content > .ads {
  margin-bottom: 28px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 0 0 40px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 8px 20px rgba(28, 27, 25, 0.06);
}

.category-card-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: var(--color1);
  border: 1px solid var(--line-strong);
}

.category-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--ink);
}

.category-card-content {
  flex: 1;
}

.category-card-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.category-card-count {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-card-arrow {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.category-card:hover .category-card-arrow {
  color: var(--ink);
  transform: translateX(3px);
}

.category-card-arrow svg {
  width: 18px;
  height: 18px;
}

.current-category-articles {
  width: 100%;
}

.current-category-articles::before {
  content: "Articles";
  display: block;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   About / Privacy
   -------------------------------------------------------------------------- */

.about-page,
.privacy-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 20px;
}

.about-header,
.privacy-header {
  margin-bottom: 30px;
  padding: 0 0 26px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 3px solid var(--ink);
  box-shadow: none;
}

.about-header h1,
.privacy-header h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-header p,
.privacy-header p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
}

.about-content,
.privacy-content {
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.about-section,
.privacy-section {
  padding: 30px 34px;
  border-bottom: 1px solid var(--line);
}

.about-section:last-child,
.privacy-section:last-child {
  border-bottom: 0;
}

.about-section h2,
.privacy-section h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
}

.about-section h3,
.privacy-section h3 {
  margin: 26px 0 12px;
  color: var(--color2);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.about-section p,
.privacy-section p,
.about-section li,
.privacy-section li {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.85;
}

.about-section p,
.privacy-section p {
  margin: 0 0 14px;
}

.about-section ul,
.privacy-section ul {
  margin: 14px 0;
  padding-left: 22px;
  list-style: disc;
}

.about-section li,
.privacy-section li {
  margin-bottom: 8px;
  list-style: disc;
}

.privacy-section strong {
  color: var(--ink);
}

.values-grid,
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.value-item,
.item,
.contact-item {
  padding: 20px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.value-item:hover,
.item:hover,
.contact-item:hover {
  border-color: var(--color1);
  transform: none;
  box-shadow: none;
}

.value-icon,
.item-icon {
  margin-bottom: 12px;
  font-size: 30px;
}

.value-item h3,
.item h3,
.contact-details h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}

.value-item p,
.item p,
.contact-details p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-size: 22px;
  background: var(--color1);
  border: 1px solid var(--line-strong);
}

/* --------------------------------------------------------------------------
   States — 空状态 / 加载 / 错误
   -------------------------------------------------------------------------- */

.empty-state {
  padding: 70px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-icon,
.error-icon,
.loading-icon,
.notice-icon,
.default-icon {
  margin-bottom: 14px;
  font-size: 38px;
  opacity: 0.7;
}

.empty-state-text,
.error-text,
.loading-text,
.notice-text,
.default-text {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
}

.empty-state-subtext,
.notice-subtext,
.default-subtext {
  color: var(--muted);
  font-size: 13px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-state,
.loading-state,
.cache-notice,
.default-categories {
  grid-column: 1 / -1;
  padding: 44px 20px;
  text-align: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--color1);
}

.retry-btn,
.refresh-btn {
  margin-top: 18px;
  padding: 9px 18px;
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  border: 0;
  cursor: pointer;
}

.retry-btn:hover,
.refresh-btn:hover {
  background: var(--color2);
}

.random-redirect-notice {
  margin: 26px 0;
  padding: 30px;
  text-align: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--color1);
  box-shadow: none;
}

.redirect-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.redirect-icon {
  font-size: 40px;
}

.redirect-text h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
}

.redirect-text p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.redirect-countdown {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
}

.redirect-cancel-btn {
  padding: 10px 20px;
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  border: 0;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.sidebar-menu {
  position: fixed;
  top: 0;
  right: -100%;
  z-index: 2000;
  display: none;
  width: 100%;
  height: 100vh;
  transition: right 0.3s ease;
}

.sidebar-menu.active {
  right: 0;
  display: block;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1999;
  display: none;
  background: rgba(28, 27, 25, 0.45);
  cursor: pointer;
  backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
  display: block;
}

.sidebar-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--paper-2);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(28, 27, 25, 0.14);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 22px;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  border-bottom: 3px solid var(--color1);
}

.sidebar-header h3 {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-close svg {
  width: 19px;
  height: 19px;
}

.sidebar-items {
  padding-bottom: 30px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  min-height: 50px;
  height: auto;
  padding: 13px 22px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, background 0.2s ease;
}

.sidebar-item:hover {
  padding-left: 26px;
  color: var(--ink);
  background: var(--paper);
  transform: none;
  box-shadow: none;
}

.sidebar-item svg {
  color: var(--muted);
}

.sidebar-item:hover svg {
  color: var(--ink);
  transform: none;
}

.sidebar-item span {
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-item.active {
  color: var(--ink);
  font-weight: 700;
  background: var(--paper);
  border-left: 3px solid var(--color1);
  box-shadow: none;
}

.sidebar-category {
  margin: 0;
}

.sidebar-category-title {
  padding: 22px 22px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Footer + floating button
   -------------------------------------------------------------------------- */

.footer {
  width: 100%;
  margin-top: 50px;
  color: var(--muted);
  background: var(--paper);
  border-top: 3px solid var(--ink);
}

.footer-content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 20px 34px;
  text-align: center;
  box-sizing: border-box;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 18px;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink);
  border-bottom: 2px solid var(--color1);
}

.footer-copyright {
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Legacy section hooks (保留样式，当前页面未使用)
   -------------------------------------------------------------------------- */

.top-articles-section,
.random-articles-section {
  margin: 30px 0;
}

.top-articles-title,
.random-articles-title {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
}

.top-articles-title::before,
.random-articles-title::before {
  display: none;
}

.top-articles-list,
.random-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.top-article-item,
.random-article-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  cursor: pointer;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.top-article-item:hover,
.random-article-item:hover {
  border-color: var(--color1);
  transform: none;
}

.top-article-item::after,
.random-article-item::after {
  display: none;
}

.top-article-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  background: var(--ink);
}

.top-article-title,
.random-article-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.random-article-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #e9e3d7;
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .header {
    height: 66px;
    padding: 0 16px;
  }

  .logo p {
    font-size: 19px;
  }

  .search-input {
    font-size: 19px;
  }

  .search-icon,
  .search-clear {
    right: 4px;
  }

  #articlesGrid,
  #categoryArticlesGrid {
    gap: 28px 20px;
  }

  .article-title {
    font-size: 19px;
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommended-articles {
    gap: 24px 18px;
  }

  .about-section,
  .privacy-section {
    padding: 24px 22px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .header-content,
  .home-page-content,
  .category-page-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .search-bar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .search-input {
    font-size: 17px;
  }

  .category-bar {
    padding: 0 12px;
  }

  .home-page-content .articles-container::before {
    font-size: 22px;
  }

  #articlesGrid,
  #categoryArticlesGrid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  #articlesGrid > .ads,
  #categoryArticlesGrid > .ads {
    grid-column: auto;
  }

  .article-title {
    font-size: 21px;
  }

  .featured-grid,
  .recommended-articles {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-page-content {
    padding: 0 16px;
  }

  .article-detail {
    padding-top: 28px;
  }

  .article-item p,
  .article-detail-content p {
    font-size: 16px;
  }

  .about-page,
  .privacy-page {
    padding: 28px 16px;
  }

  .footer-links {
    gap: 20px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
