/* ==========================================================================
   a2611 「镜像双栏 Tab 风」
   - 文章行：图右文左（镜像排版，区别于常见的图左文右）
   - 侧栏：纯 CSS Tab（radio + label，无 JS 依赖，未选中内容仍在 DOM 中）
   - 配色：暖色大地色系（米黄 / 赭石 / 棕橙）
   ========================================================================== */

:root {
  --earth-bg: #f7f1e6;          /* 米黄底 */
  --earth-panel: #fffaf2;       /* 卡片浅米白 */
  --earth-line: #e6d9c3;        /* 分隔线 */
  --earth-brand: #a0522d;       /* 赭石/棕红（主品牌色） */
  --earth-brand-dark: #7b3f22;
  --earth-accent: #c97b3d;      /* 棕橙强调色 */
  --earth-accent-light: #e8a95c;
  --earth-text: #3b2c22;        /* 深棕文字 */
  --earth-text-sub: #8a7a68;    /* 次要文字 */
  --earth-shadow: 0 2px 10px rgba(122, 79, 42, 0.12);
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--earth-bg);
  color: var(--earth-text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}
img[width][height] {
  height: auto;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  background: linear-gradient(180deg, var(--earth-brand) 0%, var(--earth-brand-dark) 100%);
  color: #fdf6ea;
  box-shadow: var(--earth-shadow);
}

.site-header .top-bar {
  font-size: 12px;
  padding: 6px 0;
  background: rgba(0, 0, 0, 0.12);
  color: #f1e2c8;
}

.site-header .top-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-header .top-bar a {
  color: #f1e2c8;
  margin-left: 14px;
}

.brand-bar {
  padding: 16px 0;
}

.brand-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--earth-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fffaf2;
}

.brand-sub {
  font-size: 12px;
  color: #e9cfa8;
  letter-spacing: 3px;
}

.site-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.site-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.site-nav a {
  display: inline-block;
  padding: 11px 16px;
  font-size: 14px;
  color: #f3e4c8;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  border-bottom-color: var(--earth-accent-light);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Layout grid：镜像双栏（主内容 + 右侧栏）─────────────────────────── */

main {
  display: block;
  padding: 20px 0 40px;
}

.layout-grid {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 面包屑 ─────────────────────────────────────────────────────────── */

.crumb {
  font-size: 13px;
  color: var(--earth-text-sub);
  margin: 0 0 14px;
}

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

.crumb .sep {
  margin: 0 6px;
  color: #c9b697;
}

/* ── 卡片通用 ───────────────────────────────────────────────────────── */

.panel {
  background: var(--earth-panel);
  border: 1px solid var(--earth-line);
  border-radius: var(--radius);
  box-shadow: var(--earth-shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 2px solid var(--earth-accent);
}

.panel-head h2, .panel-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--earth-brand-dark);
  font-weight: 800;
}

.panel-head .more {
  font-size: 12px;
  color: var(--earth-accent);
}

/* ── 头条区（home）────────────────────────────────────────────────────── */

.headline {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  background: var(--earth-panel);
  border: 1px solid var(--earth-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--earth-shadow);
  margin-bottom: 22px;
}

@media (max-width: 720px) {
  .headline { grid-template-columns: 1fr; }
}

.headline-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--earth-accent), var(--earth-brand));
  overflow: hidden;
}

.headline-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headline-body {
  padding: 22px 22px 22px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.headline-cat {
  display: inline-block;
  align-self: flex-start;
  background: var(--earth-accent);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.headline-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--earth-text);
  margin: 0 0 12px;
  line-height: 1.4;
}

.headline-summary {
  font-size: 14px;
  color: var(--earth-text-sub);
  margin: 0 0 14px;
}

.headline-meta {
  font-size: 12px;
  color: var(--earth-text-sub);
  display: flex;
  gap: 14px;
}

/* ── 镜像文章行：图片在右，文字在左 ──────────────────────────────────── */

.mirror-list {
  display: flex;
  flex-direction: column;
}

.mirror-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--earth-line);
  transition: background 0.15s ease;
}

.mirror-row:last-child {
  border-bottom: none;
}

.mirror-row:hover {
  background: #fbf3e3;
}

@media (max-width: 600px) {
  .mirror-row {
    grid-template-columns: 1fr 110px;
    gap: 12px;
    padding: 14px;
  }
}

/* 文字块在左（DOM 顺序中第一个） */
.mirror-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: 1;
}

/* 图片块在右（DOM 顺序中第二个，flex/grid 天然顺排，无需 order 也已是右侧） */
.mirror-media {
  order: 2;
  width: 200px;
  aspect-ratio: 5 / 3;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8d9bd, #cfa876);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .mirror-media {
    width: 110px;
  }
}

.mirror-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 5 / 3;
}

.mirror-cat {
  display: inline-block;
  font-size: 11px;
  color: var(--earth-brand);
  background: #f1e2c8;
  padding: 2px 8px;
  border-radius: 3px;
  align-self: flex-start;
  margin-bottom: 6px;
}

.mirror-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--earth-text);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mirror-summary {
  font-size: 13px;
  color: var(--earth-text-sub);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mirror-meta {
  font-size: 12px;
  color: #a99a86;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── 侧栏纯 CSS Tab ─────────────────────────────────────────────────── */

.tabset {
  position: relative;
}

.tabset .tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-labels {
  display: flex;
  border-bottom: 2px solid var(--earth-accent);
}

.tab-labels label {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--earth-text-sub);
  cursor: pointer;
  background: #f1e6d2;
  border-right: 1px solid var(--earth-line);
  user-select: none;
}

.tab-labels label:last-child {
  border-right: none;
}

/* 默认（无 JS / 未点击时）第一个 tab 视觉上高亮，且其内容默认展示 */
#tab-hot:checked ~ .tab-labels label[for="tab-hot"],
#tab-latest:checked ~ .tab-labels label[for="tab-latest"] {
  background: var(--earth-panel);
  color: var(--earth-brand-dark);
  border-bottom: 2px solid var(--earth-panel);
  margin-bottom: -2px;
}

.tab-panels {
  background: var(--earth-panel);
}

/* 两个面板始终都渲染在 DOM 中（供爬虫抓取），仅通过 CSS 视觉隐藏未选中的一个 */
.tab-panel {
  display: none;
  padding: 6px 0;
}

#tab-hot:checked ~ .tab-panels .tab-panel[data-panel="hot"],
#tab-latest:checked ~ .tab-panels .tab-panel[data-panel="latest"] {
  display: block;
}

/* 无 JS / 无 CSS 兜底：如果两个 radio 都未被选中状态无法识别，
   默认让第一个 input 处于 checked（由 Razor 渲染时打上 checked 属性），
   保证首屏至少一个 tab 内容可见可抓取 */

.sb-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--earth-line);
}

.sb-item:last-child {
  border-bottom: none;
}

.sb-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #cbb99a;
}

.sb-num.top {
  background: var(--earth-accent);
}

.sb-item a {
  font-size: 13.5px;
  color: var(--earth-text);
  display: block;
  line-height: 1.5;
}

.sb-item a:hover {
  color: var(--earth-brand);
}

.sb-sub {
  font-size: 11px;
  color: var(--earth-text-sub);
}

/* ── 侧栏分类导航 / 标签 ─────────────────────────────────────────────── */

.sb-cats {
  padding: 6px 0;
}

.sb-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  font-size: 13.5px;
  color: var(--earth-text);
  border-bottom: 1px dashed var(--earth-line);
}

.sb-cats a:last-child { border-bottom: none; }

.sb-cats a:hover { color: var(--earth-brand); }

.tag-cloud {
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a, .tag-cloud span {
  font-size: 12px;
  background: #f1e2c8;
  color: var(--earth-brand-dark);
  padding: 5px 11px;
  border-radius: 14px;
}

.ad-slot {
  border: 1px dashed var(--earth-line);
  border-radius: var(--radius);
  padding: 24px 12px;
  text-align: center;
  color: #b9a88d;
  font-size: 12px;
  background: #fbf5e9;
}

/* ── 分页 ───────────────────────────────────────────────────────────── */

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 22px 0 4px;
}

.pager a, .pager .current, .pager .dots {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  background: var(--earth-panel);
  border: 1px solid var(--earth-line);
  color: var(--earth-text);
}

.pager a:hover {
  border-color: var(--earth-accent);
  color: var(--earth-brand);
}

.pager .current {
  background: var(--earth-brand);
  border-color: var(--earth-brand);
  color: #fff;
  font-weight: 700;
}

.pager .dots {
  border: none;
  background: none;
  color: var(--earth-text-sub);
}

.pager-info {
  text-align: center;
  font-size: 12px;
  color: var(--earth-text-sub);
  margin: 4px 0 0;
}

/* ── 文章详情页 ─────────────────────────────────────────────────────── */

.article-card {
  padding: 24px;
}

.article-h1 {
  font-size: 25px;
  font-weight: 900;
  color: var(--earth-text);
  margin: 10px 0 14px;
  line-height: 1.45;
}

.article-cat-badge {
  display: inline-block;
  background: var(--earth-accent);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--earth-text-sub);
  border-bottom: 1px solid var(--earth-line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.article-figure {
  margin: 0 0 18px;
  border-radius: 8px;
  overflow: hidden;
}

.article-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-body {
  font-size: 16px;
  color: #423226;
  line-height: 1.9;
}

.article-body img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 6px;
  margin: 10px 0;
  display: block;
}

.article-tags {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--earth-line);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.article-tags .label {
  font-size: 12.5px;
  color: var(--earth-text-sub);
}

.article-tags .tag-item {
  font-size: 12px;
  background: #f1e2c8;
  color: var(--earth-brand-dark);
  padding: 4px 11px;
  border-radius: 14px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  background: #3c2a1c;
  color: #d9c6a8;
  padding: 30px 0 18px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.footer-cols h4 {
  color: #eeddc0;
  font-size: 14px;
  margin: 0 0 10px;
}

.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-cols li {
  margin-bottom: 6px;
}

.footer-cols a {
  color: #cbb794;
  font-size: 12.5px;
}

.footer-cols a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #a89275;
}
