@charset "utf-8";

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --mid: #4a4a4a;
  --line: #ddd9d2;
  --shadow: 0 6px 16px rgba(26, 26, 26, 0.1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.78 "Cabin", -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(74, 74, 74, 0.05) 0 1px, transparent 1px 6px),
    radial-gradient(circle at 15% 9%, rgba(74, 74, 74, 0.07), transparent 46%),
    radial-gradient(circle at 86% 72%, rgba(26, 26, 26, 0.055), transparent 42%);
}

a {
  color: inherit;
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 250, 248, 0.95);
  border-bottom: 2px dashed var(--line);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 18px;
}

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

.pill-group.right {
  justify-content: flex-end;
}

.pill-group a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 15px;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  transition: transform 0.12s cubic-bezier(0.2, 0.7, 0.3, 1),
    background 0.12s, border-color 0.12s, color 0.12s;
}

.pill-group a:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px) rotate(-1.6deg);
}

.pill-group.right li:last-child a {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.pill-group.right li:last-child a:hover {
  background: var(--mid);
  border-color: var(--mid);
}

.brand {
  padding: 4px 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transform: rotate(-0.9deg);
}

.brand:hover {
  color: var(--mid);
}

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  counter-reset: sec;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 32px;
  min-height: 70vh;
  padding: clamp(26px, 5vw, 56px) 0 42px;
  border-bottom: 2px dashed var(--line);
}

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

.ghost {
  position: absolute;
  top: -0.55em;
  right: 0;
  z-index: 0;
  font-family: "Amatic SC", "Cabin", sans-serif;
  font-size: clamp(92px, 16vw, 172px);
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: rgba(26, 26, 26, 0.09);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0.005em;
}

.hero h1::after {
  content: "";
  display: block;
  width: 118px;
  height: 7px;
  margin: 14px 0 0 auto;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 11px,
    transparent 11px 17px
  );
  border-radius: 2px;
  transform: rotate(-1.2deg);
}

.hero-desc {
  max-width: 44ch;
  margin: 0 0 0 auto;
  color: var(--mid);
  font-size: 17px;
}

.side {
  position: sticky;
  top: 96px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid var(--ink);
  border-radius: 15px 5px 16px 6px;
  box-shadow: var(--shadow);
  transform: rotate(-0.7deg);
}

.side small {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--mid);
}

.side h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.side-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 4px;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.side-list a:hover {
  background: rgba(74, 74, 74, 0.07);
  color: var(--mid);
}

article[id] {
  scroll-margin-top: 150px;
}

.main > article[id] {
  padding: 34px 0 30px;
  border-bottom: 2px dashed var(--line);
}

.main > article[id]::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 4px;
  font-family: "Amatic SC", "Cabin", sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--mid);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.main h2 {
  margin: 16px 0 12px;
  font-size: clamp(24px, 3.2vw, 31px);
  line-height: 1.26;
}

.main h3 {
  margin: 22px 0 10px;
  font-size: 21px;
  line-height: 1.35;
}

.main small {
  display: block;
  margin-bottom: 3px;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--mid);
}

.main p {
  margin: 0 0 14px;
}

.main ul,
.main ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.main li {
  margin: 0 0 8px;
}

.main a {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(26, 26, 26, 0.38);
  text-underline-offset: 3px;
}

.main a:hover {
  text-decoration-color: var(--ink);
  background: rgba(26, 26, 26, 0.05);
}

.main figure {
  margin: 20px 0;
  padding: 10px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: var(--shadow);
  transform: rotate(-0.4deg);
}

.main figcaption {
  margin-top: 8px;
  font-size: 16px;
  color: var(--mid);
  text-align: center;
}

.main img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  filter: grayscale(0.12) contrast(1.04);
}

.main blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  font-size: 17px;
  background: rgba(26, 26, 26, 0.045);
  border-left: 4px solid var(--ink);
}

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

.main table {
  width: 100%;
  margin: 18px 0;
  font-size: 16px;
  border-collapse: collapse;
}

.main th,
.main td {
  padding: 9px 10px;
  text-align: left;
  border: 1px dashed var(--line);
}

.main th {
  background: rgba(74, 74, 74, 0.08);
}

.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 18px 64px;
  text-align: center;
}

.foot-cta {
  margin: 0 0 26px;
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 10px 34px;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transform: rotate(-0.7deg);
  transition: transform 0.12s cubic-bezier(0.2, 0.7, 0.3, 1),
    background 0.12s, border-color 0.12s;
}

.foot-cta a:hover {
  background: var(--mid);
  border-color: var(--mid);
  transform: rotate(0.9deg);
}

.foot-copy {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: 0.09em;
  color: var(--mid);
}

.foot small {
  font-size: 16px;
  color: var(--mid);
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 220px;
  }

  .nav {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    padding: 8px 12px;
  }

  .brand {
    order: -1;
    font-size: 20px;
    white-space: normal;
    transform: none;
  }

  .pill-group,
  .pill-group.right {
    justify-content: center;
    gap: 6px;
  }

  .pill-group a {
    min-height: 40px;
    padding: 6px 12px;
  }

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

  .ghost {
    top: -0.45em;
    font-size: clamp(78px, 26vw, 130px);
  }

  .side {
    position: static;
    transform: rotate(-0.5deg);
  }

  article[id] {
    scroll-margin-top: 220px;
  }

  .main > article[id] {
    padding: 28px 0 24px;
  }
}

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

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

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