:root {
  --bg: #f6f0e2;
  --surface: #fffaf1;
  --surface-2: #f0e4c8;
  --text: #2b2218;
  --text-muted: #5c4e3e;
  --accent: #b42318;
  --accent-ink: #fff7ec;
  --border: #d7c49a;
  --ring: #8a3428;
  --ok: #2f6b3c;
  --warn: #9a5a10;
  --danger: #b42318;
  --info: #3a5870;
  --cta-wash: rgba(90, 18, 12, 0.28);
  --cta-clip: rgba(40, 10, 8, 0.22);
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --fs-h1: 34px;
  --fs-h2: 24px;
  --fs-h3: 18px;
  --fs-body: 16px;
  --fs-small: 13px;
  --lh-body: 1.7;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --shadow-1: 0 1px 0 rgba(43, 34, 24, 0.08);
  --shadow-2: 0 6px 18px rgba(43, 34, 24, 0.12);
  --container: 720px;
  --container-wide: 1120px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur: 160ms;
  --cta-loop: 2.8s;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: anywhere;
  padding-bottom: 120px;
}

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

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

a:hover {
  color: #8a1a12;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  z-index: 100;
}

.skip:focus {
  top: 12px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--text);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--accent);
  flex-shrink: 0;
}

.brand img {
  width: 220px;
  height: 56px;
  object-fit: cover;
  object-position: center;
}

.nav-toggle {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--text);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  display: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.wrap {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.wrap-narrow {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding-block: var(--space-7);
}

.section + .section {
  border-top: 1px solid var(--border);
}

.kicker {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-3);
}

h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 var(--space-5);
  color: var(--text);
}

h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 var(--space-4);
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-4);
}

.lead {
  font-size: 17px;
  line-height: 1.7;
}

.mast {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-6);
  align-items: center;
  padding-block: var(--space-7);
}

.mast-fig {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-2);
}

.mast-fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.num-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}

.num-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.num {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent);
  line-height: 1.2;
}

.num-list h3 {
  margin-top: 0;
}

.num-list p:last-child {
  margin-bottom: 0;
}

.tabs {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-5);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.tab-list button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 16px;
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-list button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel[hidden] {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 16px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-weight: 700;
}

.quote {
  margin: 0;
  padding: var(--space-5) var(--space-6);
  background: var(--surface-2);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.5;
}

.quote p {
  margin: 0 0 var(--space-3);
}

.quote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-style: normal;
  color: var(--text-muted);
}

.faq details {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.faq details p:last-child {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: var(--space-6);
  align-items: start;
}

.aside {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-5);
}

.aside h2,
.aside h3 {
  font-size: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-5);
}

.card h3 {
  font-family: var(--font-serif);
}

.comments {
  display: grid;
  gap: var(--space-5);
}

.comment {
  background: var(--surface);
  padding: var(--space-5);
  border: 1px solid var(--border);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--text);
}

.timeline li {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
}

.timeline .when {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: var(--space-2);
}

.prose > *:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--text);
  background: var(--surface);
  padding: var(--space-7) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-6);
}

.footer-brand a {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--accent);
  text-decoration: none;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: var(--space-3);
}

.footer-col h2 {
  font-size: 14px;
  font-family: var(--font-sans);
  margin-bottom: var(--space-3);
}

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

.footer-col a {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: 6px 0;
  min-height: 44px;
}

.footer-col a:hover {
  color: var(--accent);
}

.site-cta {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 480px;
  max-width: 38vw;
  min-width: 400px;
  min-height: 56px;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  border: 1px solid #7a160f;
}

.site-cta:hover,
.site-cta:focus-visible {
  color: var(--accent-ink);
  background: #9a1b12;
}

.site-cta:active {
  filter: brightness(0.96);
}

.site-cta::before,
.site-cta::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.site-cta::before {
  inset: 0;
  background: radial-gradient(120% 140% at 28% 50%, var(--cta-wash) 0%, transparent 72%);
  opacity: 0;
  animation: blotter-ink-seep 2.8s var(--ease) infinite;
}

.site-cta::after {
  left: 18%;
  right: 18%;
  top: 0;
  height: 10px;
  background: var(--cta-clip);
  opacity: 0;
  transform: translateY(-2px);
  animation: clip-press 2.8s var(--ease) infinite;
}

.site-cta span {
  position: relative;
  z-index: 1;
}

@keyframes blotter-ink-seep {
  0%,
  55% {
    opacity: 0;
  }
  68% {
    opacity: 0.28;
  }
  84%,
  100% {
    opacity: 0;
  }
}

@keyframes clip-press {
  0%,
  58% {
    opacity: 0;
    transform: translateY(-2px);
  }
  70% {
    opacity: 0.22;
    transform: translateY(0);
  }
  86%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-cta::before,
  .site-cta::after {
    animation: none;
  }

  .site-cta::before {
    opacity: 0.14;
  }

  .site-cta::after {
    opacity: 0.16;
    transform: translateY(0);
  }
}

.err {
  padding-block: var(--space-8);
  text-align: left;
}

@media (max-width: 900px) {
  .mast,
  .split,
  .footer-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 176px;
    height: 46px;
  }

  h1 {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--text);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3) var(--space-4) var(--space-4);
    gap: 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }

  .site-cta {
    left: 16px;
    right: 16px;
    width: auto;
    min-width: 0;
    max-width: none;
    transform: none;
    font-size: 15px;
    min-height: 52px;
  }

  h1 {
    font-size: 26px;
  }

  .num-list li {
    grid-template-columns: 36px 1fr;
  }

  body {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
}
