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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rule: rgba(0, 0, 0, 0.16);
  --faint: rgba(0, 0, 0, 0.06);
  --serif: 'Noto Naskh Arabic', Georgia, 'Songti SC', 'Source Han Serif SC', 'Times New Roman', serif;
  --sans: 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --pad: clamp(18px, 4vw, 64px);
  --sheet: 1360px;
  --header-h: 108px;
}

* {
  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(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

img {
  max-width: 100%;
}

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

p {
  font-size: 17px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 90;
  text-decoration: none;
}

.skip:focus {
  left: 8px;
  top: 8px;
}

/* ---------- 报头 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.masthead__brandrow {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px var(--pad) 8px;
}

.masthead__rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  text-decoration: none;
  color: var(--ink);
}

.brand__inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brandmark {
  width: auto;
  height: 34px;
  display: block;
}

.brand__mark {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  border: 2px solid var(--ink);
  padding: 2px 8px 4px;
}

.brand__name {
  font-family: var(--serif);
  font-size: clamp(21px, 3.2vw, 30px);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.masthead__navrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px var(--pad) 6px;
  border-top: 1px solid var(--rule);
}

.menu {
  flex: 1;
  min-width: 0;
}

.menu summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 2px;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.1em;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary::after {
  content: '';
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: var(--ink);
  transform: translateY(3px);
  transition: transform 0.2s ease;
}

.menu[open] summary::after {
  transform: rotate(180deg) translateY(-2px);
}

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

.menu__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.menu__list li:last-child a {
  border-bottom: 0;
}

.menu__list a:hover,
.menu__list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.cta:hover,
.cta:focus-visible {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

@media (min-width: 900px) {
  .menu {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .menu summary {
    border-right: 2px solid var(--ink);
    padding-right: 16px;
    min-height: 34px;
  }

  .menu summary::after {
    border-top-color: var(--ink);
  }

  .menu__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
  }

  .menu__list a {
    border-bottom: 0;
    border-left: 1px solid var(--rule);
    padding: 0 14px;
    letter-spacing: 0.02em;
  }

  .menu__list li:first-child a {
    border-left: 0;
  }
}

/* ---------- 头版 ---------- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--sheet);
  margin: 0 auto;
  padding: 0 var(--pad);
}

main article[id] {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.hero {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 86svh;
  margin: 0 calc(var(--pad) * -1);
  padding: 110px var(--pad) clamp(56px, 9vh, 96px);
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
}

.hero--plain {
  background-color: var(--ink);
  background-image: repeating-linear-gradient(
    135deg,
    #131313 0 10px,
    #000000 10px 20px
  );
}

.hero__fig {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

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

.hero--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.18) 38%,
    rgba(0, 0, 0, 0.86) 100%
  );
}

.hero figcaption {
  position: absolute;
  right: var(--pad);
  bottom: 54px;
  z-index: 2;
  font-size: 16px;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  color: rgba(255, 255, 255, 0.78);
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: 44ch;
}

.hero__h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 8.4vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.hero__sub {
  display: grid;
  gap: 8px;
  max-width: 40ch;
  border-top: 2px solid var(--paper);
  padding-top: 14px;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--paper);
}

.hero__brand::before {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--paper);
  opacity: 0.7;
}

.hero .subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.hero__slope {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(26px, 4vw, 46px);
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 4;
}

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

.sheet {
  padding: clamp(30px, 5vw, 60px) 0 12px;
  min-width: 0;
}

.sheet > article {
  padding-block: clamp(26px, 3.6vw, 48px);
  border-top: 1px solid var(--rule);
}

.sheet > article:first-child {
  border-top: 0;
  padding-top: 0;
}

.sheet h2 {
  margin: 0 0 0.55em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.18;
  letter-spacing: 0.01em;
}

.sheet h2::after {
  content: '';
  display: block;
  width: 58px;
  height: 4px;
  margin-top: 14px;
  background: var(--ink);
}

.sheet h3 {
  margin: 1.5em 0 0.5em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.3;
}

.sheet p {
  margin: 0 0 1.15em;
  line-height: 1.85;
}

.sheet > article > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.9em;
  line-height: 0.82;
  padding: 0.04em 0.12em 0 0;
  font-weight: 600;
}

.sheet a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.sheet a:hover {
  background: var(--faint);
}

.sheet ul,
.sheet ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.sheet li {
  margin-bottom: 0.5em;
}

.sheet img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.6em 0;
  border: 1px solid var(--rule);
}

.sheet figure {
  margin: 1.8em 0;
}

.sheet figcaption {
  font-size: 16px;
  color: #444;
  border-left: 3px solid var(--ink);
  padding-left: 10px;
  margin-top: 8px;
}

.sheet blockquote {
  margin: 2em 0;
  padding: 4px 0 4px clamp(16px, 3vw, 30px);
  border-left: 7px solid var(--ink);
  font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.55;
}

.sheet blockquote p {
  margin-bottom: 0.4em;
}

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

.sheet th,
.sheet td {
  border: 1px solid var(--rule);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.sheet th {
  background: var(--faint);
  font-weight: 600;
}

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

.rail {
  padding: 8px 0 44px;
  min-width: 0;
}

.rail__h2 {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.34em;
}

.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
}

.rail__list a::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--ink);
  flex: 0 0 auto;
}

.rail__list a:hover,
.rail__list a:focus-visible {
  padding-left: 8px;
  background: var(--faint);
}

@media (min-width: 1024px) {
  main {
    grid-template-columns: minmax(0, 1fr) 286px;
    column-gap: clamp(34px, 4vw, 76px);
  }

  .hero {
    grid-column: 1 / -1;
  }

  .sheet {
    grid-column: 1;
  }

  .rail {
    grid-column: 2;
    position: sticky;
    top: calc(var(--header-h) + 16px);
    align-self: start;
    padding-top: clamp(30px, 5vw, 60px);
  }
}

@media (min-width: 1120px) {
  .sheet > article > p {
    column-count: 2;
    column-gap: clamp(28px, 3.4vw, 54px);
  }

  .sheet > article > p:first-of-type::first-letter {
    font-size: 3.2em;
  }
}

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

.foot {
  display: grid;
  gap: 18px;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 26px var(--pad) 34px;
  background: var(--ink);
  color: var(--paper);
  border-top: 5px solid var(--ink);
}

.foot a {
  color: var(--paper);
  text-decoration: none;
}

.brand--foot .brandmark {
  filter: invert(1);
}

.brand--foot .brand__mark {
  border-color: var(--paper);
}

.foot .brand__name {
  font-size: 22px;
}

.foot__nav {
  min-width: 0;
}

.foot__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot__menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  border-bottom: 1px solid transparent;
}

.foot__menu a:hover,
.foot__menu a:focus-visible {
  border-bottom-color: var(--paper);
}

.foot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  padding-top: 14px;
}

.foot__copy {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.82);
}

.foot__top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 16px;
  border-bottom: 1px solid var(--paper);
}

@media (min-width: 820px) {
  .foot {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
  }

  .foot__meta {
    border-top: 0;
    padding-top: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
}

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

.totop {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  border: 2px solid var(--paper);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.totop.on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* ---------- 滚动显现 ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .totop {
    transition: none;
  }
}

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