@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Work+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #6a6a6a;
  --line: #111111;
  --hair: #dcdcdc;
  --soft: #f2f2f2;
  --radius: 10px;
  --gutter: clamp(1.15rem, 4vw, 4.5rem);
  --head-h: 7.5rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', 'Outfit', system-ui, -apple-system, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: 'Outfit', 'Work Sans', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
}

p,
ul,
ol,
figure,
address {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

.skip {
  position: absolute;
  left: 0;
  top: -3.2rem;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: top 0.2s ease;
}

.skip:focus {
  top: 0;
}

/* ---------- 顶栏 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  padding: 0.55rem var(--gutter) 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.15rem;
}

.mark {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: background 0.22s ease, transform 0.22s ease;
}

.mark__dot {
  width: 12px;
  height: 12px;
  background: var(--ink);
  border-radius: 50%;
  transition: background 0.22s ease, transform 0.22s ease;
}

.mark:hover {
  background: var(--ink);
}

.mark:hover .mark__dot {
  background: var(--paper);
  transform: scale(1.35);
}

.find {
  justify-self: end;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 100%;
}

.find__input {
  border: 0;
  background: transparent;
  padding: 0 0.85rem;
  min-height: 40px;
  width: 9.5rem;
  max-width: 42vw;
  outline-offset: -2px;
}

.find__input::placeholder {
  color: var(--mute);
}

.find__btn {
  border: 0;
  border-left: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0 0.9rem;
  min-height: 40px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.22s ease;
}

.find__btn:hover {
  background: #2b2b2b;
}

.jump {
  grid-column: 1 / -1;
  margin-top: 0.2rem;
}

.jump p {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  overflow-x: auto;
  scrollbar-width: thin;
  border-top: 1px solid var(--hair);
  padding-top: 0.15rem;
}

.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex: 0 0 auto;
  font-size: 15px;
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.22s ease;
}

.jump a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.6rem;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.jump a:hover::after,
.jump a:focus-visible::after {
  transform: scaleX(1);
}

/* ---------- 首屏 ---------- */

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  column-gap: clamp(1.5rem, 5vw, 4.5rem);
  row-gap: 1.75rem;
  align-items: start;
  min-height: 70vh;
  padding: clamp(1.6rem, 4vw, 3.4rem) var(--gutter) clamp(1.4rem, 4vw, 2.6rem);
  border-bottom: 0;
}

.masthead::after {
  content: '';
  grid-column: 1 / -1;
  height: 16px;
  background: var(--ink);
  margin-top: clamp(1.4rem, 4vw, 2.8rem);
  clip-path: polygon(0 0, 100% 34%, 100% 100%, 0 100%);
}

.masthead__lead {
  grid-column: 1;
  grid-row: 1;
  max-width: 22ch;
}

.masthead__title {
  font-size: clamp(2.5rem, 8.5vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

.masthead__lede {
  margin-top: clamp(1rem, 2.5vw, 1.6rem);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.6;
  color: #262626;
  border-left: 3px solid var(--ink);
  padding-left: 0.95rem;
  max-width: 34ch;
}

.masthead__fig {
  grid-column: 2;
  grid-row: 1;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--ink);
}

.masthead__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 右侧栏 ---------- */

.rail {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: calc(var(--head-h) + 1rem);
  border-top: 3px solid var(--ink);
  padding-top: 0.7rem;
}

.rail__kick {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
}

.rail__head {
  font-size: 1.22rem;
  margin-top: 0.35rem;
  letter-spacing: -0.01em;
}

.rail__list {
  list-style: none;
  counter-reset: rail;
  margin-top: 0.7rem;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

.rail__list li {
  counter-increment: rail;
  border-bottom: 1px solid var(--hair);
}

.rail__list a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 42px;
  font-size: 0.95rem;
  transition: padding-left 0.22s ease, background 0.22s ease;
}

.rail__list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: 'Outfit', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mute);
  min-width: 1.5rem;
}

.rail__list a:hover {
  padding-left: 0.35rem;
  background: var(--soft);
}

@media (prefers-reduced-motion: no-preference) {
  .rail__list li {
    animation: rise 0.5s ease both;
  }
  .rail__list li:nth-child(2) { animation-delay: 0.05s; }
  .rail__list li:nth-child(3) { animation-delay: 0.1s; }
  .rail__list li:nth-child(4) { animation-delay: 0.15s; }
  .rail__list li:nth-child(5) { animation-delay: 0.2s; }
  .rail__list li:nth-child(6) { animation-delay: 0.25s; }
  .rail__list li:nth-child(7) { animation-delay: 0.3s; }
}

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

/* ---------- 正文区 ---------- */

main > section {
  scroll-margin-top: calc(var(--head-h) + 0.75rem);
  padding: clamp(2.2rem, 5.5vw, 4.5rem) var(--gutter);
  border-top: 1px solid var(--ink);
}

main > section:first-of-type {
  border-top: 0;
}

main > section > * + * {
  margin-top: 1rem;
}

main h2 {
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  max-width: 24ch;
}

main h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  margin-top: 1.7rem;
}

main p,
main li {
  max-width: 70ch;
}

main ul,
main ol {
  padding-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
}

main blockquote {
  margin: 1.4rem 0;
  border-left: 4px solid var(--ink);
  padding: 0.3rem 0 0.3rem 1rem;
  font-size: 1.06rem;
}

main img {
  border-radius: var(--radius);
  border: 1px solid var(--hair);
}

main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

main th,
main td {
  border-bottom: 1px solid var(--hair);
  text-align: left;
  padding: 0.55rem 0.4rem;
}

main a {
  border-bottom: 1px solid var(--ink);
}

main section.is-hit {
  background: var(--soft);
  box-shadow: inset 5px 0 0 var(--ink);
}

/* ---------- 页脚 ---------- */

.foot {
  border-top: 1px solid var(--ink);
  padding: clamp(1.6rem, 4vw, 3rem) var(--gutter) clamp(2rem, 5vw, 3.2rem);
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

.foot__brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 17vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
  margin-bottom: clamp(1.2rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}

.foot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1.5rem;
  border-top: 1px solid var(--hair);
  padding-top: 0.9rem;
  font-size: 0.92rem;
}

.foot__addr {
  font-style: normal;
  color: var(--mute);
  overflow-wrap: anywhere;
}

.foot__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  margin: 0;
}

.foot__list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.22s ease;
}

.foot__list a:hover {
  border-bottom-color: var(--ink);
}

.foot__copy {
  width: 100%;
  text-align: center;
  color: var(--mute);
  font-size: 0.86rem;
  margin-top: 0.5rem;
}

/* ---------- 回到顶部 ---------- */

.totop {
  position: fixed;
  right: clamp(0.9rem, 3vw, 2rem);
  bottom: clamp(0.9rem, 3vw, 2rem);
  z-index: 45;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: var(--radius);
  padding: 0 1rem;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.92rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.totop.on {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  :root {
    --head-h: 8.5rem;
  }
  .masthead {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    row-gap: 1.4rem;
  }
  .masthead__lead,
  .masthead__fig,
  .rail {
    grid-column: 1;
    grid-row: auto;
  }
  .masthead__lead {
    max-width: 26ch;
  }
  .masthead__fig {
    aspect-ratio: 5 / 4;
  }
  .rail {
    position: static;
  }
  .rail__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.9rem;
  }
  .rail__list li {
    border-bottom: 1px solid var(--hair);
  }
}

@media (max-width: 560px) {
  :root {
    --head-h: 9rem;
  }
  body {
    font-size: 16px;
  }
  .jump p {
    flex-wrap: nowrap;
    gap: 0 1.1rem;
    padding-bottom: 0.1rem;
  }
  .find__input {
    width: 8.5rem;
    max-width: 40vw;
  }
  .rail__list {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot__meta {
    justify-content: center;
    text-align: center;
  }
  .foot__list {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rail__list li {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

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