@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --paper: #fafaf8;
  --gray: #4a4a4a;
  --ink: #1a1a1a;
  --line: rgba(26, 26, 26, 0.16);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace;
  font-size: 17px;
  line-height: 1.75;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(26, 26, 26, 0.026) 0 1px, rgba(0, 0, 0, 0) 1px 4px),
    repeating-linear-gradient(90deg, rgba(26, 26, 26, 0.018) 0 1px, rgba(0, 0, 0, 0) 1px 7px),
    radial-gradient(circle at 82% 12%, rgba(26, 26, 26, 0.05), rgba(0, 0, 0, 0) 46%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  background: rgba(26, 26, 26, 0.06);
}

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

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

/* 顶部 */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.mark {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-2deg);
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mark:hover {
  transform: rotate(2deg) translateY(-1px);
  background: #fff;
}

.tape {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tape p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  white-space: nowrap;
}

.tape a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  color: var(--gray);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.tape a:hover,
.tape a:focus {
  color: var(--ink);
  border-bottom-color: var(--ink);
  background: rgba(26, 26, 26, 0.04);
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
  transform: rotate(-0.6deg);
}

.cta:hover {
  background: var(--paper);
  color: var(--ink);
  transform: rotate(0.9deg) translateY(-1px);
}

/* 骨架 */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  column-gap: 2.75rem;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
}

.hero {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 4.6rem);
  margin-inline: -1.5rem;
  padding: 3rem 1.5rem 3.5rem;
  border-bottom: 1px solid var(--ink);
}

.hero-bg {
  position: absolute;
  right: -3vw;
  bottom: -4vh;
  z-index: 0;
  font-size: clamp(4.5rem, 21vw, 16rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  pointer-events: none;
  animation: heroDrift 16s ease-in-out infinite alternate;
}

.hero-h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.3rem, 6.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-align: left;
  text-wrap: balance;
  animation: inkIn 420ms steps(4) both;
}

.hero-rule {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 26rem);
  height: 8px;
  margin-top: 1.6rem;
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 9px, rgba(0, 0, 0, 0) 9px 15px);
  transform: rotate(-0.35deg);
  opacity: 0.85;
}

/* 正文 */
.sheet {
  grid-column: 1;
  min-width: 0;
}

.sheet > section {
  padding: 2.2rem 0 2.6rem;
  border-top: 1px solid var(--ink);
  scroll-margin-top: 5.6rem;
}

.sheet > section:first-child {
  border-top: 0;
  padding-top: 2.6rem;
}

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

.sheet h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 3.1vw, 1.95rem);
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.sheet h3 {
  margin: 1.8rem 0 0.7rem;
  font-size: 1.2rem;
  line-height: 1.35;
}

.sheet small {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--gray);
  font-size: 1rem;
  letter-spacing: 0.16em;
}

.sheet p {
  margin: 0 0 1.05rem;
  max-width: 66ch;
}

.sheet ul,
.sheet ol {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
  max-width: 66ch;
}

.sheet li {
  margin: 0 0 0.45rem;
}

.sheet li::marker {
  color: var(--gray);
}

.sheet blockquote {
  margin: 0 0 1.2rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--ink);
  color: var(--gray);
}

.sheet figure {
  margin: 0 0 1.2rem;
}

.sheet figcaption {
  margin-top: 0.4rem;
  color: var(--gray);
  font-size: 1rem;
}

.sheet img {
  display: block;
  filter: grayscale(0.18) contrast(1.06);
  border: 1px solid var(--gray);
}

.sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  font-size: 1rem;
}

.sheet th,
.sheet td {
  border: 1px solid var(--gray);
  padding: 0.5rem 0.6rem;
  text-align: left;
}

.sheet hr {
  border: 0;
  border-top: 1px dashed var(--gray);
  margin: 1.6rem 0;
}

/* 侧栏 */
.as {
  grid-column: 2;
  position: sticky;
  top: 5.6rem;
  padding-top: 2.6rem;
  min-width: 0;
}

.as-eye {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--gray);
  font-size: 1rem;
  letter-spacing: 0.2em;
}

.as-h {
  margin: 0 0 1rem;
  padding-bottom: 0.45rem;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--ink);
}

.as-list {
  display: grid;
}

.as-list a {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  min-height: 44px;
  padding: 0.6rem 0.15rem;
  color: var(--gray);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px dotted rgba(74, 74, 74, 0.5);
}

.as-list a:hover {
  color: var(--ink);
  background: rgba(26, 26, 26, 0.05);
  transform: translateX(2px);
}

.as-list .num {
  color: var(--ink);
  font-weight: 700;
}

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  max-width: 1180px;
  margin: 1rem auto 0;
  padding: 2.2rem 1.5rem 1.6rem;
  border-top: 1px solid var(--ink);
  background: rgba(26, 26, 26, 0.022);
}

.foot p {
  margin: 0;
  min-width: 0;
}

.f-brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  border-left: 3px solid var(--ink);
  padding-left: 0.6rem;
  line-height: 1.4;
}

.f-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.f-sub input {
  flex: 1 1 7rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 0;
}

.f-sub button {
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}

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

.f-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
}

.f-copy {
  grid-column: 1 / -1;
  display: block;
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  color: var(--gray);
  font-size: 1rem;
  border-top: 1px dashed rgba(74, 74, 74, 0.55);
}

@keyframes heroDrift {
  from {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  to {
    transform: translate3d(-3%, -2.5%, 0) rotate(1.2deg);
  }
}

@keyframes inkIn {
  from {
    opacity: 0.15;
    transform: translateY(10px) rotate(0.4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-width: 960px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 2.5rem;
  }

  .sheet {
    grid-column: 1;
  }

  .as {
    grid-column: 1;
    position: static;
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--gray);
  }

  .top {
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
  }

  .tape {
    order: 3;
    flex: 1 1 100%;
  }

  .cta {
    margin-left: auto;
  }

  .hero {
    min-height: calc(100svh - 8rem);
    margin-inline: -1rem;
    padding-inline: 1rem;
  }

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

  main {
    padding-inline: 1rem;
  }
}

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

  .hero-h1 {
    font-size: 2.1rem;
  }
}

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

  .hero-bg,
  .hero-h1 {
    animation: none;
  }

  .mark:hover,
  .cta:hover,
  .as-list a:hover {
    transform: none;
  }
}

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