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

:root {
  --navy: #0F3D5C;
  --amber: #F4A62A;
  --brick: #E85C4A;
  --paper: #FBF7F0;
  --card: rgba(255, 255, 255, 0.58);
  --ink: #0B2739;
  --r: 28px;
  --wrap: 1120px;
  --serif: "Crimson Pro", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: "Atkinson Hyperlegible", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

*,
*::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: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  -webkit-tap-highlight-color: rgba(232, 92, 74, 0.25);
}

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

.wrap {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

/* ---------- 顶部 ---------- */

.masthead {
  background: var(--paper);
}

.brand-row {
  background: var(--navy);
}

.brand-wrap {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  text-decoration: none;
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

.brand-mark {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: var(--amber);
  object-fit: cover;
}

.brand-mark--text {
  display: grid;
  place-items: center;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
}

.pillnav {
  padding-top: 0.6rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid var(--navy);
  background: var(--paper);
}

.pillnav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pillnav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 1rem;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pillnav a:hover,
.pillnav a:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---------- 头部区 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-bottom: 3px solid var(--navy);
  padding: 2rem 1.15rem 3.6rem;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.hero-art {
  flex: none;
  width: 84px;
  height: 84px;
  animation: pop 0.45s ease both;
}

.hero-copy {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: var(--navy);
  text-wrap: balance;
}

.hero-lead {
  margin: 0 0 0 auto;
  max-width: 36rem;
  font-size: 1rem;
  color: #2c4a5f;
}

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

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  bottom: 46px;
  background: var(--brick);
}

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

.body {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2.4rem 1.15rem 3.6rem;
}

.body > article {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 1.4rem 1.15rem 1.5rem;
  border: 2px solid var(--navy);
  border-radius: var(--r);
  background: var(--card);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  scroll-margin-top: 1.5rem;
  animation: rise 0.5s ease both;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.body > article:hover {
  border-color: var(--brick);
}

.body > article:nth-of-type(1) { animation-delay: 0.04s; }
.body > article:nth-of-type(2) { animation-delay: 0.1s; }
.body > article:nth-of-type(3) { animation-delay: 0.16s; }
.body > article:nth-of-type(4) { animation-delay: 0.22s; }
.body > article:nth-of-type(5) { animation-delay: 0.28s; }
.body > article:nth-of-type(6) { animation-delay: 0.34s; }
.body > article:nth-of-type(7) { animation-delay: 0.4s; }

.body h2 {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.42rem, 3.3vw, 1.95rem);
  line-height: 1.25;
  color: var(--navy);
}

.body h3 {
  margin: 1.5rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.35;
  color: var(--navy);
}

.body hr {
  border: 0;
  height: 4px;
  width: 72px;
  margin: 0.15rem 0 1.1rem;
  background: var(--brick);
}

.body p {
  margin: 0 0 1rem;
}

.body ul,
.body ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
}

.body li {
  margin: 0.32rem 0;
}

.body a {
  color: var(--brick);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.body a:hover {
  color: var(--navy);
}

.body strong {
  color: var(--navy);
}

.body blockquote {
  margin: 1.2rem 0;
  padding: 0.85rem 1.05rem;
  border-left: 6px solid var(--amber);
  border-radius: 0 6px 6px 0;
  background: rgba(244, 166, 42, 0.17);
}

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

.body img {
  display: block;
  height: auto;
  border: 2px solid var(--navy);
  border-radius: 4px;
  margin: 1rem 0;
}

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

.toc {
  margin: 0 0 1.6rem;
  padding: 1.1rem 1.1rem 1.2rem;
  border: 2px solid var(--brick);
  border-radius: var(--r);
  background: #fff;
}

.toc-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: 0.08em;
  color: var(--brick);
}

.toc hr {
  height: 3px;
  width: 40px;
  margin: 0.5rem 0 0.7rem;
  background: var(--brick);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

.toc-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0.15rem;
  border-bottom: 1px dashed rgba(15, 61, 92, 0.28);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.toc-list a:hover {
  color: var(--brick);
  padding-left: 0.4rem;
}

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

.foot-wrap {
  background: var(--navy);
  border-top: 6px solid var(--amber);
}

.foot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2rem 1.15rem 1.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.8rem;
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  color: #fff;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.foot-nav {
  flex: 1 1 auto;
}

.foot-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.2;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--navy);
}

.foot-copy {
  margin: 0;
  color: #c8dbe6;
  font-size: 0.85rem;
}

/* ---------- 动效 ---------- */

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

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (min-width: 760px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: 70vh;
    padding: 3rem 1.15rem 5.5rem;
  }

  .hero-art {
    width: 104px;
    height: 104px;
  }

  .hero::after {
    height: 74px;
  }

  .hero::before {
    bottom: 74px;
  }

  .body {
    padding-top: 3rem;
    display: flow-root;
  }

  .body > article {
    padding: 1.9rem 1.8rem 2rem;
    margin-bottom: 1.8rem;
  }
}

@media (min-width: 900px) {
  .toc {
    float: right;
    width: 19rem;
    margin: 0 0 1.8rem 2.6rem;
    position: sticky;
    top: 1.5rem;
  }

  .body > article {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16.5px;
  }

  .hero-art {
    width: 64px;
    height: 64px;
  }

  .brand {
    font-size: 1.28rem;
  }

  .pillnav a {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
  }

  .foot-copy {
    width: 100%;
  }
}

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

  .body > article,
  .hero-art {
    animation: none;
  }

  .pillnav a,
  .toc-list a,
  .foot-nav a,
  .body a {
    transition: none;
  }
}

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