@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #172623;
  --ink-soft: #2f423d;
  --teal: #5cc6b0;
  --teal-deep: #3d9a89;
  --sand: #d4c4a8;
  --sand-soft: #e8dfcd;
  --paper: #f7f2e8;
  --clay: #c67b5c;
  --olive: #6b7b3c;
  --line: rgba(23, 38, 35, 0.14);
  --glass: rgba(250, 246, 238, 0.68);
  --shadow: 0 10px 30px rgba(23, 38, 35, 0.1);
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-wrap: break-word;
  font-family: 'Raleway', 'Hiragino Sans GB', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: linear-gradient(180deg, #fbf6ee 0%, #f4ecdf 42%, #eee4d3 100%);
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

a { color: var(--teal-deep); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

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

/* ---------- 顶栏 ---------- */
.top {
  position: relative;
  z-index: 6;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251, 246, 238, 0.97), rgba(244, 236, 223, 0.72));
}

.top-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px clamp(12px, 3vw, 26px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.top-left,
.top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.top-right { justify-content: flex-end; }

.top-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius);
}

.top-link:hover {
  color: var(--ink);
  background: rgba(92, 198, 176, 0.18);
}

.brand { justify-self: center; }

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 2px 6px;
  text-decoration: none;
  color: var(--ink);
}

.brand-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.28rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.search {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 2px 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(8px);
}

.search-input {
  width: 84px;
  min-height: 40px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  outline: none;
}

.search-btn {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 3px;
  background: var(--teal);
  color: #0d1b18;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.search-btn:hover { background: var(--teal-deep); color: #f6f2e7; }

/* ---------- 粘性锚点条 ---------- */
.anchors {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(212, 196, 168, 0.24);
  background: rgba(23, 38, 35, 0.94);
  backdrop-filter: blur(10px);
}

.anchors-list {
  display: flex;
  gap: 2px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 5px clamp(10px, 3vw, 24px);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchors-list::-webkit-scrollbar { height: 0; }

.anchors-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 0.92rem;
  color: #e7ddc9;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-radius: 3px;
}

.anchors-list a:hover,
.anchors-list a.is-active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  background: rgba(92, 198, 176, 0.1);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 45vh;
  overflow: hidden;
  isolation: isolate;
  color: #f7f2e8;
  background: linear-gradient(135deg, #172623 0%, #2b4a43 58%, #4f8d80 130%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
  background-image: radial-gradient(rgba(212, 196, 168, 0.32) 1px, transparent 1px);
  background-size: 22px 22px;
}

.hero-media { position: absolute; inset: 0; z-index: 0; }

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s ease-out;
}

.hero-img.is-on { opacity: 1; }

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(23, 38, 35, 0.88) 0%, rgba(23, 38, 35, 0.5) 58%, rgba(23, 38, 35, 0.24) 100%);
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 54px) clamp(16px, 3vw, 30px);
}

.hero h1 {
  margin: 0 0 0.4em;
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 4.4vw, 2.9rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #f9f5ec;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-lede {
  max-width: 46ch;
  margin: 0;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  line-height: 1.7;
  color: rgba(247, 242, 232, 0.88);
}

/* ---------- 版式 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px) clamp(14px, 3vw, 26px) clamp(28px, 5vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}

.col { min-width: 0; }

/* ---------- 正文 ---------- */
.prose section {
  margin: 0 0 clamp(16px, 2.4vw, 26px);
  padding: clamp(16px, 2.4vw, 30px);
  scroll-margin-top: 78px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.prose section:nth-of-type(3n + 2) { border-left-color: var(--clay); }
.prose section:nth-of-type(3n + 3) { border-left-color: var(--olive); }

.prose section.flash { box-shadow: 0 0 0 2px var(--teal), var(--shadow); }

.prose h2 {
  margin: 0 0 0.2em;
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.28rem, 2.2vw, 1.66rem);
  line-height: 1.34;
  letter-spacing: 0.01em;
}

.prose h2 + hr { margin: 0.45em 0 1em; }

.prose h3 {
  margin: 1.2em 0 0.4em;
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--sand), rgba(212, 196, 168, 0));
}

.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

.prose ul,
.prose ol { margin: 0 0 1em; padding-left: 1.25em; }

.prose li { margin: 0.3em 0; }

.prose a {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose strong { color: var(--ink); }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1em;
  border-radius: var(--radius);
}

.prose blockquote {
  margin: 0 0 1em;
  padding: 10px 16px;
  border-left: 3px solid var(--clay);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(198, 123, 92, 0.09);
}

.prose table {
  width: 100%;
  margin: 0 0 1em;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.prose th,
.prose td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose time {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- 侧栏 ---------- */
.glass {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(9px);
}

.side {
  position: sticky;
  top: 70px;
  padding: 16px 16px 8px;
}

.side h2 {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.side hr { margin: 0.5em 0 0.9em; }

.side-list {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.side-list li { counter-increment: s; }

.side-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 3px 6px;
  font-size: 0.94rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 3px;
}

.side-list a::before {
  content: counter(s, decimal-leading-zero);
  font-family: 'Lora', Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--teal-deep);
}

.side-list a:hover { color: var(--ink); background: rgba(92, 198, 176, 0.15); }

.to-top {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 4px 6px;
  font-size: 0.92rem;
  color: var(--clay);
  text-decoration: none;
  border-top: 1px dashed var(--line);
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 3;
  color: #ded5c3;
  background: #172623;
  border-top: 3px solid var(--teal);
}

.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 46px) clamp(14px, 3vw, 26px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.foot-title {
  margin: 0 0 0.6em;
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.16em;
  color: var(--teal);
}

.foot-address {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 10px;
  font-style: normal;
}

.foot-mark {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.14rem;
  letter-spacing: 0.1em;
  color: #f3ecde;
}

.foot-sub { font-size: 0.9rem; color: #a7b2a4; }

.foot-links { margin: 0; padding: 0; list-style: none; }

.foot-links a,
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 0;
  font-size: 0.94rem;
  color: #ded5c3;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 196, 168, 0.22);
}

.foot-links a:hover,
.foot-nav a:hover { color: var(--teal); border-bottom-color: var(--teal); }

.foot-nav dl { margin: 0 0 6px; }

.foot-nav dt { margin: 0; }
.foot-nav dd { margin: 0; }

.foot-nav dt a { font-family: 'Lora', Georgia, serif; color: #f0e8d8; }

.subscribe { display: flex; flex-wrap: wrap; gap: 8px; }

.sub-input {
  flex: 1 1 130px;
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.94rem;
  color: #f3ecde;
  border: 1px solid rgba(212, 196, 168, 0.32);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.sub-btn {
  min-height: 44px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.92rem;
  color: #0d1b18;
  border: 0;
  border-radius: 3px;
  background: var(--teal);
  cursor: pointer;
}

.sub-btn:hover { background: #7ad4c1; }

.foot-base {
  padding: 15px 14px;
  text-align: center;
  font-size: 0.9rem;
  color: #a7b2a4;
  border-top: 1px solid rgba(212, 196, 168, 0.16);
}

.foot-base p { margin: 0; }

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .top-bar {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 6px;
    padding: 8px 12px 10px;
  }

  .top-left,
  .top-right .top-link { display: none; }

  .top-right { width: 100%; justify-content: center; }

  .search { width: 100%; margin-left: 0; }
  .search-input { flex: 1 1 auto; width: auto; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 20px;
  }

  .side { position: static; top: auto; }

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

@media (max-width: 460px) {
  .hero { min-height: 44vh; }
  .hero-lede { font-size: 0.96rem; }
  .brand-name { font-size: 1.16rem; }
}

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

button[aria-expanded]{min-width:44px;min-height:44px}
