/*
 * Z-BlogPHP law archive theme adaptation
 * Based on tpure template structure, rebuilt for a legal research archive.
 */

:root {
  --law-ink: #1F2A37;
  --law-navy: #243447;
  --law-paper: #F7F3EA;
  --law-surface: #FFFCF6;
  --law-text: #222222;
  --law-muted: #6B7280;
  --law-line: #E5E0D6;
  --law-line-strong: #D8D0C1;
  --law-gold: #B08A45;
  --law-gold-soft: #E6D8B8;
  --law-white: #FFFFFF;
  --law-shadow: 0 12px 30px rgba(31, 42, 55, 0.06);
}

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

html {
  min-width: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--law-text);
  background: var(--law-paper);
  font: 16px/1.75 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea {
  letter-spacing: 0;
}

a {
  color: var(--law-navy);
  text-decoration: none;
}

a:hover {
  color: var(--law-gold);
}

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

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

button {
  font: inherit;
}

.wrapper {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.72), rgba(247, 243, 234, 0.96) 360px),
    var(--law-paper);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.content,
.content.wide {
  width: 100%;
}

.sidebar {
  display: none;
}

.block {
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.header {
  position: relative;
  z-index: 100;
  background: rgba(255, 252, 246, 0.96);
  border-bottom: 1px solid var(--law-line);
  backdrop-filter: blur(10px);
}

.header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  min-width: 240px;
}

.brand-link {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--law-ink);
}

.brand-title {
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 12px;
  line-height: 1.3;
  color: var(--law-muted);
  text-transform: uppercase;
}

.head {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.menu ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.menu li {
  position: relative;
}

.menu li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--law-ink);
  font-size: 15px;
  white-space: nowrap;
}

.menu li.on > a,
.menu li a:hover {
  color: var(--law-gold);
}

.menu li.on > a::after,
.menu li a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--law-gold);
}

.menu .subnav {
  min-width: 168px;
  padding: 8px 0;
  position: absolute;
  top: 48px;
  left: -18px;
  display: none;
  background: var(--law-surface);
  border: 1px solid var(--law-line);
  box-shadow: var(--law-shadow);
}

.menu li:hover .subnav {
  display: block;
}

.menu .subnav a {
  display: block;
  min-height: 0;
  padding: 8px 18px;
  font-size: 14px;
}

.menuico {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--law-line-strong);
  border-radius: 6px;
  background: var(--law-surface);
  cursor: pointer;
  position: relative;
}

.menuico span {
  width: 20px;
  height: 2px;
  position: absolute;
  left: 10px;
  background: var(--law-ink);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.menuico span:nth-child(1) {
  top: 13px;
}

.menuico span:nth-child(2) {
  top: 20px;
}

.menuico span:nth-child(3) {
  top: 27px;
}

.menuico.on span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menuico.on span:nth-child(2) {
  opacity: 0;
}

.menuico.on span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.fademask {
  display: none;
}

.fademask.on {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(31, 42, 55, 0.36);
}

.main {
  padding: 0 0 56px;
}

.main.fixed {
  padding-top: 78px;
}

.law-hero {
  border-bottom: 1px solid var(--law-line);
}

.law-hero-inner {
  position: relative;
  padding-top: 74px;
  padding-bottom: 68px;
}

.law-hero-inner::before {
  content: "";
  width: 68px;
  height: 3px;
  position: absolute;
  top: 58px;
  left: 24px;
  background: var(--law-gold);
}

.law-eyebrow {
  margin-bottom: 12px;
  color: var(--law-muted);
  font-size: 13px;
  text-transform: uppercase;
}

.law-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  color: var(--law-ink);
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 42px;
  line-height: 1.24;
  font-weight: 700;
}

.law-hero-subtitle {
  max-width: 760px;
  margin: 0 0 10px;
  color: var(--law-navy);
  font-size: 20px;
  line-height: 1.65;
}

.law-hero-text {
  max-width: 650px;
  margin: 0;
  color: var(--law-muted);
  font-size: 16px;
}

.law-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.law-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--law-gold);
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.3;
}

.law-button.primary {
  color: var(--law-white);
  background: var(--law-ink);
  border-color: var(--law-ink);
}

.law-button.secondary {
  color: var(--law-ink);
  background: transparent;
}

.law-button:hover {
  color: var(--law-white);
  background: var(--law-gold);
  border-color: var(--law-gold);
}

.law-section {
  padding: 52px 0 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--law-line);
}

.section-heading h2 {
  margin: 0;
  color: var(--law-ink);
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 27px;
  line-height: 1.35;
  font-weight: 700;
}

.section-heading p {
  margin: 0;
  color: var(--law-muted);
  font-size: 14px;
  line-height: 1.7;
}

.research-list {
  border-bottom: 1px solid var(--law-line);
}

.research-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--law-line);
}

.research-list .research-item:last-child {
  border-bottom: 0;
}

.research-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--law-muted);
  font-size: 14px;
  line-height: 1.5;
}

.research-meta span,
.article-meta span {
  display: inline-flex;
  align-items: center;
}

.research-meta span + span::before,
.article-meta span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--law-gold-soft);
}

.research-meta a,
.article-meta a {
  color: var(--law-muted);
}

.research-meta a:hover,
.article-meta a:hover {
  color: var(--law-gold);
}

.top-mark {
  padding: 1px 8px;
  color: var(--law-ink);
  border: 1px solid var(--law-gold-soft);
  background: rgba(176, 138, 69, 0.1);
}

.research-item h2 {
  margin: 9px 0 10px;
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 700;
}

.research-item h2 a {
  color: var(--law-ink);
}

.research-item h2 a:hover {
  color: var(--law-gold);
}

.research-item .intro {
  max-width: 820px;
  color: #3F3F3F;
  font-size: 15px;
  line-height: 1.85;
}

.readmore {
  margin-top: 12px;
}

.readmore a {
  display: inline-flex;
  align-items: center;
  color: var(--law-navy);
  font-size: 14px;
  font-weight: 600;
}

.readmore a::after {
  content: "";
  width: 18px;
  height: 1px;
  margin-left: 8px;
  background: var(--law-gold);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.topic-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border: 1px solid var(--law-line);
  border-top: 3px solid var(--law-gold);
  border-radius: 6px;
  background: rgba(255, 252, 246, 0.76);
}

.topic-card h3 {
  margin: 0 0 10px;
  color: var(--law-ink);
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
}

.topic-card p {
  margin: 0 0 18px;
  color: var(--law-muted);
  font-size: 14px;
  line-height: 1.7;
}

.topic-card a {
  margin-top: auto;
  color: var(--law-navy);
  font-size: 14px;
  font-weight: 600;
}

.channel-header {
  padding: 42px 0 22px;
  border-bottom: 1px solid var(--law-line);
}

.channel-inner {
  max-width: 880px;
}

.channel-header h1 {
  margin: 0 0 12px;
  color: var(--law-ink);
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 700;
}

.channel-header p {
  max-width: 760px;
  margin: 0;
  color: var(--law-muted);
  font-size: 16px;
}

.sitemap {
  margin-bottom: 16px;
  color: var(--law-muted);
  font-size: 13px;
  line-height: 1.6;
}

.sitemap a {
  color: var(--law-muted);
}

.sitemap a:hover {
  color: var(--law-gold);
}

.article-wrap {
  max-width: 1120px;
  padding-top: 38px;
}

.article-content-shell {
  max-width: 780px;
  margin: 0 auto;
}

.law-article {
  padding-bottom: 0;
  border-bottom: 0;
}

.article-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--law-line);
}

.article-header h1 {
  margin: 12px 0 0;
  color: var(--law-ink);
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 700;
}

.article-content {
  padding-top: 28px;
  color: var(--law-text);
  font-size: 17px;
  line-height: 1.9;
  overflow: visible;
  word-break: normal;
  word-wrap: break-word;
}

.article-content p {
  margin: 0 0 1.1em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: var(--law-ink);
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-weight: 700;
  line-height: 1.45;
}

.article-content h2 {
  margin: 2.2em 0 0.9em;
  padding-bottom: 0.4em;
  font-size: 24px;
  border-bottom: 1px solid var(--law-line);
}

.article-content h3 {
  margin: 1.8em 0 0.75em;
  font-size: 21px;
}

.article-content h4 {
  margin: 1.6em 0 0.65em;
  font-size: 18px;
}

.article-content blockquote {
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  color: #444444;
  border-left: 4px solid var(--law-gold);
  background: #FBF8F1;
}

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

.article-content ul,
.article-content ol {
  margin: 0 0 1.2em 1.4em;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 0.45em;
}

.article-content table {
  width: 100%;
  max-width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 15px;
}

.article-content th,
.article-content td {
  padding: 10px 12px;
  border: 1px solid var(--law-line);
  vertical-align: top;
}

.article-content th {
  color: var(--law-ink);
  background: #F1EADD;
}

.article-content img {
  display: block;
  margin: 1.4em auto;
}

.article-content sup,
.article-content .footnote,
.article-content .footnotes {
  color: var(--law-muted);
  font-size: 0.85em;
}

.article-footer {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--law-line);
}

.article-taxonomy {
  display: grid;
  gap: 10px;
  color: var(--law-muted);
  font-size: 14px;
}

.article-taxonomy a {
  margin-right: 8px;
  color: var(--law-navy);
}

.article-taxonomy a:hover {
  color: var(--law-gold);
}

.tags a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 6px;
  padding: 0 9px;
  border: 1px solid var(--law-line);
  border-radius: 3px;
  background: rgba(255, 252, 246, 0.7);
  font-size: 13px;
}

.pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.pages p {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--law-line);
  background: rgba(255, 252, 246, 0.66);
}

.pages span {
  display: block;
  margin-bottom: 4px;
  color: var(--law-muted);
  font-size: 13px;
}

.pages a,
.pages em {
  display: block;
  color: var(--law-ink);
  font-style: normal;
  line-height: 1.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pages a:hover {
  color: var(--law-gold);
}

.pagebar,
.cmtpagebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 0;
}

.pagebar a,
.pagebar span,
.cmtpagebar a,
.cmtpagebar span {
  min-width: 36px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--law-navy);
  border: 1px solid var(--law-line);
  background: rgba(255, 252, 246, 0.7);
  font-size: 14px;
}

.pagebar .now-page,
.cmtpagebar .now-page,
.pagebar a:hover,
.cmtpagebar a:hover {
  color: var(--law-white);
  border-color: var(--law-ink);
  background: var(--law-ink);
}

.footer {
  margin-top: 64px;
  padding: 32px 0;
  color: #D7DDE5;
  background: var(--law-ink);
}

.footer-inner {
  display: grid;
  gap: 8px;
}

.footer-title {
  color: var(--law-white);
  font-family: SimSun, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 20px;
  font-weight: 700;
}

.footer p {
  margin: 0;
  color: #C8D0DA;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #AEB8C5;
  font-size: 13px;
}

.footer a {
  color: #E9D8AF;
}

.footer a:hover {
  color: var(--law-white);
}

.edgebar {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 30;
}

.backtotop {
  width: 42px;
  height: 42px;
  display: none;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(31, 42, 55, 0.82);
}

.backtotop i {
  width: 12px;
  height: 12px;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  border-top: 2px solid var(--law-white);
  border-left: 2px solid var(--law-white);
  transform: translate(-50%, -35%) rotate(45deg);
}

.schwords {
  color: var(--law-gold);
  font-weight: 700;
}

.errorpage {
  max-width: 780px;
  margin: 58px auto 0;
  padding: 48px 24px;
  text-align: center;
  border: 1px solid var(--law-line);
  background: rgba(255, 252, 246, 0.72);
}

.errorpage h3 {
  margin: 0 0 8px;
  color: var(--law-ink);
  font-size: 72px;
  line-height: 1;
}

.errorpage h4 {
  margin: 0 0 16px;
  color: var(--law-ink);
  font-size: 24px;
}

.errorpage p {
  margin: 0 0 18px;
  color: var(--law-muted);
}

.errorsearch {
  max-width: 460px;
  margin: 0 auto 18px;
  display: flex;
  gap: 8px;
}

.errschtxt,
.errschbtn {
  min-height: 40px;
  border: 1px solid var(--law-line-strong);
  background: var(--law-surface);
}

.errschtxt {
  min-width: 0;
  flex: 1;
  padding: 0 12px;
}

.errschbtn,
.goback {
  padding: 0 14px;
  cursor: pointer;
}

.goback {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--law-line-strong);
  background: var(--law-surface);
}

.relate,
.comment,
.cmts,
.cmtform,
.bdshare {
  display: none;
}

@media screen and (max-width: 1080px) {
  .header-inner {
    min-height: 68px;
  }

  .brand {
    min-width: 220px;
  }

  .brand-title {
    font-size: 20px;
  }

  .menu ul {
    gap: 16px;
  }

  .menu li a {
    font-size: 14px;
  }

  .main.fixed {
    padding-top: 68px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .wrap {
    padding: 0 16px;
  }

  .header-inner {
    min-height: 64px;
  }

  .brand {
    min-width: 0;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .head {
    flex: none;
  }

  .menuico {
    display: inline-flex;
  }

  .menu {
    width: 100%;
    max-height: calc(100vh - 64px);
    overflow: auto;
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 80;
    padding: 8px 16px 18px;
    border-bottom: 1px solid var(--law-line);
    background: var(--law-surface);
    box-shadow: var(--law-shadow);
  }

  .menu.on {
    display: block;
  }

  .menu ul {
    display: grid;
    gap: 0;
  }

  .menu li {
    border-bottom: 1px solid var(--law-line);
  }

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

  .menu li a {
    min-height: 46px;
    display: flex;
    font-size: 16px;
  }

  .menu li.on > a::after,
  .menu li a:hover::after {
    display: none;
  }

  .menu .subnav {
    position: static;
    display: block;
    padding: 0 0 8px 14px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .main.fixed {
    padding-top: 64px;
  }

  .law-hero-inner {
    padding-top: 54px;
    padding-bottom: 48px;
  }

  .law-hero-inner::before {
    top: 40px;
    left: 16px;
  }

  .law-hero h1 {
    font-size: 30px;
  }

  .law-hero-subtitle {
    font-size: 17px;
  }

  .law-button {
    width: 100%;
  }

  .law-section {
    padding-top: 40px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .research-item {
    padding: 22px 0;
  }

  .research-item h2 {
    font-size: 20px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: 0;
  }

  .channel-header h1,
  .article-header h1 {
    font-size: 28px;
  }

  .article-wrap {
    padding-top: 28px;
  }

  .article-content {
    font-size: 16px;
    line-height: 1.8;
  }

  .article-content h2 {
    font-size: 22px;
  }

  .pages {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 520px) {
  .brand-subtitle {
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .law-hero-actions {
    gap: 10px;
  }

  .research-meta,
  .article-meta {
    gap: 6px 10px;
    font-size: 13px;
  }

  .research-meta span + span::before,
  .article-meta span + span::before {
    margin-right: 10px;
  }

  .footer {
    margin-top: 46px;
  }

  .footer-links {
    display: grid;
    gap: 4px;
  }

  .edgebar {
    right: 12px;
    bottom: 14px;
  }

  .errorsearch {
    display: grid;
  }
}
