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

:root {
  --ink: #171f26;
  --ink-lift: #1d2833;
  --ink-deep: #141c23;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --text: #bdcbd8;
  --text-dim: #94a8b8;
  --raise: 10px 10px 24px #0d1319, -8px -8px 20px #212d39;
  --raise-sm: 4px 4px 10px #0e151b, -4px -4px 10px #222e3a;
  --sink: inset 4px 4px 9px #0d1319, inset -4px -4px 9px #212d39;
  --panel: linear-gradient(145deg, #1d2732, #161e25);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 0 116px;
  background:
    radial-gradient(760px 460px at 82% -8%, rgba(200, 224, 244, 0.13), transparent 62%),
    radial-gradient(620px 420px at 6% 12%, rgba(245, 224, 232, 0.09), transparent 60%),
    var(--ink);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: var(--pink); }
img { max-width: 100%; height: auto; }

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

.brand {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--raise-sm);
  text-decoration: none;
  color: var(--blue);
  font-weight: 700;
  transition: transform 0.15s ease;
}
.brand:active { transform: scale(0.94); }
.brand img { width: 26px; height: 26px; object-fit: contain; }

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(23, 31, 38, 0.95);
  box-shadow: 0 -12px 26px rgba(8, 12, 16, 0.6);
}

.bar nav { flex: 1 1 auto; min-width: 0; }

.tabs {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 16px;
  color: #ccd9e5;
  text-decoration: none;
  background: var(--panel);
  box-shadow: var(--raise-sm);
  transition: transform 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.tabs a:hover { color: #eef5fb; }
.tabs a.on {
  color: var(--ink);
  background: linear-gradient(145deg, #dcecfa, #b7d4ed);
  font-weight: 500;
}
.tabs a:active { transform: scale(0.95); }

.tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--ink-deep);
  box-shadow: var(--sink);
}
.search input {
  width: 104px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #e7eff7;
  font: inherit;
  font-size: 16px;
  outline: none;
}
.search input::placeholder { color: var(--text-dim); }
.search button {
  min-height: 40px;
  min-width: 54px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: linear-gradient(145deg, #f8e9ef, #ecd2dd);
  box-shadow: 3px 3px 8px #0d1319, -3px -3px 8px #24313d;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.search button:active { transform: scale(0.95); }

.dd { position: relative; }
.dd summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 58px;
  border-radius: 14px;
  font-size: 16px;
  color: #ccd9e5;
  background: var(--panel);
  box-shadow: var(--raise-sm);
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}
.dd summary::-webkit-details-marker { display: none; }
.dd summary:active { transform: scale(0.95); }
.dd[open] summary { color: var(--blue); }

.dd-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(330px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding: 16px;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--raise);
}
.dd-g p {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--pink);
  letter-spacing: 0.04em;
}
.dd-g a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 16px;
  color: #d6e3ef;
  text-decoration: none;
}
.dd-g a:hover { color: var(--blue); }

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 86px 0 38px;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  width: 100%;
}
.ghost {
  position: absolute;
  top: -32px;
  right: -4px;
  font-size: clamp(96px, 25vw, 236px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(200, 224, 244, 0.075);
  pointer-events: none;
  user-select: none;
}
.hero-copy {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.hero-text { min-width: 0; }
.hero-text h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 6vw, 54px);
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: #eff6fc;
}
.lede {
  margin: 0;
  max-width: 44ch;
  font-size: 17px;
  color: var(--text-dim);
}
.hero-figure {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--raise);
  animation: floaty 5s ease-in-out infinite;
}
.hero-figure img { width: 56px; height: 56px; object-fit: contain; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.side {
  position: sticky;
  top: 22px;
  padding: 20px 18px;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--raise);
}
.side h2 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--pink);
}
.side hr { margin: 0 0 12px; }
.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 16px;
  color: #c6d5e2;
  text-decoration: none;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}
.side-list a:hover,
.side-list a:focus-visible {
  color: #eef5fb;
  background: var(--ink-deep);
  box-shadow: var(--sink);
}
.side .top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 16px;
  color: var(--blue);
  text-decoration: none;
}

article.prose {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.prose section {
  padding: 26px 22px;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--raise);
  animation: rise 0.5s ease both;
}
.prose section:nth-child(2) { animation-delay: 0.05s; }
.prose section:nth-child(3) { animation-delay: 0.1s; }
.prose section:nth-child(4) { animation-delay: 0.15s; }
.prose section:nth-child(5) { animation-delay: 0.2s; }
.prose section:nth-child(6) { animation-delay: 0.25s; }
.prose section:nth-child(7) { animation-delay: 0.3s; }

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

main section[id] { scroll-margin-top: 22px; }

.prose h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.36;
  color: var(--blue);
  letter-spacing: -0.005em;
}
.prose h3 {
  margin: 20px 0 8px;
  font-size: 19px;
  color: var(--pink);
}
.prose h2 + hr { margin: 0 0 14px; }

hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(200, 224, 244, 0.6), rgba(200, 224, 244, 0));
}

.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul,
.prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--pink); }
.prose a { color: var(--pink); text-underline-offset: 3px; }
.prose strong { color: #eaf2f9; font-weight: 500; }
.prose img { border-radius: 20px; }
.prose blockquote {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: 20px;
  background: var(--ink-deep);
  box-shadow: var(--sink);
  color: #d3e0ec;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose > section > :last-child { margin-bottom: 0; }

.hit {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.f-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 28px 22px;
  border-radius: 28px;
  background: linear-gradient(145deg, #dcebfa, #c1daef);
  color: var(--ink);
  box-shadow: var(--raise);
}
.f-cta h2 {
  margin: 0;
  font-size: clamp(20px, 4vw, 26px);
  color: var(--ink);
}
.f-cta hr { width: 100%; order: 2; background: linear-gradient(90deg, rgba(23, 31, 38, 0.28), rgba(23, 31, 38, 0)); }
.f-cta .cta-go {
  order: 3;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(145deg, #fbf0f5, #efd9e2);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  box-shadow: 4px 4px 10px rgba(23, 31, 38, 0.2), -4px -4px 10px #ffffff;
  transition: transform 0.15s ease;
}
.f-cta .cta-go:active { transform: scale(0.96); }

.f-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 4px;
}
.f-bottom p { margin: 0; font-size: 16px; color: var(--text-dim); }
.f-bottom .links { display: flex; flex-wrap: wrap; gap: 4px; }
.f-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: #c6d5e2;
  text-decoration: none;
}
.f-bottom a:hover { color: #ffffff; }

@media (max-width: 880px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .side-list a { padding: 0 12px; }
}

@media (max-width: 620px) {
  body { padding-bottom: 172px; }
  .bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .tools { justify-content: space-between; }
  .search { flex: 1 1 auto; }
  .search input { width: auto; flex: 1 1 auto; }
  .hero { padding-top: 80px; min-height: 62vh; }
  .ghost { top: -8px; right: -2px; }
  .hero-copy { gap: 14px; }
  .hero-figure { width: 64px; height: 64px; border-radius: 20px; }
  .hero-figure img { width: 40px; height: 40px; }
  .prose section { padding: 22px 18px; }
  .dd-panel { right: auto; left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
}

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