@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 {
  --mint: #5cc6b0;
  --mint-soft: #d8efe8;
  --mint-deep: #2c8776;
  --sand: #d4c4a8;
  --sand-deep: #c2ad8d;
  --ink: #172623;
  --clay: #c67b5c;
  --olive: #6b7b3c;
  --paper: #f5efe4;
  --card: #fbf6ee;
  --line: #e2d7c6;
  --r-a: 28px;
  --ease: cubic-bezier(.2, .8, .3, 1);
  --shadow: 0 22px 46px -30px rgba(23, 38, 35, .55);
  --head: 'Lora', 'Songti SC', Georgia, serif;
  --body: 'Raleway', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: .012em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: multiply;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
}

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 0 0 16px 16px;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip:focus { top: 0; }

/* ---------- 页头 ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 239, 228, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mast-brand {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.brand-glyph,
.brand-img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 16px 20px 18px 22px;
  background: var(--mint);
  color: #0f2a26;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--head);
  font-size: 20px;
  object-fit: cover;
}

.brand-word {
  font-family: var(--head);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .05em;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 18px 24px 16px 26px;
  background: var(--ink);
  color: #eaf6f2;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.cta:hover {
  background: var(--mint-deep);
  transform: translateY(-2px) rotate(-.6deg);
}

.tabs {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 8px;
}

.tabs > p {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.tabs a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 14px 20px 16px 22px;
  color: #23372f;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.tabs a:hover,
.tabs a:focus-visible {
  background: #ebe0cd;
  color: var(--ink);
}

.tabs a.has-sub::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-right: 2px solid var(--mint-deep);
  border-bottom: 2px solid var(--mint-deep);
  transform: rotate(45deg) translateY(-2px);
  border-radius: 0 0 3px 0;
}

.drop {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  right: 20px;
  top: calc(100% - 4px);
  min-width: 190px;
  display: grid;
  gap: 2px;
  background: var(--card);
  border-radius: 22px 22px 26px 26px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  z-index: 45;
}

.tabs > p:hover + .drop,
.drop:hover,
.drop:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drop-link {
  display: flex !important;
  min-height: 42px;
}

/* ---------- 首屏 ---------- */
main { position: relative; z-index: 1; }

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 46px) 20px clamp(12px, 3vw, 26px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
  align-items: center;
  min-height: 45vh;
}

.hero-copy { min-width: 0; }

.badge {
  display: inline-block;
  padding: 6px 15px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--sand);
  color: #3b3327;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  transform: rotate(-1.6deg);
}

h1 {
  font-family: var(--head);
  font-size: clamp(27px, 5vw, 44px);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 14px;
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.75;
  color: #3a4a44;
}

.hero-art {
  margin: 0;
  aspect-ratio: 1;
  border-radius: 48% 52% 46% 54% / 52% 46% 54% 48%;
  background: linear-gradient(158deg, #ece2cf 0%, var(--sand) 58%, var(--sand-deep) 100%);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .28), var(--shadow);
  padding: 16px;
  overflow: hidden;
  will-change: transform;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.art { width: 100%; height: 100%; display: block; }
.a-sun { fill: var(--clay); opacity: .82; }
.a-arch { fill: #f7f2e8; opacity: .92; }
.a-leaf { fill: var(--olive); opacity: .62; }
.a-line { fill: none; stroke: var(--mint-deep); stroke-width: 6; stroke-linecap: round; opacity: .6; }

/* ---------- 正文 ---------- */
.reading {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 30px;
  align-items: start;
}

.prose { min-width: 0; }

.prose > div {
  background: var(--card);
  padding: clamp(20px, 3.4vw, 34px);
  margin: 0 0 20px;
  border-radius: var(--r-a);
  box-shadow: 0 16px 34px -32px rgba(23, 38, 35, .9);
  scroll-margin-top: 152px;
}

.prose > div:nth-child(3n + 1) { border-radius: 28px 28px 22px 36px; }
.prose > div:nth-child(3n + 2) { border-radius: 22px 36px 30px 24px; }
.prose > div:nth-child(3n) { border-radius: 34px 24px 26px 30px; }

.prose h2 {
  font-family: var(--head);
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 12px;
}

.prose h3 {
  font-family: var(--head);
  font-size: 19px;
  line-height: 1.5;
  margin: 22px 0 8px;
}

.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

.prose ul,
.prose ol { margin: 0 0 14px; padding-left: 1.25em; }
.prose li { margin-bottom: 7px; }

.prose a {
  color: var(--mint-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--mint);
  background: #f2ece0;
  border-radius: 6px 20px 20px 6px;
  color: #33443e;
}

.prose figure { margin: 18px 0; }
.prose img { border-radius: 20px; display: block; }

.prose time {
  font-size: 15px;
  color: #5d6b64;
  letter-spacing: .04em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 16px;
}
.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 148px;
  background: linear-gradient(180deg, #e2f2ec, var(--mint-soft));
  border-radius: 28px 28px 28px 40px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.rail h2 {
  font-family: var(--head);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
}

.rail .subtitle {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #37514a;
}

.rail-list { margin: 0; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 14px 18px 16px 20px;
  color: #1d3a33;
  text-decoration: none;
  font-size: 16px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.rail-list a + a { margin-top: 2px; }
.rail-list a:hover {
  background: rgba(255, 255, 255, .62);
  transform: translateX(3px);
}

.up {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 16px 20px 16px 22px;
  border: 1px solid rgba(23, 38, 35, .28);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.up:hover { background: rgba(255, 255, 255, .55); }

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: #e9e2d4;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 15px;
}

.foot a {
  color: #e9e2d4;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 6px;
}
.foot a:hover { color: var(--mint); }

.foot-brand a { font-family: var(--head); font-size: 18px; letter-spacing: .05em; }

.foot nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 6px;
  margin: 0;
}

.copy { margin: 0; color: #aaa79a; }

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cta:hover,
  .rail-list a:hover { transform: none; }
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 18px;
  }
  .reading { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    order: 2;
    border-radius: 26px;
  }
  .prose > div { scroll-margin-top: 140px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .drop { display: none; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 22px;
  }
  .hero-art {
    width: 156px;
    order: 2;
    border-radius: 46% 54% 44% 56% / 54% 44% 56% 46%;
  }
  .hero-copy { order: 1; }
  .tabs a { padding: 10px 11px; font-size: 15.5px; }
  .mast-brand { padding: 12px 16px 4px; }
  .tabs { padding: 0 16px 8px; }
  .hero,
  .reading { padding-left: 16px; padding-right: 16px; }
  .reading { padding-bottom: 46px; }
  .foot { justify-content: center; text-align: center; padding: 16px; }
  .foot-brand { width: 100%; }
  .copy { width: 100%; }
}

@media (max-width: 420px) {
  .brand-word { font-size: 19px; }
  .cta { padding: 11px 15px; }
}

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