@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --pencil: #4a4a4a;
  --wash: #f0efe9;
  --rule: rgba(26, 26, 26, 0.17);
  --serif: 'EB Garamond', 'Crimson Text', 'Songti SC', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
}

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

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

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.68;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='170' height='170' filter='url(%23p)' opacity='0.052'/%3E%3C/svg%3E"),
    repeating-linear-gradient(92deg, rgba(26, 26, 26, 0.026) 0 1px, transparent 1px 5px);
  background-size: 170px 170px, auto;
  filter: contrast(1.015);
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 3px;
}

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

/* ---- 刊头 ---- */
.masthead {
  position: relative;
  padding: 14px clamp(14px, 4vw, 44px) 12px;
  border-bottom: 2px solid var(--ink);
}

.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 3px;
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 14px);
  opacity: 0.45;
}

.brandrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
  border: 1.6px solid var(--ink);
  border-radius: 52% 46% 50% 48% / 48% 52% 46% 50%;
  transform: rotate(-5deg);
}

.mark svg {
  width: 25px;
  height: 25px;
}

.brand {
  font-size: clamp(1.35rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.15;
}

.pillnav {
  margin-top: 11px;
}

.pillnav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pillnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 15px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}

.pillnav li:nth-child(odd) a {
  transform: rotate(-0.8deg);
}

.pillnav li:nth-child(even) a {
  transform: rotate(0.7deg);
}

.pillnav a:hover {
  color: var(--paper);
  background: var(--ink);
}

/* ---- 头图 ---- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
  min-height: min(45vh, 420px);
  padding: clamp(22px, 5vw, 42px) clamp(14px, 4vw, 44px) clamp(18px, 4vw, 32px);
  border-bottom: 1.5px dashed var(--rule);
}

.stamp {
  display: inline-block;
  margin: 0 0 0.75em;
  padding: 5px 14px;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--pencil);
  background: var(--paper);
  border: 1.5px dashed var(--pencil);
  border-radius: 999px;
  transform: rotate(-2deg);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.95rem, 7.2vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
  font-weight: 700;
}

.lede {
  max-width: 56ch;
  margin: 0.7em 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--pencil);
}

.hero-art {
  position: relative;
  width: clamp(78px, 16vw, 126px);
  color: var(--pencil);
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
  transform: rotate(-3deg);
}

.hero-art::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 22%;
  width: 52px;
  height: 15px;
  background: rgba(26, 26, 26, 0.09);
  border-radius: 2px;
  transform: rotate(-9deg);
}

/* ---- 主体林 ---- */
.shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(20px, 3.5vw, 38px);
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(14px, 4vw, 44px);
}

.rail {
  position: sticky;
  top: 18px;
  font-size: 16px;
}

.rail-h {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.subtitle {
  margin: 0.15em 0 0.9em;
  font-size: 16px;
  font-style: italic;
  color: var(--pencil);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}

.rail-list li + li {
  border-top: 1px dashed var(--rule);
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 2px;
  color: var(--pencil);
  text-decoration: none;
  line-height: 1.4;
}

.rail-list a:hover {
  color: var(--ink);
  text-decoration: underline wavy;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.4px;
}

/* ---- 纸页 ---- */
.sheet {
  min-width: 0;
  padding: clamp(16px, 4vw, 40px);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-bottom-width: 3px;
  border-radius: 18px 15px 20px 16px / 16px 20px 15px 18px;
  box-shadow: 5px 6px 0 rgba(26, 26, 26, 0.07);
}

.sheet > section {
  scroll-margin-top: 26px;
}

.sheet > section + section {
  margin-top: 2.4em;
  padding-top: 2.2em;
  border-top: 1.5px dashed var(--rule);
}

.sheet h2 {
  margin: 0 0 0.35em;
  font-size: clamp(1.35rem, 3.8vw, 1.78rem);
  line-height: 1.3;
  letter-spacing: 0.012em;
}

.sheet h3 {
  margin: 1.6em 0 0.35em;
  font-size: 1.16rem;
  line-height: 1.4;
}

.sheet p {
  margin: 0 0 1em;
}

.sheet a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.6px;
  text-underline-offset: 3px;
}

.sheet a:hover {
  text-decoration-style: wavy;
}

.sheet ul,
.sheet ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.sheet li {
  margin: 0.32em 0;
}

.sheet img {
  display: block;
  height: auto;
  margin: 1.1em 0;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  transform: rotate(-0.4deg);
}

.sheet blockquote {
  margin: 1.2em 0;
  padding: 0.65em 1em;
  background: var(--wash);
  border-left: 4px solid var(--ink);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.sheet hr {
  margin: 2em 0;
  border: 0;
  border-top: 1.5px dashed var(--rule);
}

.sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 16px;
}

.sheet th,
.sheet td {
  padding: 8px;
  text-align: left;
  border: 1px dashed var(--rule);
}

/* ---- 页脚 ---- */
.colophon {
  margin-top: clamp(30px, 6vw, 56px);
  padding: 26px clamp(14px, 4vw, 44px) 16px;
  background: var(--wash);
  border-top: 2px solid var(--ink);
}

.foot-top {
  display: flex;
  align-items: baseline;
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto 18px;
}

.foot-brand {
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.foot-scrawl {
  flex: 1;
  height: 6px;
  max-width: 220px;
  border-top: 1.5px dashed var(--pencil);
  border-bottom: 1.5px dashed var(--rule);
  transform: rotate(-0.6deg);
}

.fcols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 28px);
  max-width: 1080px;
  margin: 0 auto;
}

.fdl {
  margin: 0;
}

.fdl dt {
  padding-bottom: 6px;
  margin-bottom: 2px;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--pencil);
  border-bottom: 1px dashed var(--rule);
}

.fdl dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.fdl dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  text-decoration: none;
}

.fdl dd a:hover {
  text-decoration: underline wavy;
  text-underline-offset: 4px;
}

.fbrand {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sub-h {
  margin: 0 0 8px;
  padding-bottom: 6px;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--pencil);
  border-bottom: 1px dashed var(--rule);
}

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

.subform input {
  flex: 1 1 110px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 12px 10px 13px 11px / 11px 13px 10px 12px;
}

.subform button {
  min-height: 40px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}

.subform button:hover {
  color: var(--ink);
  background: var(--paper);
}

.subnote {
  flex: 1 1 100%;
  margin: 0;
  min-height: 1.2em;
  font-size: 16px;
  font-style: italic;
  color: var(--pencil);
}

.copy {
  max-width: 1080px;
  margin: 22px auto 0;
  padding-top: 10px;
  font-size: 16px;
  color: var(--pencil);
  border-top: 1px dashed var(--rule);
}

/* ---- 动效 ---- */
.rv {
  opacity: 0;
  transform: translateY(12px) rotate(-0.25deg);
}

.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s steps(4, end), transform 0.3s steps(4, end);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
  .rv.in {
    transition: none;
  }
}

/* ---- 断点 ---- */
@media (max-width: 880px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .rail {
    position: static;
  }
  .rail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 0;
  }
  .rail-list li + li {
    border-top: 0;
  }
  .rail-list li {
    flex: 0 0 auto;
  }
  .rail-list a {
    min-height: 40px;
    padding: 6px 13px;
    color: var(--ink);
    border: 1.5px dashed var(--pencil);
    border-radius: 999px;
    font-size: 16px;
  }
  .subtitle {
    margin-bottom: 0.6em;
  }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-bottom: 22px;
  }
  .hero-art {
    position: absolute;
    top: 18px;
    right: 14px;
    width: 68px;
    opacity: 0.75;
  }
  .hero-copy {
    padding-right: 74px;
  }
  .fcols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sheet {
    box-shadow: 3px 4px 0 rgba(26, 26, 26, 0.07);
  }
}

@media (max-width: 430px) {
  body {
    font-size: 17px;
  }
  .pillnav a {
    padding: 7px 11px;
  }
  .fcols {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-top {
    flex-wrap: wrap;
    gap: 8px;
  }
}

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