@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --graphite: #4a4a4a;
  --hair: #b9b9b4;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "Sarasa Mono SC", "Noto Sans Mono CJK SC", "Courier New", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: .01em;
  font-variant-ligatures: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .3;
  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='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23a)' opacity='0.34'/%3E%3C/svg%3E");
}

img { max-width: 100%; }

a { color: var(--ink); }

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

/* ---------- 顶部两行 ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px dashed var(--ink);
  padding: .45rem clamp(12px, 4vw, 44px) .55rem;
}

.tape {
  margin: 0 0 .3rem;
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--graphite);
  border-bottom: 1px dotted var(--hair);
  padding-bottom: .35rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brandrow {
  display: flex;
  align-items: center;
  padding: .1rem 0 .45rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .15rem .1rem;
  text-decoration: none;
  color: var(--ink);
}

.mark-img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 1px solid var(--ink);
  filter: grayscale(1) contrast(1.35);
  transform: rotate(-2deg);
}

.mark-dot {
  display: block;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 52% 44% 58% 46%;
  animation: wobble 7s steps(2, end) infinite;
}

.mark .brandname {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.masthead nav {
  overflow-x: auto;
  padding-bottom: .2rem;
  scrollbar-width: thin;
}

.masthead nav ul {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.masthead nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .25rem .62rem;
  font-size: .88rem;
  color: var(--graphite);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform .05s steps(2, end), color .05s linear;
}

.masthead nav a:hover {
  color: var(--ink);
  border-color: var(--ink);
  transform: rotate(-1deg);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  justify-items: end;
  overflow: hidden;
  padding: clamp(18px, 6vw, 64px);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image: radial-gradient(var(--graphite) 1px, transparent 1px);
  background-size: 15px 15px;
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2);
  opacity: .6;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(250, 250, 248, .12) 0%, rgba(250, 250, 248, .82) 58%, rgba(250, 250, 248, .96) 100%);
}

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

.hero-copy h1 {
  margin: 0 0 .9rem;
  font-size: clamp(1.9rem, 7vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -.01em;
  transform: rotate(-.5deg);
  text-shadow: 2px 2px 0 rgba(250, 250, 248, .8);
}

.hero-desc {
  margin: 0 0 .4rem;
  font-size: .98rem;
  line-height: 1.7;
  color: var(--graphite);
}

.hero-desc::after {
  content: "";
  display: block;
  width: 6rem;
  height: 2px;
  margin: .9rem 0 0 auto;
  background: var(--ink);
  transform: rotate(-1.4deg);
}

/* ---------- 版心 ---------- */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: clamp(20px, 4vw, 46px);
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 60px) clamp(14px, 4vw, 44px);
}

.sheet {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: clamp(16px, 3.2vw, 34px);
}

.prose > section {
  border-top: 1px dashed var(--hair);
  margin-top: 2rem;
  padding-top: 1.4rem;
  scroll-margin-top: 9rem;
}

.prose > section:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.prose p {
  margin: 0 0 1.05em;
}

.prose h2,
.prose h3 {
  margin: 2rem 0 .5rem;
  line-height: 1.35;
  letter-spacing: .01em;
}

.prose h2 {
  font-size: 1.32rem;
}

.prose h3 {
  font-size: 1.08rem;
  color: var(--graphite);
}

.prose h2::before {
  content: "";
  display: inline-block;
  width: .5rem;
  height: .5rem;
  margin-right: .5rem;
  background: var(--ink);
  vertical-align: .06em;
  transform: rotate(-9deg);
}

.prose hr {
  border: 0;
  border-top: 2px dashed var(--ink);
  margin: .5rem 0 1.1rem;
  opacity: .55;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

.prose li { margin-bottom: .4em; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.prose a:hover { text-decoration-style: solid; }

.prose img {
  display: block;
  height: auto;
  border: 1px solid var(--ink);
  filter: grayscale(1) contrast(1.12);
  transform: rotate(-.35deg);
  margin: 0 0 1.1em;
}

.prose figure { margin: 0 0 1.1em; }

.prose blockquote {
  margin: 0 0 1.1em;
  padding: .8em 1em;
  border-left: 3px solid var(--ink);
  background: rgba(74, 74, 74, .06);
  color: var(--graphite);
}

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

.prose code {
  font-size: .92em;
  padding: .1em .35em;
  border: 1px dashed var(--hair);
}

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

.prose th,
.prose td {
  border: 1px solid var(--hair);
  padding: .5em .6em;
  text-align: left;
  vertical-align: top;
}

.prose th { background: rgba(74, 74, 74, .07); }

.prose time { color: var(--graphite); }

/* ---------- 右侧栏 ---------- */
.margin {
  position: sticky;
  top: 9.5rem;
  align-self: start;
  font-size: .9rem;
}

.margin h2 {
  margin: 0 0 .35rem;
  font-size: .86rem;
  letter-spacing: .22em;
  color: var(--graphite);
}

.margin hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 0 0 .9rem;
  width: 2.4rem;
}

.margin ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .16rem;
}

.margin a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .65rem;
  color: var(--graphite);
  text-decoration: none;
  border: 1px dashed var(--hair);
  transition: transform .05s steps(2, end);
}

.margin a:hover {
  color: var(--ink);
  border-style: solid;
  border-color: var(--ink);
  transform: rotate(-.8deg);
}

/* ---------- 页脚 ---------- */
footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: clamp(14px, 3vw, 34px);
  align-items: start;
  margin-top: clamp(30px, 6vw, 70px);
  padding: clamp(22px, 4vw, 44px) clamp(14px, 4vw, 44px) 2.2rem;
  border-top: 2px solid var(--ink);
  background: var(--paper);
}

.foot-cta {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -.01em;
  transform: rotate(-.6deg);
}

.foot-cta span { display: block; }

.foot-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .8rem;
  padding: .55rem 1rem;
  font-size: .92rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--ink);
  transform: rotate(1deg);
}

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

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .9rem;
  font-size: .86rem;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--graphite);
  text-decoration: none;
  border-bottom: 1px dotted var(--hair);
}

.foot-links a:hover { color: var(--ink); border-bottom-style: solid; }

footer small {
  font-size: .76rem;
  line-height: 1.7;
  color: var(--graphite);
  text-align: right;
  justify-self: end;
}

/* ---------- 动效 ---------- */
@keyframes wobble {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(7deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 26px;
  }

  .margin {
    position: static;
    border-top: 1px dashed var(--hair);
    padding-top: 1.1rem;
  }

  .margin ul {
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: .3rem .5rem;
  }

  footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }

  footer small {
    text-align: left;
    justify-self: start;
  }

  .hero {
    min-height: 84vh;
  }
}

@media (max-width: 480px) {
  body { font-size: 16.5px; }

  .sheet { padding: 14px 13px; }

  .masthead nav a { font-size: .84rem; padding: .25rem .5rem; }

  .hero { padding: 18px 16px 26px; }

  .hero-copy h1 { text-shadow: none; }
}

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