@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg: #150d10;
  --bg-2: #1e1317;
  --bg-3: #241519;
  --line: rgba(255, 182, 193, 0.18);
  --line-2: rgba(255, 182, 193, 0.34);
  --rose: #eb879c;
  --pink: #ffb6c1;
  --text: #f8ecf0;
  --dim: #cdb4bc;
  --soft: 0 2px 4px rgba(0, 0, 0, 0.32), 0 12px 26px -14px rgba(0, 0, 0, 0.7);
  --ff: 'Plus Jakarta Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--ff);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(920px 460px at 84% -10%, rgba(235, 135, 156, 0.22), transparent 62%),
    radial-gradient(700px 380px at 4% 2%, rgba(38, 23, 26, 0.85), transparent 72%);
  background-repeat: no-repeat;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--pink); text-decoration: none; }
a:hover { color: #fff; }

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

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(21, 13, 16, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  padding: 6px 0;
}

.brandmark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(150deg, rgba(235, 135, 156, 0.92), rgba(38, 23, 26, 0.9));
  box-shadow: var(--soft);
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.searchform,
.overlay-search { margin: 0; }

.search-input {
  height: 44px;
  width: clamp(140px, 22vw, 240px);
  padding: 0 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  box-shadow: var(--soft);
  border-radius: 0;
}

.search-input::placeholder { color: #a9909a; }

.burger,
.overlay-close {
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  box-shadow: var(--soft);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.24s ease, color 0.24s ease;
}

.burger:hover,
.overlay-close:hover { background: var(--rose); color: #26171a; }

.menubar {
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.menubar ol {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0 12px;
  list-style: none;
}

.menubar a {
  display: block;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.24s ease, border-color 0.24s ease;
}

.menubar a:hover {
  color: var(--pink);
  border-bottom-color: var(--rose);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background:
    radial-gradient(600px 320px at 90% 0%, rgba(235, 135, 156, 0.2), transparent 70%),
    #120b0e;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s linear 0.24s;
}

body.menu-open .overlay {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.overlay-brand {
  font-weight: 800;
  font-size: 1.05rem;
}

.overlay-search .search-input { width: 100%; }

.overlay-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: m;
}

.overlay-nav li { counter-increment: m; }

.overlay-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.overlay-nav a::before {
  content: counter(m, decimal-leading-zero);
  margin-right: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--rose);
  letter-spacing: 0.08em;
}

.overlay-nav a:hover { color: var(--pink); }

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: clamp(34px, 7vw, 66px) 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: -20% 0 0;
  margin: 0;
  background-image: radial-gradient(rgba(255, 182, 193, 0.3) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 38%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse at 50% 38%, #000 12%, transparent 76%);
  will-change: transform;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8.4vw, 4.5rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  max-width: 46ch;
  margin: 18px auto 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--dim);
}

.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 0 3rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) 20px;
}

.rail {
  grid-column: 1;
  grid-row: 1 / span 80;
  align-self: start;
  position: sticky;
  top: 132px;
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.rail small,
.shell > section small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--rose);
  margin-bottom: 0.5rem;
}

.rail-title {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.rail-list {
  counter-reset: r;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.rail-list li { counter-increment: r; }

.rail-list a {
  position: relative;
  display: block;
  padding: 11px 8px 11px 26px;
  font-size: 0.94rem;
  color: var(--dim);
  border-bottom: 1px solid rgba(255, 182, 193, 0.1);
  transition: color 0.2s ease, background 0.2s ease;
}

.rail-list a::before {
  content: counter(r, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 11px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--rose);
}

.rail-list a:hover { color: var(--pink); background: rgba(235, 135, 156, 0.08); }

.rail-list a[aria-current] {
  color: var(--pink);
  background: rgba(235, 135, 156, 0.1);
}

.shell > section {
  grid-column: 2;
  min-width: 0;
  scroll-margin-top: 140px;
}

.shell > section + section {
  margin-top: 2.8rem;
  padding-top: 2.8rem;
  border-top: 1px solid var(--line);
}

.shell > section h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.42rem, 3.4vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.shell > section h3 {
  margin: 1.9rem 0 0.7rem;
  font-size: clamp(1.14rem, 2.4vw, 1.36rem);
  line-height: 1.4;
}

.shell > section p {
  max-width: 72ch;
  margin: 0 0 1.1rem;
}

.shell > section ul,
.shell > section ol {
  max-width: 72ch;
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}

.shell > section li { margin: 0.35rem 0; }

.shell > section figure { margin: 0 0 1.4rem; }

.shell > section img { border: 1px solid var(--line); }

.shell > section blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--rose);
  background: var(--bg-2);
  color: #ecd8de;
}

.shell > section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.shell > section th,
.shell > section td {
  padding: 0.6rem 0.7rem;
  text-align: left;
  border: 1px solid var(--line);
}

.shell > section th { background: var(--bg-3); }

.shell > section code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: var(--bg-3);
  border: 1px solid var(--line);
}

.site-foot {
  margin-top: 3rem;
  background: #110a0c;
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.6rem 20px 1.4rem;
}

address {
  font-style: normal;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.foot-col nav dl { margin: 0; }

.foot-col dt,
.foot-col dd { margin: 0; }

.foot-col dt a,
.foot-col dd a,
.foot-links a {
  display: block;
  padding: 0.62rem 0;
  font-size: 0.94rem;
  color: var(--dim);
  border-bottom: 1px solid rgba(255, 182, 193, 0.1);
}

.foot-col dt a:hover,
.foot-col dd a:hover,
.foot-links a:hover { color: var(--pink); }

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

.foot-base {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.1rem 20px 2.2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.83rem;
  color: #a9909a;
}

.foot-base p { margin: 0.2rem 0; }

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #26171a;
  background: var(--pink);
  border: 1px solid rgba(38, 23, 26, 0.3);
  box-shadow: var(--soft);
  border-radius: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 2rem 0;
  }

  .rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
    top: auto;
  }

  .rail-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.9rem;
  }

  .shell > section { grid-column: 1; }

  .shell > section + section {
    margin-top: 2.2rem;
    padding-top: 2.2rem;
  }

  .shell > section { scroll-margin-top: 124px; }

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

@media (max-width: 760px) {
  .searchform { display: none; }
  .hero { min-height: 42vh; }
  .brand-name { font-size: 1rem; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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