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

:root {
  --red: #FF3B2F;
  --ink: #111827;
  --yel: #FFD400;
  --paper: #FFFDF5;
  --grey: #3b4250;
  --line: #111827;
  --head-h: 118px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Barlow', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}

img {
  border-radius: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶部侧栏 ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: var(--ink);
  border-bottom: 4px solid var(--red);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  padding: 0 8px;
  background: var(--red);
  color: var(--yel);
  text-decoration: none;
  border: 2px solid var(--yel);
  border-radius: 0;
  font: 700 20px/1 'Barlow Condensed', 'PingFang SC', sans-serif;
  letter-spacing: .04em;
  transition: background .15s ease, color .15s ease;
}

.brand:hover,
.brand:focus-visible {
  background: var(--yel);
  color: var(--ink);
}

.brandmark {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brandname {
  display: block;
}

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

.menu ul {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.menu ul::-webkit-scrollbar {
  display: none;
}

.menu a {
  display: block;
  padding: 13px 10px;
  color: var(--yel);
  text-decoration: none;
  white-space: nowrap;
  font: 600 17px/1.25 'Barlow Condensed', 'PingFang SC', sans-serif;
  letter-spacing: .02em;
  border-bottom: 3px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.menu a:hover,
.menu a:focus-visible {
  background: var(--red);
  color: #fff;
  border-bottom-color: var(--yel);
  outline: none;
}

.find {
  display: flex;
  margin-left: auto;
}

.find .q {
  width: 132px;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--yel);
  border-right: 0;
  border-radius: 0;
  background: #1b2434;
  color: #fff;
  font: 400 16px/1.2 'Barlow', 'PingFang SC', sans-serif;
}

.find .q::placeholder {
  color: #97a0b1;
}

.find .q:focus {
  outline: 3px solid var(--red);
  outline-offset: 0;
}

.find button {
  min-height: 46px;
  padding: 0 15px;
  border: 2px solid var(--yel);
  border-radius: 0;
  background: var(--yel);
  color: var(--ink);
  cursor: pointer;
  font: 700 16px/1 'Barlow Condensed', 'PingFang SC', sans-serif;
  letter-spacing: .06em;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.find button:hover,
.find button:focus-visible {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ---------- 主体 ---------- */

main {
  padding: 0 16px;
}

.doc {
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 26px 0 34px;
  text-align: right;
}

.hero-media {
  grid-template-columns: minmax(0, 1fr);
}

.hero-copy {
  order: -1;
  min-width: 0;
}

.hero h1 {
  margin: 0;
  font: 700 clamp(38px, 7.2vw, 76px)/0.97 'Barlow Condensed', 'PingFang SC', sans-serif;
  letter-spacing: .01em;
}

.lede {
  margin: 14px 0 0 auto;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--grey);
}

.collage {
  position: relative;
  min-height: 230px;
  height: 44vw;
  max-height: 340px;
}

.collage figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: var(--yel);
  border: 4px solid var(--ink);
  will-change: transform;
}

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

.fig-a {
  left: 0;
  top: 0;
  width: 64%;
  height: 74%;
}

.fig-b {
  right: 2%;
  bottom: 0;
  width: 56%;
  height: 62%;
  border-color: var(--red);
}

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

.doc > article {
  scroll-margin-top: var(--head-h);
}

.doc > article:not(.hero) {
  padding: 36px 0 12px;
  margin-top: 0;
  border-top: 4px solid var(--ink);
}

.doc > article.hit {
  background: #FFF6C9;
  outline: 4px solid var(--yel);
  outline-offset: 6px;
}

.doc h2,
.doc h3 {
  margin: 0 0 16px;
  font-family: 'Barlow Condensed', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  letter-spacing: .01em;
}

.doc h2 {
  font-size: clamp(26px, 4.2vw, 42px);
  line-height: 1.08;
  font-weight: 700;
}

.doc h2 > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 8px solid var(--yel);
}

.doc h2 > span > span {
  color: var(--red);
}

.doc h3 {
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.15;
  font-weight: 600;
}

.doc h3 > span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 4px solid var(--red);
}

.doc h3 > span > span {
  color: var(--red);
}

.doc p {
  margin: 0 0 17px;
  max-width: 72ch;
}

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

.doc a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  transition: background .15s ease;
}

.doc a:hover,
.doc a:focus-visible {
  background: var(--yel);
}

.doc ul,
.doc ol {
  margin: 0 0 18px;
  padding-left: 22px;
  max-width: 72ch;
}

.doc li {
  margin: 0 0 9px;
}

.doc li::marker {
  color: var(--red);
  font-weight: 700;
}

.doc strong,
.doc b {
  font-weight: 700;
  background: var(--yel);
  padding: 0 2px;
}

.doc em {
  font-style: normal;
  border-bottom: 2px dashed var(--red);
}

.doc blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: #fff;
  border: 2px solid var(--ink);
  border-left: 10px solid var(--red);
}

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

.doc img {
  max-width: 100%;
  height: auto;
  border: 3px solid var(--ink);
}

.doc figure {
  margin: 0 0 18px;
}

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

.doc th,
.doc td {
  padding: 9px 11px;
  border: 2px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--yel);
  font-weight: 700;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  background: #F0EEE4;
  padding: 1px 4px;
}

.doc hr {
  margin: 24px 0;
  border: 0;
  border-top: 4px solid var(--ink);
}

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

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 16px 26px;
  background: var(--ink);
  color: var(--yel);
  border-top: 4px solid var(--red);
}

.foot p,
.foot small {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.foot small a {
  display: inline-block;
  padding: 10px 0;
  color: var(--yel);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
}

.foot small a:hover,
.foot small a:focus-visible {
  color: #fff;
  border-bottom-color: var(--yel);
}

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

@media (max-width: 700px) {
  .rail {
    justify-content: space-between;
    gap: 10px;
  }

  .menu {
    order: 3;
    flex: 1 0 100%;
  }

  .find {
    margin-left: auto;
  }

  .find .q {
    width: 108px;
  }

  .doc > article {
    scroll-margin-top: 128px;
  }

  .collage {
    height: 58vw;
  }
}

@media (min-width: 861px) {
  .hero {
    min-height: 45vh;
  }

  .hero-media {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  .hero-copy {
    order: 0;
  }
}

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

  * {
    transition-duration: .01ms !important;
  }
}

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