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

:root {
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --ink: #171f26;
  --base: #e4eef7;
  --soft: #eef4f9;
  --sh: 6px 6px 15px rgba(23, 31, 38, 0.12), -6px -6px 15px rgba(255, 255, 255, 0.9);
  --sh-s: 3px 3px 8px rgba(23, 31, 38, 0.1), -3px -3px 8px rgba(255, 255, 255, 0.85);
  --sh-in: inset 5px 5px 12px rgba(23, 31, 38, 0.13), inset -5px -5px 12px rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--base);
  background-image: radial-gradient(circle, rgba(23, 31, 38, 0.07) 1px, transparent 1px);
  background-size: 16px 16px;
  font-family: "Fira Sans", system-ui, -apple-system, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(155deg, #dceaf6 0%, #eaf1f6 46%, #f8ebf1 100%);
}

a { color: #145d8a; }

img { max-width: 100%; }

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 80;
  padding: 10px 18px;
  border-radius: 20px;
  background: var(--soft);
  box-shadow: var(--sh);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip:focus { top: 34px; }

.ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 26px;
  overflow: hidden;
  z-index: 50;
  background: linear-gradient(90deg, var(--blue), var(--pink), var(--blue));
  box-shadow: inset 0 -1px 0 rgba(23, 31, 38, 0.12);
}

.ticker-in {
  display: flex;
  align-items: center;
  height: 26px;
  width: max-content;
  white-space: nowrap;
  animation: tick 40s linear infinite;
}

.ticker-in span {
  position: relative;
  padding: 0 16px;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #2e4150;
}

.ticker-in span::after {
  content: "\00b7";
  position: absolute;
  right: -3px;
  opacity: 0.65;
}

@keyframes tick {
  to { transform: translateX(-50%); }
}

.rail {
  position: fixed;
  top: 26px;
  left: 0;
  bottom: 0;
  width: 88px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 6px;
  background: linear-gradient(180deg, #e3eef7, #f7eef2);
  box-shadow: 5px 0 14px rgba(23, 31, 38, 0.08);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
}

.brand-txt {
  writing-mode: vertical-rl;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--sh-s);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  background: linear-gradient(145deg, var(--pink), var(--blue));
  box-shadow: var(--sh-s);
}

.menu { position: relative; }

.menu summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 58px;
  padding: 10px 12px;
  border-radius: 22px;
  font-size: 14px;
  letter-spacing: 0.12em;
  background: linear-gradient(145deg, #eaf3fa, #d3e6f5);
  box-shadow: var(--sh);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu summary::-webkit-details-marker { display: none; }
.menu summary::marker { content: ""; }
.menu summary:active { box-shadow: var(--sh-in); transform: scale(0.97); }
.menu[open] summary { box-shadow: var(--sh-in); }

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

.menu[open] menu {
  position: fixed;
  left: 96px;
  top: 96px;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(150deg, #e7f1f9, #f8eff3);
  box-shadow: 10px 10px 26px rgba(23, 31, 38, 0.16), -8px -8px 20px rgba(255, 255, 255, 0.9);
}

.menu menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 22px;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  background: linear-gradient(145deg, #eef5fa, #d8e8f5);
  box-shadow: var(--sh-s);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu menu a:active { box-shadow: var(--sh-in); transform: scale(0.98); }

main {
  margin-left: 88px;
  max-width: 1160px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 26px;
  padding: 64px 24px 44px;
}

.side {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 16px 14px;
  border-radius: 16px;
  background: linear-gradient(150deg, #e8f2fa, #f9f0f4);
  box-shadow: var(--sh);
}

.side small {
  display: block;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: #5b7487;
}

.side h2 {
  margin: 6px 0 12px;
  font-size: 16px;
  letter-spacing: 0.06em;
}

.toc {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc li { counter-increment: toc; }

.toc a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px 8px 32px;
  border-radius: 10px;
  text-decoration: none;
  color: #2b3a45;
  font-size: 14px;
  line-height: 1.45;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 9px;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  color: #7e95a7;
}

.toc a:hover { background: rgba(255, 255, 255, 0.65); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  background: linear-gradient(145deg, #eef5fa, #d9e9f6);
  box-shadow: var(--sh-s);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { box-shadow: var(--sh-in); transform: scale(0.98); }

section { min-width: 0; }

.hero {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
  align-items: center;
  min-height: 45vh;
  padding: 18px 0 28px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

.lede {
  margin: 0 0 18px;
  max-width: 32em;
  font-size: 16px;
  line-height: 1.78;
  color: #3b4c58;
  overflow-wrap: break-word;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 26px;
  border-radius: 24px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(145deg, var(--pink), var(--blue));
  box-shadow: var(--sh);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:active { box-shadow: var(--sh-in); transform: scale(0.98); }

.hero-art {
  position: relative;
  min-height: 210px;
  border-radius: 16px;
  overflow: hidden;
  background-image: radial-gradient(circle, rgba(23, 31, 38, 0.1) 1.4px, transparent 1.4px),
    linear-gradient(150deg, var(--blue), var(--pink));
  background-size: 14px 14px, 100% 100%;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  will-change: transform;
  transform: scale(1.06);
}

section > div {
  position: relative;
  margin: 0 0 18px;
  padding: 26px 22px;
  border: 1px solid rgba(23, 31, 38, 0.14);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.44);
  scroll-margin-top: 92px;
  overflow-wrap: break-word;
}

section > div h2 {
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--blue);
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.36;
}

section > div h3 {
  margin: 22px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

section > div p { margin: 0 0 14px; }

section > div ul,
section > div ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

section > div li { margin: 0 0 6px; }

section > div a {
  color: #145d8a;
  text-underline-offset: 3px;
}

section > div blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--pink);
  background: rgba(245, 224, 232, 0.42);
}

section > div img { height: auto; }

footer {
  margin-left: 88px;
  padding: 30px 24px 26px;
  border-top: 1px solid rgba(23, 31, 38, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(245, 224, 232, 0.32));
}

.fgrid {
  max-width: 1112px;
  display: grid;
  grid-template-columns: 1.15fr 1.15fr auto;
  gap: 22px;
  align-items: start;
}

footer address { font-style: normal; }

.fbrand {
  display: inline-block;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.12em;
}

.fsub {
  display: inline-block;
  margin-top: 4px;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #566b7c;
}

.fnav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
}

.fnav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 14px;
  color: #2b3a45;
  text-decoration: none;
}

.fnav a:hover { text-decoration: underline; }

.fend .btn { margin-top: 0; }

.copy {
  margin: 22px 0 0;
  font-size: 13px;
  color: #5d7283;
}

@media (prefers-reduced-motion: no-preference) {
  .toc li { animation: rise 0.5s both; }
  .toc li:nth-child(1) { animation-delay: 0.04s; }
  .toc li:nth-child(2) { animation-delay: 0.08s; }
  .toc li:nth-child(3) { animation-delay: 0.12s; }
  .toc li:nth-child(4) { animation-delay: 0.16s; }
  .toc li:nth-child(5) { animation-delay: 0.2s; }
  .toc li:nth-child(6) { animation-delay: 0.24s; }
  .toc li:nth-child(7) { animation-delay: 0.28s; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-in { animation: none; }
  .hero-img { transform: none; }
}

@media (max-width: 899px) {
  .rail {
    top: 26px;
    right: 0;
    bottom: auto;
    width: auto;
    height: 56px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    box-shadow: 0 4px 12px rgba(23, 31, 38, 0.1);
  }

  .brand {
    flex-direction: row;
    padding: 8px 6px;
  }

  .brand-txt {
    writing-mode: horizontal-tb;
    font-size: 14px;
    letter-spacing: 0.1em;
  }

  .menu[open] menu {
    left: 14px;
    right: 14px;
    top: 90px;
    width: auto;
  }

  main {
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr);
    padding: 110px 16px 36px;
    gap: 20px;
  }

  section { order: 1; }
  .side { order: 2; position: static; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 6px 0 20px;
  }

  section > div { padding: 20px 16px; }
  section > div { scroll-margin-top: 96px; }

  footer { margin-left: 0; padding: 26px 16px 22px; }

  .fgrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  .fnav { grid-template-columns: 1fr 1fr; }
}

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