:root {
  --background: #f5f6fa;
  --surface: #ffffff;
  --surface-muted: #f1f2f4;
  --ink: #212121;
  --ink-secondary: #616161;
  --ink-disabled: #9e9e9e;
  --primary: #3949ab;
  --primary-dark: #283593;
  --primary-light: #e8eaf6;
  --secondary: #f9a825;
  --divider: rgba(0, 0, 0, 0.12);
  --outline: #dadce0;
  --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.12);
  --elevation-2: 0 3px 8px rgba(0, 0, 0, 0.18), 0 2px 4px rgba(0, 0, 0, 0.12);
  --radius: 4px;
  --sans: Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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

body.is-viewer-open {
  overflow: hidden;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 2px;
  color: var(--primary-dark);
  background: var(--surface-muted);
  font-family: var(--mono);
  font-size: 0.88em;
}

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

.site-shell {
  width: 100%;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.app-bar {
  display: flex;
  width: min(calc(100% - 32px), 1180px);
  height: 78px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.brand,
.site-nav,
.header-about,
.product-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0;
  min-width: 0;
}

.brand-copy {
  display: grid;
  min-width: 0;
  max-width: 360px;
  gap: 1px;
}

.brand strong {
  overflow: hidden;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-tagline {
  overflow-wrap: anywhere;
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.header-about {
  min-height: 36px;
  gap: 6px;
  padding: 0 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}

.header-about:hover,
.header-about:focus-visible {
  color: var(--primary-dark);
  background: rgba(57, 73, 171, 0.08);
}

.site-nav {
  width: 100%;
  height: 48px;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  border-top: 1px solid var(--divider);
  scrollbar-width: none;
  white-space: nowrap;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 180ms ease, background-color 180ms ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--primary);
  background: rgba(57, 73, 171, 0.06);
}

.site-nav a.is-active {
  color: var(--primary);
}

.site-nav a.is-active::after {
  background: var(--primary);
}

main {
  width: min(calc(100% - 32px), 1120px);
  margin: 0 auto;
}

.product-section {
  scroll-margin-top: 136px;
  padding: 56px 0;
  border-bottom: 1px solid var(--divider);
}

.product-heading {
  margin-bottom: 28px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  overflow-wrap: anywhere;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 4px;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.2;
}

h2 {
  margin-bottom: 4px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
}

h3 {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.product-title {
  display: block;
}

.product-index {
  display: inline-block;
  margin-right: 12px;
  vertical-align: baseline;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.45em;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
}

.product-subtitle,
.plugin-subtitle {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 16px;
}

.qd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.qd-card,
.plugin-card,
.about-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--elevation-1);
}

.qd-card {
  overflow: hidden;
}

.qd-card .product-heading {
  margin-bottom: 28px;
  padding: 32px 32px 0;
}

.product-demo {
  display: grid;
  min-height: 460px;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--divider);
  background: #132820;
}

.product-demo img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
}

.gif-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: zoom-in;
}

.gif-trigger:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: -3px;
}

.product-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  border-left: 4px solid var(--primary-light);
  background: var(--surface);
  padding: 28px;
}

.product-description {
  margin-bottom: 24px;
  color: var(--ink-secondary);
  font-size: 19px;
  line-height: 1.75;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.feature-list li {
  position: relative;
  padding-left: 17px;
}

.feature-list li::before {
  position: absolute;
  top: 0.72em;
  left: 2px;
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: var(--secondary);
}

.feature-list strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.feature-list strong + span {
  display: block;
}

.product-copy > .feature-list {
  gap: 8px;
}

.product-copy > .feature-list li {
  padding: 8px 12px 8px 29px;
  border-left: 3px solid var(--primary-light);
  background: var(--surface-muted);
}

.product-copy > .feature-list li::before {
  left: 11px;
}

.product-links {
  flex-wrap: wrap;
  gap: 4px 8px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  color: var(--primary-dark);
  background: rgba(57, 73, 171, 0.08);
}

.button-dark {
  color: #ffffff;
  background: var(--primary);
  box-shadow: var(--elevation-1);
}

.button-dark:hover,
.button-dark:focus-visible {
  color: #ffffff;
  background: var(--primary-dark);
  box-shadow: var(--elevation-2);
}

.qd-links {
  border-top: 1px solid var(--divider);
  padding-top: 16px;
}

.plugins-section {
  padding-top: 56px;
  border-bottom: 0;
}

.plugin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.plugin-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 180ms ease;
  scroll-margin-top: 136px;
}

.plugin-card:hover {
  box-shadow: var(--elevation-2);
}

.plugin-media {
  min-height: 460px;
  overflow: hidden;
  border-right: 1px solid var(--divider);
  background: var(--surface-muted);
}

.plugin-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.plugin-media-empty {
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--primary);
  background: var(--primary-light);
  text-align: center;
}

.plugin-media-empty span {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.plugin-media-empty strong {
  color: var(--primary-dark);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 500;
}

.gif-lightbox[hidden] {
  display: none;
}

.gif-lightbox {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gif-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 24, 0.8);
}

.gif-lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: min(1200px, 94vw);
  max-height: 94vh;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--elevation-2);
}

.gif-lightbox-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--divider);
}

.gif-lightbox-toolbar p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14px;
}

.gif-lightbox-close {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.gif-lightbox-close:hover,
.gif-lightbox-close:focus-visible {
  color: var(--primary-dark);
  background: rgba(57, 73, 171, 0.08);
}

.gif-lightbox-image {
  width: auto;
  max-width: calc(94vw - 48px);
  height: auto;
  max-height: calc(94vh - 72px);
  object-fit: contain;
  background: #101b17;
}

.plugin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.plugin-card .product-heading {
  margin-bottom: 28px;
  padding: 32px 32px 0;
}

.plugin-copy {
  justify-content: center;
  border-left: 4px solid var(--primary-light);
}

.plugin-copy .plugin-subtitle {
  margin-bottom: 14px;
  font-size: 15px;
}

.plugin-description {
  margin-bottom: 16px;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.plugin-copy .feature-list {
  gap: 8px;
  margin-bottom: 20px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.plugin-links {
  display: flex;
  flex-wrap: wrap;
  margin: auto 0 0;
  align-items: center;
  gap: 4px 8px;
  border-top: 1px solid var(--divider);
  padding-top: 16px;
}

.plugin-links a {
  flex: 1 1 180px;
}

.plugin-card-text {
  background: var(--surface);
}

.lazy-cursor-wrap {
  min-width: 0;
}

.incubating-note {
  margin: 16px 0 0;
  color: var(--ink-secondary);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
}

.about-section {
  scroll-margin-top: 136px;
  padding: 0 0 72px;
}

.about-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  align-items: center;
  gap: 48px;
  border-top: 4px solid var(--primary);
  padding: 32px;
}

.about-kicker {
  margin-bottom: 8px;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.about-card h2 {
  margin-bottom: 0;
}

.about-copy {
  max-width: 520px;
}

.about-copy p {
  margin-bottom: 20px;
  color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1.75;
}

.about-copy .about-invitation {
  margin-top: 24px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.9;
}

.about-copy .button {
  flex: 0 1 auto;
}

@media (max-width: 800px) {
  .qd-layout {
    grid-template-columns: 1fr;
  }

  .plugin-layout {
    grid-template-columns: 1fr;
  }

  .product-demo,
  .plugin-media {
    min-height: 400px;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }

  .product-copy,
  .plugin-copy {
    min-height: 0;
    border-left: 0;
    border-top: 4px solid var(--primary-light);
  }
}

@media (max-width: 680px) {
  .app-bar {
    width: calc(100% - 24px);
    height: 72px;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand-copy {
    max-width: 240px;
  }

  .brand-tagline {
    font-size: 11px;
    line-height: 1.45;
  }

  .header-about {
    min-height: 36px;
    padding: 0 6px;
    font-size: 13px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    min-width: 72px;
    padding: 0 16px;
  }

  main {
    width: calc(100% - 24px);
  }

  .product-section {
    scroll-margin-top: 128px;
    padding: 40px 0;
  }

  .product-heading {
    margin-bottom: 20px;
  }

  .qd-card .product-heading {
    margin-bottom: 20px;
    padding: 24px 20px 0;
  }

  .plugin-card .product-heading {
    margin-bottom: 20px;
    padding: 24px 20px 0;
  }

  h1 {
    font-size: 34px;
  }

  .product-title {
    display: block;
  }

  .product-index {
    margin-right: 8px;
  }

  h2 {
    font-size: 26px;
  }

  .product-subtitle {
    font-size: 15px;
  }

  .product-demo {
    min-height: 320px;
  }

  .product-demo img {
    max-height: 390px;
  }

  .gif-lightbox {
    padding: 12px;
  }

  .gif-lightbox-panel {
    max-width: 96vw;
    max-height: 96vh;
  }

  .gif-lightbox-image {
    max-width: calc(96vw - 24px);
    max-height: calc(96vh - 72px);
  }

  .product-copy {
    padding: 22px 20px;
  }

  .product-description {
    margin-bottom: 20px;
    font-size: 17px;
  }

.qd-links .button {
    flex: 1 1 100%;
  }

  .plugins-section {
    padding-top: 40px;
  }

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

  .plugin-media {
    height: 320px;
    min-height: 320px;
    aspect-ratio: auto;
  }

  .plugin-copy {
    padding: 22px 20px;
  }

  .plugin-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .plugin-links a {
    min-height: 40px;
    justify-content: space-between;
    padding: 0 10px;
    text-align: left;
  }

  .about-section {
    scroll-margin-top: 128px;
    padding-bottom: 48px;
  }

  .about-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 20px;
  }

  .about-copy .button {
    width: 100%;
  }

  .about-copy .about-invitation {
    line-height: 1.95;
  }
}

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

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