/* 九色直播 · 手绘拼贴 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: Inter, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: #2c2c2c;
  background-color: #fafaf8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.76' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}

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

h1,
h2,
h3 {
  color: #1a1a1a;
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 600;
}

a {
  color: #1a1a1a;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

h2 > span {
  padding: 0 0.1em;
  background-image: linear-gradient(transparent 64%, rgba(74, 74, 74, 0.2) 64%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 页头 */
.masthead {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px 0;
}

.brandline {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 6px 2px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-dot {
  width: 15px;
  height: 15px;
  border: 2px solid #1a1a1a;
  border-radius: 52% 44% 58% 46%;
  transform: rotate(-13deg);
}

.pillrow {
  margin-top: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1a1a1a;
}

.pillrow p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 16px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  background: #fffdf8;
  border: 1.5px solid #1a1a1a;
  border-radius: 999px;
  transition: transform 110ms steps(3, end), background-color 110ms linear, color 110ms linear;
}

.pill:hover {
  color: #fafaf8;
  background: #1a1a1a;
  transform: translateY(-2px) rotate(-1.2deg);
}

/* 主体 */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.sheet {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.hero {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 34px;
  align-items: center;
  min-height: 70vh;
  padding: 24px 0 30px;
  overflow: hidden;
}

.hero-ghost {
  position: absolute;
  right: -0.05em;
  bottom: -0.16em;
  z-index: 0;
  font-size: clamp(130px, 28vw, 300px);
  font-weight: 600;
  line-height: 0.8;
  color: rgba(26, 26, 26, 0.055);
  user-select: none;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: right;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(29px, 5vw, 53px);
  line-height: 1.14;
}

.hero-copy h1::after {
  content: "";
  display: block;
  width: min(60%, 210px);
  height: 12px;
  margin: 15px 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M2 8C40 2 70 12 110 6S180 10 198 4' fill='none' stroke='%231a1a1a' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.hero-lead {
  margin: 16px 0 0;
  color: #4a4a4a;
}

.hero-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 10px 10px 30px;
  background: #fffdf8;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  transform: rotate(-1.6deg);
}

.hero-figure::after {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 78px;
  height: 24px;
  margin-left: -39px;
  background: rgba(74, 74, 74, 0.16);
  border: 1.5px solid rgba(26, 26, 26, 0.3);
  transform: rotate(-4deg);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 5px;
  filter: grayscale(0.38) contrast(1.06);
}

.hero-figure.empty {
  aspect-ratio: 4 / 5;
  border-style: dashed;
  background: transparent;
}

.hero-figure.empty::after {
  background: transparent;
}

/* 侧栏 */
.toc {
  grid-column: 1;
  position: sticky;
  top: 20px;
  padding: 15px 13px;
  background: #fffdf8;
  border: 1.5px solid #1a1a1a;
  border-radius: 10px;
  transform: rotate(-0.6deg);
}

.toc h2 {
  margin: 0 0 9px;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.toc h2 > span {
  background: none;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: t;
}

.toc li {
  counter-increment: t;
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 40px;
  padding: 7px 2px;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
}

.toc a::before {
  content: counter(t, decimal-leading-zero);
  font-size: 12px;
  letter-spacing: 0.09em;
  color: #4a4a4a;
}

.toc a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* 正文 */
.body {
  grid-column: 2;
  min-width: 0;
}

.body > section {
  margin: 0 0 26px;
  padding: 24px 22px;
  background: #fffdf8;
  border: 1.5px solid #1a1a1a;
  border-radius: 10px;
  rotate: var(--r, 0deg);
  scroll-margin-top: 18px;
}

.body > section:nth-child(odd) {
  --r: -0.3deg;
}

.body > section:nth-child(even) {
  --r: 0.28deg;
}

.body > section.pending {
  opacity: 0;
}

.body > section.in {
  animation: sketchIn 0.42s steps(4, end) both;
}

@keyframes sketchIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.body h2 {
  margin: 0 0 0.55em;
  font-size: clamp(21px, 2.6vw, 28px);
}

.body h3 {
  margin: 1.1em 0 0.5em;
  font-size: clamp(18px, 2vw, 21px);
}

.body p {
  margin: 0.85em 0;
}

.body ul,
.body ol {
  padding-left: 1.35em;
}

.body li {
  margin: 0.4em 0;
}

.body a {
  text-decoration-thickness: 2px;
}

.body blockquote {
  margin: 1.2em 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid #4a4a4a;
  color: #4a4a4a;
}

/* 页脚 */
.foot {
  max-width: 1080px;
  margin: 54px auto 0;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.fcta {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  padding: 32px 24px;
  background: #1a1a1a;
  border-radius: 10px;
  transform: rotate(-0.5deg);
}

.fcta h2 {
  margin: 0;
  font-size: clamp(29px, 6.6vw, 56px);
  letter-spacing: -0.025em;
  color: #fafaf8;
}

.fcta h2 > span {
  background: none;
}

.fcol h2 {
  margin: 0 0 7px;
  font-size: 15px;
  letter-spacing: 0.09em;
  color: #4a4a4a;
}

.fcol h2 > span {
  background: none;
}

.fcol p {
  margin: 0;
}

.fcol a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(26, 26, 26, 0.3);
}

.fcol a:hover {
  text-decoration: underline;
}

.fbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 2px solid #1a1a1a;
  font-size: 15px;
  color: #4a4a4a;
}

.fbar p {
  margin: 0;
}

.fbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  font-size: 16px;
}

/* 窄屏 */
@media (max-width: 860px) {
  .sheet {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: 0;
    padding: 10px 0 6px;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-copy h1::after {
    margin: 13px 0 0;
  }

  .hero-lead {
    margin-top: 13px;
  }

  .hero-figure img,
  .hero-figure.empty {
    aspect-ratio: 5 / 4;
  }

  .hero-ghost {
    font-size: clamp(110px, 42vw, 210px);
  }

  .toc {
    grid-column: 1;
    position: static;
    transform: none;
  }

  .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .toc a {
    min-height: 40px;
    padding: 7px 13px;
    border: 1.5px solid rgba(26, 26, 26, 0.42);
    border-radius: 999px;
  }

  .body {
    grid-column: 1;
  }

  .body > section {
    --r: 0deg;
    padding: 22px 17px;
  }

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }

  .fbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 400px) {
  body {
    font-size: 16px;
  }

  .pill {
    padding: 7px 13px;
    font-size: 15px;
  }

  .brand {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .body > section.pending {
    opacity: 1;
  }
}

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