/* ============================================================
   一起讨个说法 · 墨绿纸白编辑刊
   设计 token：纸白底 / 墨绿主色 / 衬线标题 / 发丝线 / 三档圆角
   ============================================================ */

:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --ink: #17211b;
  --muted: #66706a;
  --faint: #99a19a;
  --line: #e6e4dc;
  --line-strong: #d8d5cb;

  --green: #14563c;
  --green-deep: #0e3a28;
  --green-bright: #1e7a52;
  --green-soft: #e9f1ec;
  --green-mist: #f2f7f3;
  --ivory: #f4f1e8;
  --warm: #faf8f2;

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-card: 0 1px 2px rgba(23, 33, 27, 0.04);
  --shadow-lift: 0 14px 32px rgba(14, 58, 40, 0.1);
  --shadow-pop: 0 18px 44px rgba(14, 58, 40, 0.16);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --container: 1200px;
}

/* ---------- 基础 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 420px at 85% -120px, rgba(30, 122, 82, 0.05), transparent 70%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input {
  font: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--green);
  color: var(--ivory);
}

:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid var(--paper);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--green-bright);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--green-deep);
  color: var(--ivory);
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
}

.topbar__spacer {
  flex: 1;
}

.topbar__slogan {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.topbar__date {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 品牌头部 ---------- */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--green);
  transition: transform 0.25s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(-4deg) scale(1.04);
}

.brand__text {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.brand__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}

.brand__tagline {
  position: relative;
  padding-left: 14px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.brand__tagline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--line-strong);
}

/* ---------- 页面骨架 ---------- */

.page {
  padding-block: 30px 64px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.section-head h1,
.section-head h2 {
  position: relative;
  padding-left: 15px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.section-head h1::before,
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 21px;
  border-radius: 3px;
  background: var(--green);
}

/* ---------- 笔记瀑布流 ---------- */

.note-grid {
  column-count: 2;
  column-gap: 22px;
}

.note-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  vertical-align: top;
  break-inside: avoid;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  container-type: inline-size;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.note-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

.note-card__cover {
  display: block;
  padding: 20px 20px 18px;
  background: var(--cover-bg, var(--surface));
  color: var(--cover-ink, var(--ink));
}

.note-card__no {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cover-accent, var(--green));
  font-variant-numeric: tabular-nums;
}

.note-card__no::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cover-line, var(--line));
}

.note-card__title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
}

.note-card:hover .note-card__title {
  color: var(--cover-accent, var(--green));
}

.note-card__excerpt {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--cover-muted, var(--muted));
}

.note-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--cover-line, var(--line));
  background: var(--meta-bg, var(--surface));
}

.note-card__tag {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  background: var(--tag-bg, var(--green-soft));
  color: var(--tag-ink, var(--green));
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.note-card__tag:hover {
  background: var(--green);
  color: var(--ivory);
}

.note-card__readtime {
  font-size: 12px;
  color: var(--cover-faint, var(--faint));
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 色调：白 / 绿雾 / 白 / 暖纸 / 墨绿 */
.note-card[data-tone="2"] {
  --cover-bg: var(--green-mist);
}
.note-card[data-tone="4"] {
  --cover-bg: var(--warm);
}
.note-card[data-tone="5"] {
  --cover-bg: var(--green-deep);
  --cover-ink: var(--ivory);
  --cover-muted: rgba(244, 241, 232, 0.72);
  --cover-faint: rgba(244, 241, 232, 0.5);
  --cover-accent: #8fc7a8;
  --cover-line: rgba(244, 241, 232, 0.16);
  --meta-bg: #0b3020;
  --tag-bg: rgba(244, 241, 232, 0.12);
  --tag-ink: #bfe0cd;
  border-color: var(--green-deep);
}
.note-card[data-tone="5"]:hover .note-card__title {
  color: #ffffff;
}
.note-card[data-tone="5"] .note-card__tag:hover {
  background: var(--ivory);
  color: var(--green-deep);
}

@container (max-width: 200px) {
  .note-card__cover {
    padding: 15px 14px 14px;
  }
  .note-card__no {
    margin-bottom: 8px;
    font-size: 12px;
    gap: 8px;
  }
  .note-card__title {
    margin-bottom: 6px;
    font-size: 16px;
    line-height: 1.45;
  }
  .note-card__excerpt {
    font-size: 12.5px;
    line-height: 1.65;
  }
  .note-card__meta {
    gap: 6px;
    padding: 9px 12px;
  }
  .note-card__tag {
    padding: 3px 9px;
    font-size: 11.5px;
  }
  .note-card__readtime {
    font-size: 11.5px;
  }
}

/* ---------- 筛选提示条 ---------- */

.filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--green-soft);
  border: 1px solid rgba(20, 86, 60, 0.14);
  border-radius: var(--r-sm);
}

.filterbar__text {
  font-size: 13px;
  color: var(--green-deep);
  line-height: 1.6;
  min-width: 0;
  overflow-wrap: anywhere;
}

.filterbar__text strong {
  font-weight: 700;
}

.filterbar__count {
  margin-left: 6px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.filterbar__clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.filterbar__clear svg {
  width: 13px;
  height: 13px;
}

.filterbar__clear:hover {
  color: var(--green);
  border-color: var(--green);
}

/* ---------- 404 ---------- */

.nf {
  display: grid;
  grid-template-areas:
    "title code"
    "text code"
    "actions code";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 40px;
  margin-bottom: 44px;
  padding: 40px 48px;
  overflow: hidden;
  background:
    radial-gradient(620px 280px at 100% 0%, rgba(244, 241, 232, 0.09), transparent 70%),
    var(--green-deep);
  border-radius: var(--r-lg);
  color: var(--ivory);
}

.nf__code {
  grid-area: code;
  font-family: var(--serif);
  font-size: clamp(104px, 15vw, 176px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: rgba(244, 241, 232, 0.17);
  user-select: none;
}

.nf h1 {
  grid-area: title;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.nf__text {
  grid-area: text;
  max-width: 38em;
  margin-top: 10px;
  font-size: 15px;
  color: rgba(244, 241, 232, 0.74);
}

.nf__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.nf__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background: var(--ivory);
  color: var(--green-deep);
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.nf__btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.nf__btn:focus-visible {
  outline-color: var(--ivory);
}

.nf__btn--ghost {
  background: transparent;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(244, 241, 232, 0.34);
}

.nf__btn--ghost:hover {
  background: rgba(244, 241, 232, 0.07);
  box-shadow: inset 0 0 0 1px rgba(244, 241, 232, 0.7);
}

/* ---------- 空状态 ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 60px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}

.empty-state h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- 分页 ---------- */

.pager {
  margin-top: 32px;
}

.pager__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pager__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.pager__link svg {
  width: 15px;
  height: 15px;
}

a.pager__link:hover {
  color: var(--green);
  border-color: var(--green);
  transform: translateY(-1px);
}

.pager__link.is-current {
  background: var(--green);
  border-color: var(--green);
  color: var(--ivory);
  font-weight: 700;
}

.pager__link.is-disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------- 网站地图 ---------- */

.sitemap__intro {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.sitemap .tagcloud {
  margin-bottom: 6px;
}

.sitemap__group {
  margin-top: 34px;
}

.sitemap__group h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.sitemap__group h2 span {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}

.sitemap__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 36px;
  list-style: none;
}

.sitemap__list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
  line-height: 1.6;
}

.sitemap__list a {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.sitemap__list a:hover {
  color: var(--green);
  text-decoration: underline;
}

.sitemap__list time {
  flex: none;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* ---------- 侧栏 ---------- */

.aside {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.widget__head {
  margin-bottom: 14px;
}

.widget__head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.widget__head h2::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green);
  flex: none;
}

/* 热门列表 */

.hotlist {
  counter-reset: hot;
}

.hotlist li {
  counter-increment: hot;
  border-bottom: 1px solid var(--line);
}

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

.hotlist a {
  position: relative;
  display: block;
  padding: 10px 0 10px 30px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}

.hotlist a::before {
  content: counter(hot, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 11px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--green-bright);
  font-variant-numeric: tabular-nums;
}

.hotlist li:first-child a::before {
  color: var(--green);
}

.hotlist a:hover {
  color: var(--green);
}

/* 标签云 */

.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tagcloud a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.tagcloud a:hover {
  color: var(--green);
  border-color: var(--green);
  transform: translateY(-1px);
}

.tagcloud a.is-active {
  background: var(--green);
  border-color: var(--green);
  color: var(--ivory);
  font-weight: 600;
}

/* ---------- 文章页 ---------- */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

.article {
  min-width: 0;
}

.breadcrumb {
  margin-bottom: 16px;
}

.breadcrumb__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.breadcrumb__back svg {
  width: 14px;
  height: 14px;
}

.breadcrumb__back:hover {
  color: var(--green);
}

/* 文章头（文字封面） */

.article-hero {
  padding: clamp(24px, 3.5vw, 36px);
  background: var(--cover-bg, var(--surface));
  color: var(--cover-ink, var(--ink));
  border: 1px solid var(--cover-line, var(--line));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.article-hero[data-tone="2"] {
  --cover-bg: var(--green-mist);
}
.article-hero[data-tone="4"] {
  --cover-bg: var(--warm);
}
.article-hero[data-tone="5"] {
  --cover-bg: var(--green-deep);
  --cover-ink: var(--ivory);
  --cover-muted: rgba(244, 241, 232, 0.75);
  --cover-faint: rgba(244, 241, 232, 0.55);
  --cover-accent: #8fc7a8;
  --cover-line: rgba(244, 241, 232, 0.16);
  --tag-bg: rgba(244, 241, 232, 0.12);
  --tag-ink: #bfe0cd;
  border-color: var(--green-deep);
}

.article__tag {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--tag-bg, var(--green-soft));
  color: var(--tag-ink, var(--green));
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.article__tag:hover {
  background: var(--green);
  color: var(--ivory);
}

.article-hero[data-tone="5"] .article__tag:hover {
  background: var(--ivory);
  color: var(--green-deep);
}

.article__title {
  margin: 15px 0 12px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.article__lead {
  font-size: 16px;
  line-height: 1.85;
  color: var(--cover-muted, var(--muted));
}

.article-hero__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--cover-line, var(--line));
  font-size: 12.5px;
  color: var(--cover-faint, var(--faint));
}

.article-hero__author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.article-hero__author::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* 正文纸面 */

.article-sheet {
  margin-top: 20px;
  padding: clamp(22px, 3.5vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.keypoints {
  padding: 20px 22px;
  background: var(--green-soft);
  border: 1px solid rgba(20, 86, 60, 0.12);
  border-radius: var(--r-md);
}

.keypoints h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--green-deep);
}

.keypoints h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: var(--green);
}

.keypoints li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
}

.keypoints li + li {
  margin-top: 6px;
}

.keypoints li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--green-bright);
}

.article-body {
  margin-top: 30px;
}

.article-body h2 {
  position: relative;
  margin: 1.9em 0 0.75em;
  padding-left: 14px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.45;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--green);
}

.article-body section:first-child h2 {
  margin-top: 0;
}

.article-body p {
  margin-bottom: 1.1em;
  font-size: 16.5px;
  line-height: 1.9;
  color: #2a332d;
}

.article-body p:last-child {
  margin-bottom: 0;
}

/* 正文里的要点清单 / 操作步骤 */

.article-body ul,
.article-body ol {
  margin: 4px 0 1.2em;
  padding: 0;
  list-style: none;
}

.article-body li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 22px;
  font-size: 16.5px;
  line-height: 1.85;
  color: #2a332d;
}

.article-body li:last-child {
  margin-bottom: 0;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
}

.article-body ol {
  counter-reset: step;
}

.article-body ol li {
  padding-left: 36px;
}

.article-body ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 4px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 23px;
  text-align: center;
}

/* 表情符号：开头带表情的标题用表情代替竖线 */

.emoji {
  margin-right: 8px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  font-size: 1.25em;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  vertical-align: -0.08em;
}

.article-body h2.has-emoji {
  padding-left: 0;
}

.article-body h2.has-emoji::before,
.keypoints h2.has-emoji::before,
.faq h2.has-emoji::before,
.laws h2.has-emoji::before {
  display: none;
}

.keypoints li.has-emoji {
  padding-left: 0;
}

.keypoints li.has-emoji::before {
  display: none;
}

.keypoints li .emoji {
  font-size: 15px;
  vertical-align: -0.12em;
}

.keypoints h2 .emoji,
.faq h2 .emoji,
.laws h2 .emoji {
  margin-right: 0;
}

.laws h2 .emoji {
  display: inline;
  margin-top: 0;
  color: inherit;
  font-size: 1.25em;
}

/* 常见问题 */

.faq {
  margin-top: 30px;
}

.faq h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.faq h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: var(--green);
}

.faq__item {
  padding: 18px 20px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.faq__item + .faq__item {
  margin-top: 10px;
}

.faq h3 {
  padding-right: 12px;
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
}

.faq p {
  margin-top: 8px;
  font-size: 15.5px;
  line-height: 1.85;
  color: #2a332d;
}

/* 一句话记住 */

.takeaway {
  position: relative;
  margin-top: 30px;
  padding: 24px 26px 22px;
  background: var(--green-deep);
  border-radius: var(--r-md);
  color: var(--ivory);
}

.takeaway::before {
  content: "一句话记住";
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #8fc7a8;
}

.takeaway p {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.8;
}

/* 法律依据 */

.laws {
  margin-top: 30px;
}

.laws h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.laws h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: var(--green);
}

.laws li {
  position: relative;
  padding: 12px 0 12px 16px;
  border-bottom: 1px solid var(--line);
}

.laws li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 2px;
  background: var(--green-bright);
}

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

.laws strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.6;
}

.laws span {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.article-disclaimer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
  color: var(--faint);
}

/* 上一篇 / 下一篇 */

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.article-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.article-nav a:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow-lift);
}

.article-nav strong {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.article-nav .is-next {
  text-align: right;
}

.article-nav__arrow {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--green);
}

/* 继续读 */

.related {
  margin-top: 30px;
}

.related__head {
  margin-bottom: 6px;
}

.related__head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

.related__head h2::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: var(--green);
}

.related-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s var(--ease);
}

.related-note strong {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.6;
}

.related-note__arrow {
  flex: none;
  color: var(--faint);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.related-note__arrow svg {
  width: 16px;
  height: 16px;
}

.related-note:hover {
  color: var(--green);
}

.related-note:hover .related-note__arrow {
  color: var(--green);
  transform: translateX(3px);
}

/* ---------- 页脚 ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  background: var(--green-deep);
  color: var(--ivory);
}

.site-footer .container {
  position: relative;
  padding-block: 40px 22px;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.footer__brand .brand__mark {
  width: 36px;
  height: 36px;
  color: var(--green-bright);
}

.footer__name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.footer__copy {
  max-width: 540px;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(244, 241, 232, 0.66);
}

.footer__copy strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ivory);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(244, 241, 232, 0.14);
  font-size: 12px;
  color: rgba(244, 241, 232, 0.45);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer__bottom a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer__bottom a:hover {
  color: var(--ivory);
  text-decoration: underline;
}

.footer__watermark {
  position: absolute;
  right: -8px;
  bottom: -26px;
  font-family: var(--serif);
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 232, 0.045);
  pointer-events: none;
  user-select: none;
}

/* ---------- 回到顶部 ---------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--green);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.to-top svg {
  width: 17px;
  height: 17px;
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--ivory);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1120px) {
  .container {
    padding-inline: 22px;
  }
  .layout,
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
  }
}

@media (min-width: 981px) and (max-height: 840px) {
  .aside {
    position: static;
  }
}

@media (max-width: 980px) {
  .layout,
  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    padding-inline: 18px;
  }
  .masthead__inner {
    padding-block: 16px;
  }
  .brand {
    gap: 11px;
  }
  .brand__mark {
    width: 36px;
    height: 36px;
  }
  .brand__name {
    font-size: 21px;
  }
  .brand__tagline {
    font-size: 12px;
    padding-left: 11px;
  }
  .brand__text {
    gap: 11px;
  }
  .page {
    padding-block: 22px 52px;
  }
  .section-head h1,
  .section-head h2 {
    font-size: 23px;
    padding-left: 13px;
  }
  .section-head h1::before,
  .section-head h2::before {
    height: 19px;
  }
  .nf {
    grid-template-areas:
      "code"
      "title"
      "text"
      "actions";
    row-gap: 4px;
    margin-bottom: 32px;
    padding: 30px 24px 32px;
  }
  .nf__code {
    margin-bottom: 8px;
    font-size: 88px;
  }
  .nf h1 {
    font-size: 25px;
  }
  .note-grid {
    column-gap: 16px;
  }
  .note-card {
    margin-bottom: 16px;
  }
  .article__title {
    font-size: 25px;
  }
  .article__lead {
    font-size: 15px;
  }
  .article-body p,
  .article-body li {
    font-size: 16px;
  }
  .article-body h2 {
    font-size: 19px;
  }
  .faq__item {
    padding: 15px 16px 14px;
  }
  .faq h3,
  .faq p {
    font-size: 15.5px;
  }
  .keypoints li {
    font-size: 14px;
  }
  .takeaway p {
    font-size: 16px;
  }
  .article-nav {
    grid-template-columns: 1fr;
  }
  .article-nav .is-next {
    text-align: left;
    flex-direction: row-reverse;
  }
  .footer__top {
    flex-direction: column;
    gap: 18px;
  }
  .footer__watermark {
    font-size: 92px;
    bottom: -18px;
  }
}

@media (max-width: 560px) {
  .sitemap__list {
    grid-template-columns: minmax(0, 1fr);
  }
  .sitemap__list time {
    display: none;
  }
  .container {
    padding-inline: 14px;
  }
  .topbar__inner {
    height: 32px;
  }
  .topbar__date {
    font-size: 11.5px;
  }
  .topbar__slogan {
    font-size: 11.5px;
    letter-spacing: 0.03em;
  }
  .brand__name {
    font-size: 19px;
  }
  .brand__tagline {
    display: none;
  }
  .section-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  .section-head h1,
  .section-head h2 {
    font-size: 21px;
  }
  .nf {
    padding: 24px 20px 26px;
  }
  .nf__code {
    font-size: 76px;
  }
  .nf h1 {
    font-size: 23px;
  }
  .nf__actions {
    margin-top: 20px;
  }
  .nf__btn {
    flex: 1 1 auto;
    height: 44px;
    padding: 0 16px;
  }
  .note-grid {
    column-gap: 12px;
  }
  .note-card {
    margin-bottom: 12px;
    border-radius: 14px;
  }
  .filterbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .widget {
    padding: 16px;
  }
  .article-hero {
    border-radius: var(--r-md);
  }
  .article-sheet {
    border-radius: var(--r-md);
  }
  .article-hero__meta {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .to-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 359px) {
  .note-grid {
    column-count: 1;
  }
}

/* ---------- 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}