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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #4a4a4a;
  --hair: rgba(0, 0, 0, .32);
  --serif: "Noto Serif TC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Noto Sans TC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

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

/* ---------- 顶部细条 ---------- */
.rail {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: .26em;
  text-align: center;
  padding: 7px 12px;
}

/* ---------- 刊头 ---------- */
.top {
  background: var(--paper);
}

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--hair);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: clamp(21px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ink);
  text-decoration: none;
}

.brand .mark {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--ink);
  opacity: .5;
  order: -1;
}

.brand { order: 1; }
.rule { order: 0; }

/* ---------- 导航 ---------- */
.menu {
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}

.menu ol {
  list-style: none;
  margin: 0;
  padding: 4px clamp(10px, 3.5vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.menu a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: background .18s ease, border-color .18s ease;
}

.menu a:hover,
.menu a:focus-visible {
  background: rgba(0, 0, 0, .06);
  border-bottom-color: var(--ink);
}

.no {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  opacity: .5;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 20px;
  padding: clamp(26px, 5vw, 64px) clamp(16px, 5vw, 60px) 0;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 17px 17px;
  opacity: .18;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  gap: 18px;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 7.4vw, 5.2rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.hero-brand {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: .5em;
}

.hero-fig {
  margin: 0;
  overflow: hidden;
}

.hero-img {
  display: block;
  width: 100%;
  max-height: 46svh;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  will-change: transform;
}

/* ---------- 主体网格 ---------- */
.wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 70px) clamp(16px, 4vw, 44px);
}

/* ---------- 侧栏 ---------- */
.side {
  align-self: start;
  position: sticky;
  top: 18px;
  padding: 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: rgba(255, 255, 255, .58);
  backdrop-filter: blur(9px) saturate(1.1);
  -webkit-backdrop-filter: blur(9px) saturate(1.1);
}

.side-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .22em;
}

.side-h .d {
  font-size: 15px;
  opacity: .5;
}

.toc {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 1px;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 5px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 0, 0, .28);
  transition: background .16s ease, color .16s ease;
}

.toc a:hover,
.toc a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.pull {
  margin: 0 0 22px;
  padding: 12px 12px 12px 14px;
  border-left: 4px solid var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
}

.side-host {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  word-break: break-all;
  opacity: .8;
}

/* ---------- 正文 ---------- */
.lede { min-width: 0; }

.prose {
  max-width: 66ch;
}

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

.prose article {
  padding-bottom: clamp(30px, 4vw, 56px);
}

.prose article + article {
  border-top: 1px solid var(--hair);
  padding-top: clamp(30px, 4vw, 56px);
}

.prose article:last-child { padding-bottom: 0; }

.prose h2 {
  position: relative;
  margin: 0 0 .62em;
  padding-left: .72em;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.25;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: .3em;
  height: .3em;
  background: var(--ink);
}

.prose h3 {
  margin: 1.5em 0 .5em;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  line-height: 1.35;
}

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

.prose article > p:first-of-type::first-letter {
  float: left;
  font-size: 4.1em;
  line-height: .8;
  font-weight: 700;
  padding: .04em .1em 0 0;
}

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

.prose li { margin: .34em 0; }

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

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--ink);
  background: rgba(0, 0, 0, .035);
  font-size: 1.04em;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: grayscale(1);
}

.prose figure {
  margin: 1.4em 0;
}

.prose figcaption {
  margin-top: .5em;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--mute);
}

.prose table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  border: 1px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 页脚 ---------- */
footer {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  grid-template-areas:
    "brand form host"
    "links links copy";
  gap: 22px;
  padding: clamp(30px, 5vw, 56px) clamp(16px, 4vw, 48px) 26px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
}

footer p { margin: 0; }

.f-brand {
  grid-area: brand;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: .14em;
}

.f-form {
  grid-area: form;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.f-form input {
  flex: 1 1 150px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 0;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  font-family: var(--sans);
  font-size: 16px;
}

.f-form input::placeholder { color: rgba(255, 255, 255, .68); }

.f-form button {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid #fff;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: var(--sans);
  font-size: 16px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.f-form button:hover,
.f-form button:focus-visible {
  background: #000;
  color: #fff;
}

.f-host {
  grid-area: host;
  text-align: right;
  font-size: 16px;
  letter-spacing: .08em;
  word-break: break-all;
  opacity: .82;
}

.f-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .32);
}

.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.f-links a:hover,
.f-links a:focus-visible { border-bottom-color: #fff; }

.f-links .sep { opacity: .55; }

.f-copy {
  grid-area: copy;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .32);
  font-size: 16px;
  letter-spacing: .06em;
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .62s ease, transform .62s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

  .side {
    position: static;
    order: -1;
  }

  .prose { max-width: none; }

  .hero-img { max-height: 34svh; }

  footer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "form"
      "host"
      "links"
      "copy";
    gap: 16px;
  }

  .f-host,
  .f-copy {
    text-align: left;
    justify-content: flex-start;
  }

  .f-copy { padding-top: 12px; }
}

@media (max-width: 420px) {
  .brand { letter-spacing: .1em; }
  .menu ol { padding-left: 6px; padding-right: 6px; }
  .menu a { padding: 8px 7px; }
  .hero { padding-left: 14px; padding-right: 14px; }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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