:root {
  color-scheme: light dark;
  --bg: #fbfaff;
  --bg-soft: #f5f1fb;
  --surface: #ffffff;
  --surface-raised: #fcfbff;
  --text: #17131f;
  --muted: #6f687b;
  --dim: #968fa3;
  --line: #e8e2f1;
  --line-strong: #d8cfe7;
  --accent: #4c1d95;
  --accent-strong: #2e1065;
  --accent-bright: #7c3aed;
  --accent-soft: #f0e9ff;
  --accent-faint: #f8f5ff;
  --code-bg: #17121f;
  --code-text: #f6f2ff;
  --shadow: 0 18px 54px rgba(46, 16, 101, 0.08);
  --shadow-soft: 0 10px 30px rgba(46, 16, 101, 0.05);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1120px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a10;
    --bg-soft: #141119;
    --surface: #17141d;
    --surface-raised: #1c1823;
    --text: #f5f2f8;
    --muted: #aaa3b6;
    --dim: #7d7588;
    --line: #2d2736;
    --line-strong: #41384d;
    --accent: #a78bfa;
    --accent-strong: #ded2ff;
    --accent-bright: #c4b5fd;
    --accent-soft: #2b2240;
    --accent-faint: #201a2c;
    --code-bg: #110e16;
    --code-text: #f6f2ff;
    --shadow: 0 18px 54px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

code,
pre {
  font-family: var(--mono);
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 50;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, var(--accent), var(--accent-bright));
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent);
}

.brand-mark svg {
  width: 1.45rem;
  height: 1.45rem;
}

.brand-text {
  display: grid;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.brand-text small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-link {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}

.header-link:hover {
  color: var(--accent);
}

.plugin-page {
  padding-block: 2.5rem 4.5rem;
}

.plugin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(22rem, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.plugin-identity {
  min-width: 0;
  padding: 2.1rem;
}

.plugin-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plugin-meta b {
  margin-inline: 0.25rem;
  color: var(--line-strong);
  font-weight: 400;
}

.version {
  padding: 0.18rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.35rem, 4.8vw, 3.65rem);
  font-weight: 830;
}

.plugin-summary {
  max-width: 42rem;
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
}

.plugin-spec {
  margin: 1.65rem 0 0;
  border-top: 1px solid var(--line);
}

.plugin-spec > div {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
}

.plugin-spec dt {
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.plugin-spec dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.plugin-spec a {
  color: inherit;
  text-decoration: none;
}

.plugin-spec a:hover {
  color: var(--accent);
}

.plugin-spec a span {
  color: var(--accent);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 620;
}

.keyword-list li + li::before {
  margin-right: 0.9rem;
  color: var(--line-strong);
  content: "·";
}

.plugin-install {
  min-width: 0;
  padding: 2.1rem;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title h2 {
  font-size: 1.42rem;
}

.terminal-icon {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 800;
}

.install-note {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.install-steps {
  display: grid;
  gap: 1.2rem;
  margin: 1.65rem 0 0;
  padding: 0;
  list-style: none;
}

.install-steps h3 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.install-steps h3 span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
}

.command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: 0.65rem;
  background: var(--code-bg);
}

.command code {
  min-width: 0;
  padding: 0.72rem 0.85rem;
  overflow-x: auto;
  color: var(--code-text);
  font-size: 0.75rem;
  line-height: 1.65;
  white-space: pre;
  scrollbar-width: thin;
}

.command-light {
  border-color: var(--line-strong);
  background: var(--surface-raised);
}

.command-light code {
  color: var(--text);
}

.copy-button {
  min-width: 3.5rem;
  padding: 0 0.62rem;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #c9c2d7;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.command-light .copy-button {
  border-left-color: var(--line);
  color: var(--accent-strong);
}

.command-light .copy-button:hover {
  background: var(--accent-soft);
}

.install-hint {
  margin: 1rem 0 0;
  color: var(--dim);
  font-size: 0.74rem;
}

.install-hint code,
.readme-lead code,
.doc-section p code,
.plain-list code,
.small-note code {
  padding: 0.08rem 0.28rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--accent-faint);
  color: var(--accent-strong);
  font-size: 0.88em;
}

.plugin-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(22rem, 1fr);
  align-items: start;
  margin-top: 2.6rem;
}

.plugin-reading {
  min-width: 0;
  padding: 0.6rem 3rem 0.6rem 0;
}

.doc-section h2,
.plugin-components > h2 {
  font-size: 1.58rem;
}

.readme-lead {
  max-width: 43rem;
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.doc-section h3 {
  margin: 2.1rem 0 0.7rem;
  font-size: 1.03rem;
}

.doc-section > p {
  max-width: 46rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.example-block + .example-block {
  margin-top: 0.7rem;
}

.example-block > span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.example-block .command code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.command-block {
  margin-top: 0.7rem;
}

.command-block code {
  white-space: pre;
}

.small-note {
  margin-top: 0.65rem !important;
  color: var(--dim) !important;
  font-size: 0.76rem !important;
}

.plain-list {
  display: grid;
  gap: 0.42rem;
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.plain-list li::before {
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  padding: 0.82rem 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.faq-list summary::marker {
  color: var(--accent);
}

.faq-list details > p {
  max-width: 46rem;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.faq-list details > .command {
  max-width: 46rem;
  margin-bottom: 0.75rem;
}

.plugin-components {
  min-width: 0;
  padding: 0.6rem 0 0.6rem 2.2rem;
  border-left: 1px solid var(--line);
}

.plugin-components > h2 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.plugin-components > h2 span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 800;
}

.component-group {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.component-group:last-child {
  border-bottom: 0;
}

.component-group h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.component-group h3 span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.component-item {
  margin-top: 0.75rem;
}

.component-item h4 {
  font-size: 0.96rem;
}

.component-item p,
.component-group > p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 60%, transparent);
  padding-block: 1.5rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: min(22rem, calc(100% - 2rem));
  padding: 0.62rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 0.6rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.45rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .plugin-hero,
  .plugin-body {
    grid-template-columns: 1fr;
  }

  .plugin-install {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .plugin-reading {
    padding-right: 0;
  }

  .plugin-components {
    margin-top: 2rem;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .plugin-page {
    padding-block: 1.2rem 3.2rem;
  }

  .plugin-identity,
  .plugin-install {
    padding: 1.25rem;
  }

  .plugin-meta {
    align-items: flex-start;
  }

  .plugin-summary {
    font-size: 0.95rem;
  }

  .plugin-spec > div {
    grid-template-columns: 3.8rem minmax(0, 1fr);
  }

  .command code {
    font-size: 0.7rem;
  }

  .plugin-reading {
    padding-top: 0;
  }

  .plugin-components {
    padding-top: 1.4rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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