:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #0e2b50;
  background: #d9e6f5;
  font-synthesis: none;
  --sheet: #f4f9ff;
  --ink: #0e2b50;
  --muted: #465e7b;
  --blue: #1156b1;
  --line: #cbdced;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0 auto; max-width: 1520px; min-height: 100vh; background: var(--sheet); }
a { color: inherit; text-underline-offset: .18em; }
a:focus-visible { outline: 3px solid #459bfa; outline-offset: 4px; }
p { line-height: 1.75; }
.frame { width: min(1110px, calc(100% - 72px)); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 4;
  left: 12px;
  top: 12px;
  padding: 10px;
  background: #fff;
  transform: translateY(-180%);
}
.skip:focus { transform: none; }

.bar { position: relative; z-index: 2; background: #06162d; color: #fff; }
.bar-inner { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { font-size: 1.13rem; font-weight: 760; text-decoration: none; }
nav { display: flex; align-items: center; gap: 24px; }
nav a, nav span[aria-current] { min-height: 44px; display: inline-flex; align-items: center; }
.bar nav a { color: #e3f1ff; text-decoration: none; }
.bar nav a:hover, .bar nav span { color: #b4d9ff; }

.celestial {
  position: relative;
  min-height: clamp(520px, 50vw, 675px);
  isolation: isolate;
  background: linear-gradient(#06162d, #0b4c99 58%, var(--sheet));
}
.horizon, .stars, .celestial::after { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.horizon { object-fit: cover; object-position: 50% 54%; }
.celestial::after {
  content: "";
  background: linear-gradient(180deg, #06162d 0%, #03173126 49%, #f4f9ff00 68%, var(--sheet) 99%);
}
.stars { z-index: 1; overflow: hidden; }
.stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #d9f0ff;
  border-radius: 100%;
  opacity: .15;
  box-shadow: 0 0 9px #a6ddff;
  animation: shimmer 5s ease-in-out infinite alternate;
}
@keyframes shimmer { from { opacity: .12; } to { opacity: .64; } }

.hero { position: relative; z-index: 2; padding: clamp(88px, 11vw, 155px) 0 78px; text-align: center; }
.hero h1 {
  color: #fff;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.85rem);
  letter-spacing: -.063em;
  line-height: 1.07;
  font-weight: 620;
  text-shadow: 0 2px 36px #04163275;
}
.hero h1 span { font-weight: 430; font-size: .92em; letter-spacing: -.052em; }
.hero p {
  margin: 22px auto 31px;
  max-width: 35em;
  color: #f1f8ff;
  font-size: clamp(.98rem, 1.35vw, 1.15rem);
  text-wrap: pretty;
  text-shadow: 0 1px 7px #040f26;
}
.glass {
  margin: 0 auto;
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid #e7f5ffba;
  border-radius: 24px;
  padding: 7px;
  background: #e4f2ffcf;
  box-shadow: 0 12px 52px #05254a4d, inset 0 1px 1px #fff;
  backdrop-filter: blur(13px);
}
.glass a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 15px 19px;
  min-height: 72px;
  border-radius: 17px;
  color: #0b2a51;
  text-decoration: none;
  text-align: start;
}
.glass a:first-child { background: #fff; }
.glass a:hover { background: #fff; text-decoration: underline; }
.glass strong { font-size: 1.11rem; }
.glass span { color: #3d5979; font-size: .88rem; }

.routes { padding: 18px 0 30px; }
.routes h2, .reading h2 { margin: 0 0 20px; font-size: clamp(1.45rem, 3.2vw, 2.35rem); letter-spacing: -.035em; }
.route-row {
  display: grid;
  grid-template-columns: minmax(175px, 1.1fr) minmax(200px, 1.75fr) auto;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.route-row h3 { margin: 0; font-size: 1.15rem; }
.route-row p { margin: 0; color: var(--muted); }
.route-row a { color: var(--blue); font-weight: 700; }
.reading { padding: 18px 0 54px; }
.guide-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.guide-tile, .related a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  font-weight: 660;
}
.guide-tile:hover, .related a:hover { background: #e7f2ff; }

.footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer .frame { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.footer p, .footer nav { font-size: .87rem; }
.footer nav { gap: 16px; flex-shrink: 0; }
.reading-shell { min-height: 70vh; max-width: 900px; padding-block: 18px 56px; }
.crumb { gap: 14px; color: var(--blue); font-size: .87rem; }
.chapter-title { padding: clamp(22px,5vw,50px); border-radius: 24px; background: linear-gradient(135deg,#e4efff,#fff); }
.chapter-title h1 { margin: 0; font-size: clamp(1.9rem,4.9vw,3.25rem); letter-spacing: -.047em; }
.chapter-title p { margin: 12px 0 2px; color: var(--muted); }
.chapter-title time { display: block; margin-top: 14px; font-size: .88rem; color: var(--blue); }
.chapter-body { padding: 10px clamp(0px,3vw,30px); }
.chapter-body section { margin-block: 30px; }
.chapter-body h2 { font-size: 1.35rem; }
code { overflow-wrap: anywhere; }
.checks { padding-left: 1.7em; }
.checks li { padding: 13px 0 13px 8px; border-bottom: 1px solid var(--line); }
.checks li::marker { color: var(--blue); font-weight: 750; }
.checks h3, .checks p { margin: 0; }
.checks p { margin-top: 4px; }
.pairings div {
  display: grid;
  grid-template-columns: minmax(145px,1fr) 2.1fr;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding: 17px 0;
}
.pairings dt { font-weight: 740; }
.pairings dd { margin: 0; line-height: 1.7; }
.related { flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  .frame { width: calc(100% - 34px); }
  .bar-inner { min-height: 58px; gap: 10px; }
  .brand { font-size: 1rem; }
  .bar nav { gap: 12px; font-size: .78rem; }
  .celestial { min-height: 510px; }
  .hero { padding: 94px 0 58px; }
  .hero h1 { font-size: clamp(2.1rem,9.1vw,3rem); }
  .hero p { margin: 17px auto 23px; }
  .glass a { padding: 12px; min-height: 68px; }
  .glass strong { font-size: 1rem; }
  .glass span { font-size: .76rem; }
  .routes { padding-top: 3px; }
  .route-row, .pairings div { grid-template-columns: 1fr; gap: 7px; }
  .route-row a { min-height: 38px; display: inline-flex; align-items: center; }
  .guide-cards { grid-template-columns: 1fr; }
  .footer .frame { display: block; }
  .footer p { margin: 5px 0; }
  .chapter-body { padding-inline: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .stars { display: none; }
}
