/* 麻花星空原创样式：星图索引与纵向专题排版 */
:root {
  color-scheme: dark;
  --bg: #080d25;
  --panel: #111a38;
  --panel2: #172346;
  --ink: #f4f4ff;
  --muted: #b4bfda;
  --line: rgba(201,212,255,.16);
  --pink: #f4abed;
  --mint: #7ce6e1;
  --max: 1180px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.8 system-ui,-apple-system,"Microsoft YaHei",sans-serif;
  overflow-wrap: break-word;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--pink);
}
img {
  max-width: 100%;
  display: block;
}
button, a {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}
.shell {
  width: min(var(--max),calc(100% - 48px));
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: white;
  color: #111;
  padding: 10px;
  z-index: 20;
}
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(8,13,37,.98);
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
  letter-spacing: .06em;
}
.logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg,#d46dc7,#74d2e7);
  border-radius: 50% 50% 44% 44%;
  color: #080d25;
  font-size: 22px;
}
.nav {
  display: flex;
  gap: 10px 19px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: #d3d9ee;
}
.nav a {
  white-space: nowrap;
}
.eyebrow {
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .25em;
}
h1,h2,h3,p {
  margin-top: 0;
}
h1,h2,h3 {
  line-height: 1.35;
  letter-spacing: -.025em;
}
h1 {
  font-size: clamp(32px,4.5vw,60px);
}
h2 {
  font-size: clamp(23px,2.7vw,34px);
}
h3 {
  font-size: 19px;
}
p {
  color: var(--muted);
}
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 75% 20%,rgba(161,88,212,.17),transparent 45%),linear-gradient(180deg,transparent 60%,#080d25);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  align-items: center;
  gap: 48px;
  padding-block: 70px 76px;
}
.hero-intro h1 {
  margin-block: 19px 24px;
}
.hero-intro p {
  max-width: 520px;
  font-size: 16px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 27px;
}
.btn {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 10px 21px;
  font-size: 14px;
  font-weight: 700;
}
.btn.primary {
  background: var(--mint);
  color: #101a30;
  border-color: var(--mint);
}
.hero-art {
  position: relative;
  min-width: 0;
}
.hero-art img {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  border-radius: 47% 47% 12px 12px;
  border: 1px solid var(--line);
}
.hero-art .stamp {
  position: absolute;
  right: -9px;
  bottom: 20px;
  padding: 10px 18px;
  background: #e5b6de;
  color: #1b1530;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  transform: rotate(-6deg);
}
.metric-strip {
  border-bottom: 1px solid var(--line);
}
.metrics {
  display: flex;
  gap: 10px 35px;
  flex-wrap: wrap;
  padding-block: 16px;
  color: #c7cce7;
  font-size: 13px;
}
.metrics span::before {
  content: '✦';
  color: var(--pink);
  margin-right: 9px;
}
.section {
  padding-block: 78px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 8px 0 0;
}
.section-head p {
  max-width: 370px;
  margin: 0;
  font-size: 14px;
}
.constellation {
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: 18px;
}
.topic {
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.topic:first-child, .topic:nth-child(4) {
  grid-column: span 6;
}
.topic-media {
  position: relative;
  overflow: hidden;
}
.topic-media img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform .35s;
}
.topic:hover img,.story:hover img {
  transform: scale(1.035);
}
.topic:first-child img, .topic:nth-child(4) img {
  height: 285px;
}
.topic-body {
  padding: 19px 23px 23px;
}
.topic-body h3 {
  margin-bottom: 6px;
}
.topic-body p {
  margin-bottom: 0;
  font-size: 14px;
}
.topic-number {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--mint);
}
.dark-band {
  background: #101735;
  border-block: 1px solid var(--line);
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
}
.story {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}
.story img {
  width: 100%;
  aspect-ratio: 1.63;
  object-fit: cover;
  transition: transform .35s;
}
.story-copy {
  padding: 20px;
}
.story h3 {
  margin: 7px 0 10px;
}
.story p {
  font-size: 14px;
  margin: 0;
}
.linkmore {
  color: var(--mint);
  font-size: 14px;
  font-weight: 700;
}
.guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
  align-items: center;
}
.guide img {
  width: 100%;
  aspect-ratio: 1.28;
  object-fit: cover;
  border-radius: 24px;
}
.guide ul {
  color: var(--muted);
  padding-left: 21px;
}
.page-head {
  padding-block: 60px 34px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: clamp(28px,4vw,48px);
  max-width: 900px;
  margin: 16px 0;
}
.page-head p {
  max-width: 760px;
  margin-bottom: 0;
}
.breadcrumb {
  font-size: 13px;
  color: #b0b9d6;
}
.breadcrumb a {
  color: var(--mint);
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 270px;
  gap: 55px;
  padding-block: 50px 80px;
}
.article-body {
  min-width: 0;
}
.article-body .cover {
  width: 100%;
  aspect-ratio: 1.7;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 30px;
}
.article-body p {
  line-height: 2.05;
  font-size: 16px;
}
.article-body h2 {
  margin: 38px 0 16px;
}
.article-body .lead {
  color: #e0e6f8;
  font-size: 18px;
}
.article-body .notice {
  border-left: 3px solid var(--mint);
  padding: 14px 20px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}
.side {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 23px;
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--line);
}
.side h2 {
  font-size: 19px;
  margin-bottom: 16px;
}
.side a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.related {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.footer {
  border-top: 1px solid var(--line);
  padding-block: 36px;
  background: #070b1c;
}
.footer-grid {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 26px;
}
.footer p {
  font-size: 13px;
  max-width: 640px;
}
.footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
@media(max-width:1000px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 17px;
    gap: 15px;
  }
  .hero-grid {
    gap: 28px;
  }
  .article-layout {
    gap: 25px;
    grid-template-columns: minmax(0,1fr) 230px;
  }
}
@media(max-width:760px) {
  .shell {
    width: min(100% - 32px,var(--max));
  }
  .hero-grid {
    grid-template-columns: 1fr;
    padding-block: 42px 54px;
  }
  .hero-art img {
    aspect-ratio: 1.45;
    border-radius: 20px;
  }
  .section {
    padding-block: 50px;
  }
  .section-head {
    display: block;
  }
  .section-head p {
    margin-top: 12px;
  }
  .topic, .topic:first-child, .topic:nth-child(4) {
    grid-column: span 6;
  }
  .topic img,.topic:first-child img,.topic:nth-child(4) img {
    height: 210px;
  }
  .articles-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .guide, .article-layout {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
  }
}
@media(max-width:520px) {
  .nav {
    gap: 11px 16px;
  }
  .nav a {
    font-size: 12px;
  }
  .hero-art .stamp {
    right: 2px;
    bottom: 14px;
  }
  .constellation, .articles-grid {
    grid-template-columns: 1fr;
  }
  .topic, .topic:first-child, .topic:nth-child(4) {
    grid-column: 1;
  }
  .topic img,.topic:first-child img,.topic:nth-child(4) img {
    height: 225px;
  }
  .footer-grid {
    flex-direction: column;
  }
  .page-head {
    padding-block: 38px 24px;
  }
}
/* V2: responsive navigation and overflow-safe content */
html {
  -webkit-text-size-adjust: 100%;
}
body {
  min-width: 320px;
}
main, section, article, aside {
  min-width: 0;
}
.nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
}
.nav a[aria-current="page"] {
  color: var(--mint);
  font-weight: 800;
}
.identity {
  flex-shrink: 0;
}
.hero-intro, .hero-art, .guide > *, .section-head > * {
  min-width: 0;
}
.hero-art .stamp {
  right: 8px;
  max-width: calc(100% - 16px);
}
.section-head p {
  overflow-wrap: break-word;
}
.topic, .story {
  transition: border-color .2s ease, transform .2s ease;
}
.topic:hover, .story:hover {
  border-color: rgba(124,230,225,.52);
}
.article-body img, .guide img, .topic img, .story img {
  height: auto;
}
.topic-media img {
  height: 230px;
}
.topic:first-child .topic-media img, .topic:nth-child(4) .topic-media img {
  height: 285px;
}
.story img {
  aspect-ratio: 1.63;
}
@media (max-width: 1100px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 16px;
    gap: 8px;
  }
  .nav {
    width: 100%;
    gap: 2px 18px;
  }
}
@media (max-width: 760px) {
  .hero-grid {
    gap: 26px;
  }
  .hero-intro h1 {
    font-size: clamp(30px, 8vw, 45px);
  }
  .topic-media img, .topic:first-child .topic-media img, .topic:nth-child(4) .topic-media img {
    height: 210px;
  }
  .section-head {
    align-items: start;
  }
  .article-body .related .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .shell {
    width: calc(100% - 32px);
  }
  .header-inner {
    gap: 12px;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 7px;
  }
  .nav a {
    justify-content: center;
    min-width: 0;
    padding: 5px 3px;
    font-size: 12px;
    text-align: center;
    white-space: normal;
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .hero-intro h1 {
    font-size: clamp(29px, 8vw, 38px);
  }
  .hero-intro p {
    font-size: 15px;
    line-height: 1.9;
  }
  .topic-media img, .topic:first-child .topic-media img, .topic:nth-child(4) .topic-media img {
    height: 225px;
  }
  .article-body .related .articles-grid {
    grid-template-columns: 1fr;
  }
  .guide {
    gap: 24px;
  }
  .footer nav {
    gap: 12px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .topic img, .story img {
    transition: none;
  }
}
