:root {
  --bg: #f7f4ef;
  --bg-elevated: #fffdf9;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e0d6;
  --brand: #0f766e;
  --brand-deep: #115e59;
  --brand-soft: #ccfbf1;
  --accent: #c2410c;
  --shadow: 0 12px 36px rgba(28, 25, 23, 0.07);
  --radius: 14px;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 8% -8%, rgba(15, 118, 110, 0.1), transparent 55%),
    radial-gradient(800px 360px at 100% 0%, rgba(194, 65, 12, 0.06), transparent 50%),
    linear-gradient(180deg, #fbf8f3 0%, var(--bg) 42%, #f3efe8 100%);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(251, 248, 243, 0.88);
  border-bottom: 1px solid rgba(231, 224, 214, 0.9);
}

.header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  color: #ecfdf5;
  font-family: var(--font-display);
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.72rem;
}

.header-search .search-bar {
  margin-top: 0;
  max-width: 100%;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  max-width: 34rem;
}

.search-bar input {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.search-bar button,
.btn {
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #ecfdf5;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}

.search-bar button:hover,
.btn:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
}

.portal {
  padding: 1.1rem 0 2.5rem;
}

.dir-panel,
.feed-panel,
.hot-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dir-panel {
  overflow: hidden;
  margin-bottom: 1rem;
  animation: rise 0.45s ease both;
}

.dir-table {
  width: 100%;
  border-collapse: collapse;
}

.dir-table tr + tr th,
.dir-table tr + tr td {
  border-top: 1px solid var(--line);
}

.dir-table th {
  width: 5.5rem;
  padding: 0.85rem 0.9rem;
  text-align: left;
  vertical-align: top;
  background: linear-gradient(180deg, #f0fdfa, #ecfdf5);
  font-size: 0.95rem;
  white-space: nowrap;
}

.dir-table th a {
  color: var(--brand-deep);
  font-weight: 700;
}

.dir-table th a:hover {
  color: var(--accent);
}

.dir-table td {
  padding: 0.75rem 0.9rem;
  vertical-align: middle;
}

.dir-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.95rem;
}

.dir-links a {
  color: var(--muted);
  font-size: 0.92rem;
}

.dir-links a:hover {
  color: var(--accent);
}

.portal-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 1rem;
  align-items: start;
}

.feed-panel,
.hot-panel {
  padding: 0.95rem 1.05rem 1.1rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--brand-soft);
}

.panel-title h1,
.panel-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: 1.25rem;
  color: var(--brand-deep);
}

.panel-title h1 {
  font-size: 1.45rem;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.crumb a:hover {
  color: var(--brand-deep);
}

.cat-desc {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.subcat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--line);
}

.subcat-links a {
  color: var(--brand-deep);
  font-size: 0.92rem;
}

.subcat-links a:hover {
  color: var(--accent);
}

.article-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.article-item:first-child {
  padding-top: 0.15rem;
}

.article-item:last-child {
  border-bottom: 0;
  padding-bottom: 0.15rem;
}

.article-thumb {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--brand-soft), #fff7ed);
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-item h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  color: var(--brand-deep);
}

.article-item h3:hover {
  color: var(--accent);
}

.article-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  margin-top: 0.4rem;
  color: #a8a29e;
  font-size: 0.78rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hot-list li {
  border-bottom: 1px dashed var(--line);
}

.hot-list li:last-child {
  border-bottom: 0;
}

.hot-list a {
  display: block;
  padding: 0.55rem 0;
  color: var(--ink);
  font-size: 0.9rem;
}

.hot-list a:hover {
  color: var(--accent);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-cloud a,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 0.8rem;
}

.tag-cloud a:hover {
  background: #99f6e4;
}

.pager {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1.1rem;
  flex-wrap: wrap;
  align-items: center;
}

.pager a,
.pager-disabled {
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.pager a.active,
.pager a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #ecfdf5;
}

.pager-disabled {
  opacity: 0.45;
}

.article-body h1 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 3.5vw, 2.05rem);
  letter-spacing: 0.03em;
  color: var(--brand-deep);
}

.prose {
  font-size: 1.02rem;
  line-height: 1.85;
}

.prose h2 {
  margin: 1.4rem 0 0.65rem;
  font-size: 1.15rem;
  color: var(--brand-deep);
}

.prose p,
.prose ul,
.prose ol {
  margin: 0.75rem 0;
}

.related-block {
  margin-top: 1.75rem;
  padding-top: 0.5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--brand-deep);
}

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

.error {
  color: #b91c1c;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .header-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .portal-split {
    grid-template-columns: 1fr;
  }

  .dir-table,
  .dir-table tbody,
  .dir-table tr,
  .dir-table th,
  .dir-table td {
    display: block;
    width: 100%;
  }

  .dir-table th {
    border-bottom: 0;
    padding-bottom: 0.2rem;
  }

  .dir-table td {
    padding-top: 0.35rem;
  }

  .article-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .article-thumb {
    width: 72px;
    height: 56px;
  }
}
