@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

:root {
  --ink: #1B1B1F;
  --flame: #FF5A36;
  --paper: #F4F1EA;
  --line: #D8D1C2;
  --glass: rgba(255, 255, 255, 0.62);
  --soft: #FFB6A1;
  --dim: #A9A9B2;
  --radius: 10px;
}

*,
*::before,
*::after {
  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: "Atkinson Hyperlegible", Verdana, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--flame);
  outline-offset: 3px;
}

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

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 90;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.16s ease;
}

.skip:focus {
  transform: none;
}

/* 页头：上行为品牌细条，下行为栏目 */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.strip {
  background: var(--flame);
  border-bottom: 2px solid var(--ink);
  padding: 4px clamp(12px, 4vw, 30px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 4px 2px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
}

.brand .mark-img {
  border: 0;
  width: 24px;
  height: 24px;
}

.brand .name {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1px;
}

.menurow {
  padding: 0 clamp(6px, 3vw, 22px);
  overflow-x: auto;
  scrollbar-width: none;
}

.menurow::-webkit-scrollbar {
  display: none;
}

.nav-list {
  display: flex;
  gap: 2px;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li {
  display: flex;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 13px;
  border-bottom: 4px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.nav-list a:hover,
.nav-list a[aria-current] {
  border-bottom-color: var(--flame);
  background: rgba(255, 90, 54, 0.14);
}

.idx {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  opacity: 0.45;
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
  overflow: hidden;
  padding: clamp(30px, 6vw, 62px) clamp(16px, 5vw, 40px) clamp(40px, 7vw, 70px);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.1rem, 7.2vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero .lede {
  max-width: 42ch;
  margin: 16px 0 0;
  color: #DCD6C9;
  font-size: clamp(1rem, 2.4vw, 1.12rem);
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 26px;
  background: var(--flame);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* 主体：左栏 + 正文 */
main {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 34px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px) clamp(14px, 4vw, 30px) 72px;
}

.rail {
  position: sticky;
  top: 134px;
  padding: 14px 14px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(6px);
}

.rail-h {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.rail-h > span {
  border-bottom: 3px solid var(--flame);
  padding-bottom: 3px;
}

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

.rail-list li {
  animation: rise 0.36s ease both;
}

.rail-list li + li {
  border-top: 1px solid var(--line);
}

.rail-list li:nth-child(2) { animation-delay: 0.04s; }
.rail-list li:nth-child(3) { animation-delay: 0.08s; }
.rail-list li:nth-child(4) { animation-delay: 0.12s; }
.rail-list li:nth-child(5) { animation-delay: 0.16s; }
.rail-list li:nth-child(6) { animation-delay: 0.2s; }
.rail-list li:nth-child(7) { animation-delay: 0.24s; }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.16s ease, transform 0.16s ease;
}

.rail-list a:hover,
.rail-list a[aria-current] {
  color: #C33C1C;
  transform: translateX(3px);
}

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

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.totop:hover {
  background: var(--ink);
  color: var(--paper);
}

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

.doc-body > section {
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 28px);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(6px);
}

.doc-body > section:last-child {
  margin-bottom: 0;
}

.doc-body h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.25;
}

.doc-body h2 > span {
  border-bottom: 5px solid var(--flame);
  padding-bottom: 2px;
}

.doc-body h3 {
  margin: 22px 0 10px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.doc-body h3 > span {
  border-bottom: 3px solid var(--flame);
  padding-bottom: 1px;
}

.doc-body p {
  margin: 0 0 14px;
  line-height: 1.78;
}

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

.doc-body ul,
.doc-body ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
  line-height: 1.78;
}

.doc-body li {
  margin-bottom: 6px;
}

.doc-body a {
  color: #C33C1C;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-body a:hover {
  background: rgba(255, 90, 54, 0.2);
}

.doc-body strong {
  background: rgba(255, 90, 54, 0.24);
  padding: 0 3px;
}

.doc-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 6px solid var(--flame);
  background: rgba(255, 255, 255, 0.72);
}

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

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

.doc-body figcaption {
  margin-top: 8px;
  font-size: 16px;
  color: #57575F;
}

/* 页脚 */
.site-foot {
  border-top: 8px solid var(--flame);
  padding: clamp(26px, 5vw, 50px) clamp(14px, 4vw, 30px) 22px;
  background: var(--ink);
  color: var(--paper);
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: clamp(20px, 4vw, 46px);
  max-width: 1180px;
  margin: 0 auto;
}

.foot-brand h2 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.15;
}

.foot-brand h2 > span {
  border-bottom: 5px solid var(--flame);
  padding-bottom: 2px;
}

.foot-brand .totop {
  margin-top: 4px;
}

.foot-brand .totop:hover {
  background: var(--flame);
  color: var(--ink);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.foot-col {
  margin: 0;
}

.foot-col dt {
  margin-bottom: 4px;
  color: var(--soft);
  font-size: 16px;
  letter-spacing: 0.16em;
}

.foot-col dd {
  margin: 0;
}

.foot-col dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.foot-col dd a:hover {
  border-bottom-color: var(--flame);
  color: var(--soft);
}

.sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 1180px;
  margin: clamp(22px, 4vw, 36px) auto 0;
  padding-top: 20px;
  border-top: 2px solid #3A3A42;
}

.sub-label {
  color: var(--soft);
  font-size: 16px;
  letter-spacing: 0.14em;
}

.sub input {
  flex: 1 1 220px;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid #6A6A74;
  border-radius: 4px;
  background: transparent;
  color: var(--paper);
}

.sub input::placeholder {
  color: var(--dim);
}

.sub button {
  min-height: 46px;
  padding: 10px 24px;
  border: 2px solid var(--flame);
  border-radius: 4px;
  background: var(--flame);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.sub button:hover {
  background: var(--paper);
  border-color: var(--paper);
}

.copyright {
  max-width: 1180px;
  margin: 16px auto 0;
  color: var(--dim);
  font-size: 16px;
}

@media (max-width: 880px) {
  main {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    padding: 12px;
  }

  .rail-h {
    margin-bottom: 8px;
  }

  .rail-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-list::-webkit-scrollbar {
    display: none;
  }

  .rail-list li + li {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .rail-list a {
    padding: 8px 12px;
    white-space: nowrap;
  }

  .rail-list a:hover,
  .rail-list a[aria-current] {
    transform: none;
  }

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

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

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 44vh;
  }

  .foot-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

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