/* 律师自媒体调研 — editorial paper */
:root {
  --bg: #f6f1e8;
  --bg-raised: #fbf7ef;
  --paper: #fffdf8;
  --ink: #1c1917;
  --muted: #5c534a;
  --faint: #8a8176;
  --accent: #8b1e1e;
  --accent-soft: rgba(139, 30, 30, 0.08);
  --ink-blue: #1e3a5f;
  --rule: #d9cdb8;
  --rule-strong: #c4b49a;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.06);
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.8;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 420px at 12% -10%, rgba(139, 30, 30, 0.055), transparent 55%),
    radial-gradient(900px 380px at 100% 0%, rgba(30, 58, 95, 0.05), transparent 50%);
  min-height: 100vh;
}

::selection {
  background: var(--accent);
  color: #f6f1e8;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--ink-blue);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, white);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.masthead {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.seal {
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  letter-spacing: 0;
  line-height: 1;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.28rem 0.7rem;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 4.5rem;
}

.prose-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4.5rem;
}

.prose-wrap:has(.toc) {
  max-width: 76rem;
  display: grid;
  grid-template-columns: minmax(0, 42rem) 17.5rem;
  grid-template-areas:
    "head head"
    "article toc";
  column-gap: 2.4rem;
  row-gap: 0;
  align-items: start;
  justify-content: center;
}

.prose-wrap:has(.toc) > .article-head { grid-area: head; max-width: 42rem; }
.prose-wrap:has(.toc) > .toc { grid-area: toc; }
.prose-wrap:has(.toc) > .prose { grid-area: article; max-width: 42rem; }

.prose h2, .prose h3, .prose h4 {
  scroll-margin-top: 4.6rem;
}

/* Home */
.hero {
  padding: 2.4rem 0 2.1rem;
  max-width: 42rem;
}

.hero-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: none;
  margin: 0 0 0.9rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.15rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: 0.08em;
  margin: 0 0 0.85rem;
}

.hero .dek {
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--ink-blue);
  line-height: 1.6;
  margin: 0 0 1.1rem;
}

.hero .meta {
  color: var(--faint);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--rule) 28%, var(--rule));
  margin: 0 0 2rem;
}

.section-label {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 1.05rem;
  margin: 0 0 2.6rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.3rem 1.35rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 13.2rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
  box-shadow: 0 14px 36px rgba(28, 25, 23, 0.09);
  color: inherit;
}

.card .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 0.55rem;
}

.card h2 {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.4;
  margin: 0 0 0.65rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.card .date {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.06em;
}

.card.quiet {
  min-height: 10.5rem;
  background: transparent;
  box-shadow: none;
}

/* Article */
.article-head {
  margin: 0 0 1.6rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.back {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.back:hover { color: var(--accent); }

.article-head .kicker {
  display: block;
  margin: 0.85rem 0 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.article-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.4vw, 2.05rem);
  line-height: 1.35;
  margin: 0 0 0.55rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.article-head .date {
  color: var(--faint);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.toc {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.85rem 0.95rem 1rem;
  margin: 0 0 1.8rem;
  font-size: 0.82rem;
  line-height: 1.45;
  position: sticky;
  top: 4.4rem;
  max-height: calc(100vh - 5.2rem);
  overflow: auto;
  align-self: start;
}

.toc .toc-title {
  position: sticky;
  top: 0;
  background: var(--paper);
  padding-bottom: 0.35rem;
}

.toc ul ul {
  padding-left: 0.85rem;
  font-size: 0.95em;
}

.toc a.is-active {
  color: var(--accent);
  font-weight: 650;
}

@media (max-width: 1080px) {
  .prose-wrap:has(.toc) {
    max-width: 42rem;
    display: block;
  }
  .toc {
    position: relative;
    top: 0;
    max-height: 14rem;
    margin-bottom: 1.6rem;
  }
}

.toc-title {
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.4rem;
  color: var(--ink-blue);
}

.toc ul {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
}

.toc li { margin: 0.15rem 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.prose > *:first-child { margin-top: 0; }

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--serif);
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.prose h1 { font-size: 1.7rem; margin: 2rem 0 0.8rem; }
.prose h2 {
  font-size: 1.32rem;
  margin: 2.15rem 0 0.7rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--rule);
}
.prose h2:first-child { border-top: 0; padding-top: 0; }
.prose h3 { font-size: 1.08rem; margin: 1.5rem 0 0.45rem; color: var(--ink-blue); }
.prose h4 { font-size: 1rem; margin: 1.2rem 0 0.35rem; }

.prose p { margin: 0.7rem 0 1rem; }
.prose strong { font-weight: 650; }

.prose ul, .prose ol {
  margin: 0.4rem 0 1.1rem;
  padding-left: 1.3rem;
}
.prose li { margin: 0.22rem 0; }

.prose blockquote {
  margin: 1.1rem 0;
  padding: 0.35rem 0 0.35rem 1.05rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
.prose blockquote p { margin: 0.4rem 0; }

.prose hr {
  border: 0;
  height: 0;
  margin: 2rem 0;
  border-top: 1px solid var(--rule);
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.84em;
  background: rgba(28, 25, 23, 0.06);
  padding: 0.08em 0.35em;
  border-radius: 3px;
}

.prose pre {
  overflow-x: auto;
  background: #1c1917;
  color: #f6f1e8;
  padding: 0.95rem 1.05rem;
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 1rem 0 1.4rem;
}
.prose pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.headerlink {
  margin-left: 0.35em;
  color: var(--rule-strong);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.72em;
  vertical-align: super;
}
.headerlink:hover { color: var(--accent); }

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 0.85rem 0 1.4rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}

.prose table,
.watch table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.5;
}

.prose th, .prose td,
.watch th, .watch td {
  border-bottom: 1px solid var(--rule);
  padding: 0.48rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.prose thead th,
.watch thead th {
  background: #efe6d6;
  font-weight: 650;
  font-family: var(--serif);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.prose tbody tr:nth-child(even),
.watch tbody tr:nth-child(even) {
  background: rgba(255, 253, 248, 0.55);
}

.prose tbody tr:hover,
.watch tbody tr:hover {
  background: var(--accent-soft);
}

/* Watchlist uses a wider canvas */
.watch-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.filters button {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--muted);
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}

.filters button.is-on,
.filters button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.08rem 0.42rem;
  border: 1px solid var(--rule);
  color: var(--ink-blue);
  background: var(--bg-raised);
  white-space: nowrap;
}

.badge.xhs { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); }
.badge.douyin { color: var(--ink); }
.badge.wechat { color: #245c3a; }
.badge.bilibili { color: #6b3a52; }
.badge.x { color: var(--ink-blue); }

.hint {
  color: var(--faint);
  font-size: 0.82rem;
  margin: 0 0 0.9rem;
}

.search-hint {
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.4rem 1.25rem 2.2rem;
  color: var(--faint);
  font-size: 0.82rem;
}

.site-footer .inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
}

.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

@media (max-width: 720px) {
  html { font-size: 16.5px; }
  .masthead { padding: 0.65rem 0.9rem; }
  .hero { padding-top: 1.4rem; }
  .card { min-height: 0; }
  .prose h2 { font-size: 1.2rem; }
  .nav a { padding: 0.22rem 0.5rem; font-size: 0.8rem; }
}

.url-cell a { word-break: break-all; }
.watch td:nth-child(5) { min-width: 14rem; }
.watch td:nth-child(2) { min-width: 8rem; }

@media print {
  .site-header, .filters, .back, .site-footer { display: none !important; }
  body { background: white; }
  .prose-wrap, .watch-wrap { max-width: none; padding: 0; }
}
