:root {
  --bg: #F7F4FF;
  --bg-2: #FFFFFF;
  --tint: #EEF2FF;
  --card: #FFFFFF;
  --title: #1B1340;
  --text: #2F2A4A;
  --muted: #5B5678;
  --hint: #8B86A3;
  --brand: #7C3AED;
  --lilac: #A78BFA;
  --teal: #14B8A6;
  --coral: #F97316;
  --rose: #E11D48;
  --amber: #F59E0B;
  --indigo: #312E81;
  --line: rgba(124, 58, 237, 0.14);
  --shadow: 0 16px 40px rgba(49, 46, 129, 0.10);
  --radius: 22px;
  --max: 1200px;
  --bar: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

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

a {
  color: var(--indigo);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--indigo);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 80;
}

.skip:focus {
  top: 12px;
}

body.is-locked {
  overflow: hidden;
}

/* Top brand bar */
.topspace {
  height: 88px;
}

.brandbar-wrap {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.brandbar {
  pointer-events: auto;
  width: 100%;
  max-width: var(--bar);
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  backdrop-filter: blur(16px);
}

.bar-side {
  display: flex;
  gap: 6px;
  flex: 1;
}

.bar-side.left { justify-content: flex-start; }
.bar-side.right { justify-content: flex-end; }

.chip {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}

.chip:hover {
  background: var(--tint);
  color: var(--brand);
}

.chip.is-current {
  border-color: var(--brand);
  color: var(--brand);
  background: #F3E8FF;
}

.bar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--title);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bar-brand img {
  height: 36px;
  width: auto;
}

.round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--title);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.round-btn:hover {
  background: var(--tint);
}

.mobile-top {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.mobile-top .bar-brand {
  flex: 1;
  justify-content: center;
}

.desktop-bar {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}

/* Layout */
.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.hero-dock {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  padding: 12px 0 36px;
}

.kicker {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 13px;
}

h1, h2, h3 {
  color: var(--title);
  line-height: 1.25;
  margin: 0 0 14px;
}

h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 20px; }

.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 40em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-main {
  background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 50%, #14B8A6 100%);
  color: #FFFFFF;
}

.btn-main:hover { color: #fff; filter: brightness(1.05); }

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--title);
}

.media-slot {
  background: var(--tint);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 220px;
}

.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-slot { aspect-ratio: 3 / 2; }
.wide-slot { aspect-ratio: 16 / 10; }
.phone-slot { aspect-ratio: 3 / 4; max-width: 360px; margin: 0 auto; }

section {
  margin: 28px 0 56px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head p { margin: 0; color: var(--muted); }

.tag-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.tag-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(49, 46, 129, 0.05);
  min-height: 150px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.dot-p { background: var(--brand); }
.dot-t { background: var(--teal); }
.dot-c { background: var(--coral); }
.dot-r { background: var(--rose); }

.pulse-grid {
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: 22px;
  align-items: stretch;
}

.num-list a,
.folder-list a,
.faq a {
  color: inherit;
}

.num-list {
  display: grid;
  gap: 10px;
}

.num-item {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  min-height: 64px;
  align-items: center;
}

.num {
  font-weight: 800;
  color: var(--brand);
  font-size: 20px;
  width: 36px;
}

.article-card,
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.mosaic {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.mosaic .tile:first-child {
  grid-row: 1 / span 2;
}

.tile {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.tile .copy { padding: 18px 20px 22px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.board-grid article:nth-child(1),
.board-grid article:nth-child(6) {
  grid-row: span 1;
}

.folder-list {
  display: grid;
  gap: 12px;
}

.folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
  min-height: 72px;
}

.score-list {
  display: grid;
  gap: 12px;
}

.score-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  background: #fff;
  border-radius: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  align-items: center;
}

.big-num {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.c1 { color: var(--brand); }
.c2 { color: var(--teal); }
.c3 { color: var(--coral); }
.c4 { color: var(--rose); }
.c5 { color: var(--amber); }

.timeline {
  border-left: 3px solid var(--line);
  margin-left: 12px;
  padding-left: 22px;
  display: grid;
  gap: 18px;
}

.node {
  position: relative;
}

.node::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--brand);
  border-radius: 50%;
  position: absolute;
  left: -31px;
  top: 8px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--indigo);
  font-size: 12px;
  font-weight: 700;
}

.app-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: center;
}

.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.2em; }

.page-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 16px;
  margin-bottom: 10px;
}

.faq summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--title);
  cursor: pointer;
}

/* Drawer from bottom */
.mask,
.drawer,
.search-layer {
  visibility: hidden;
  pointer-events: none;
}

.mask {
  position: fixed;
  inset: 0;
  background: rgba(27, 19, 64, 0.38);
  z-index: 50;
  opacity: 0;
  transition: opacity .2s;
}

.drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 24px);
  width: min(720px, 100%);
  max-height: 78vh;
  overflow: auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  z-index: 60;
  box-shadow: var(--shadow);
  padding: 18px 18px 28px;
  opacity: 0;
  transition: .22s ease;
}

.search-layer {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 92px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  opacity: 0;
}

body.drawer-open .mask,
body.search-open .mask,
body.drawer-open .drawer,
body.search-open .search-layer {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

body.drawer-open .drawer {
  transform: translate(-50%, 0);
}

.drawer-head,
.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--title);
}

.drawer-brand img { height: 32px; }

.drawer-groups {
  display: grid;
  gap: 18px;
}

.drawer-groups h3 {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--hint);
  margin-bottom: 8px;
}

.drawer-link {
  display: block;
  padding: 10px 8px;
  border-radius: 14px;
  min-height: 44px;
}

.drawer-link:hover { background: var(--tint); }

.drawer-link strong { display: block; color: var(--title); }
.drawer-link span { display: block; color: var(--muted); font-size: 13px; }

.search-box {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 16px;
  font-size: 16px;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.presets a {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--indigo);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* Footer */
.site-footer {
  background: #1B1340;
  color: #F4F0FF;
  padding: 42px 16px 110px;
  margin-top: 24px;
}

.site-footer a { color: #F4F0FF; }
.site-footer a:hover { color: #A78BFA; }

.foot-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-weight: 800;
}

.foot-brand img { height: 36px; }

.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.foot-cols h3 {
  color: #F4F0FF;
  font-size: 14px;
  letter-spacing: .1em;
}

.foot-cols a {
  display: block;
  min-height: 36px;
  opacity: .9;
}

.foot-note {
  margin-top: 24px;
  color: #C9C2E4;
  font-size: 14px;
}

/* Mobile island */
.island {
  display: none;
}

@media (max-width: 980px) {
  .hero-dock,
  .pulse-grid,
  .split,
  .app-block,
  .page-hero {
    grid-template-columns: 1fr;
  }

  .tag-track,
  .board-grid,
  .index-grid,
  .foot-cols {
    grid-template-columns: 1fr 1fr;
  }

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

  .desktop-bar { display: none; }
  .mobile-top { display: flex; }
  .brandbar { height: 56px; }
  .topspace { height: 76px; }

  .search-layer {
    inset: 0;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: #F7F4FF;
  }

  .island {
    display: flex;
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(420px, calc(100% - 28px));
    height: 52px;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 35;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
  }

  .island a {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .island a.is-current { color: var(--brand); }
  .island a.is-current::after {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--brand);
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
  }
}

@media (max-width: 640px) {
  .tag-track,
  .board-grid,
  .index-grid,
  .foot-cols {
    grid-template-columns: 1fr;
  }

  .page { width: calc(100% - 32px); }
  h1 { font-size: 28px; }
}

@media (min-width: 981px) {
  .site-footer { padding-bottom: 48px; }
}
