:root {
  color-scheme: light;
  --page: #f7f8fb;
  --surface: #fff;
  --ink: #131b2b;
  --muted: #505e72;
  --line: #dce3ed;
  --soft: #f0f4fa;
  --blue: #234ac7;
  --button: #244bcb;
  --focus: #2d60ef;
  --paper: #edf1fa;
  --video: #f5e9ef;
  --desktop: #e8eff9;
  --scripts: #edf4fa;
  --track: #a0adc0;
  --store-track: #5576c7;
  --shadow: 0 10px 30px #18345b13, 0 1px 3px #18345b12;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #11151d;
    --surface: #191f2a;
    --ink: #f0f4fa;
    --muted: #b5c2d5;
    --line: #343e50;
    --soft: #222d3f;
    --blue: #a8bdff;
    --button: #385ccf;
    --focus: #9bb4ff;
    --paper: #252f47;
    --video: #3a2b3d;
    --desktop: #25344d;
    --scripts: #29374b;
    --track: #74849c;
    --store-track: #8aa9f2;
    --shadow: 0 14px 36px #080a1460, 0 1px 3px #0004;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1rem/1.65 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, figure { margin: 0; }
h2 { line-height: 1.3; }
p { color: var(--muted); }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}
.shell { width: min(100% - 56px, 1080px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.header-inner { min-height: 65px; }
.brand {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
  white-space: nowrap;
}
.brand img { display: block; }
.brand-latin { color: var(--muted); font-size: .87rem; font-weight: 500; margin-inline-start: 3px; }
nav, .footer-inner > div { display: flex; align-items: center; gap: 22px; }
nav a, .footer-inner a { color: var(--muted); font-size: .89rem; text-decoration: none; }
nav a:hover, .footer-inner a:hover { text-decoration: underline; text-underline-offset: 3px; }
nav .header-wzry { padding: 4px 9px; border-radius: 8px; background: var(--soft); color: var(--blue); font-weight: 650; }
.language {
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: .83rem;
  white-space: nowrap;
}
.language span { color: var(--muted); }

.products {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.slide-stage { display: grid; grid-template-columns: minmax(0, 1fr); touch-action: pan-y; }
.slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 320px;
}
.slide[hidden] { display: grid !important; visibility: hidden; }
.product-copy {
  align-self: center;
  max-width: 520px;
  width: 100%;
  padding: 28px clamp(24px, 4vw, 55px);
}
.product-icon { display: block; border-radius: 10px; object-fit: contain; margin-bottom: 14px; }
.product-copy h2 { font-size: clamp(1.21rem, 2.1vw, 1.58rem); letter-spacing: -.02em; font-weight: 730; }
.product-copy p { margin-top: 8px; max-width: 42ch; font-size: .93rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 15px; margin-top: 17px; }
.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 8px;
  color: white;
  background: var(--button);
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
}
.button:hover { filter: brightness(1.13); }
.text-link { color: var(--blue); font-size: .85rem; font-weight: 650; text-underline-offset: 3px; }
.slide-media {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 21px clamp(12px, 3vw, 35px);
  border-start-end-radius: 18px;
}
.paper-media { background: var(--paper); }
.video-media { background: var(--video); }
.desktop-media { background: var(--desktop); }
.scripts-media { background: var(--scripts); }
.wzry-media { background: var(--desktop); }
.wzry-example { width: min(100%, 480px); padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.wzry-example h3 { margin: 0; line-height: 1.35; font-size: 1rem; }
.wzry-example-caption { color: var(--muted); font-size: .82rem; }
.wzry-example dl { margin: 8px 0; font-size: .89rem; }
.wzry-example dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-block: 5px; border-top: 1px solid var(--line); }
.wzry-example dt { display: flex; align-items: baseline; gap: 8px; }
.wzry-example dt small { min-width: 3em; color: var(--muted); font-size: .76rem; }
.wzry-example dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.wzry-example-delta { padding: 5px 8px; border-radius: 6px; background: var(--soft); color: var(--blue); font-size: .81rem; }
.preview {
  display: grid;
  place-items: center;
  width: min(100%, 480px);
  aspect-ratio: 11 / 7;
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  color: var(--blue);
}
.preview > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.paper-media .preview, .video-media .preview, .scripts-media .preview { box-shadow: var(--shadow); }
.desktop-media .preview { width: min(100%, 317px); aspect-ratio: 677 / 657; }
.desktop-media .preview img { filter: drop-shadow(0 7px 9px #14284630); }
.scripts-media .preview { aspect-ratio: 1.66; }
.scripts-media .preview img { inset: 0 0 auto auto; width: 146%; height: auto; }
.zoom {
  display: grid;
  place-items: center;
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #17233b;
  background: #fff;
  box-shadow: 0 1px 5px #18284630;
  text-decoration: none;
  font-size: 1.06rem;
  line-height: 1;
}
.preview:hover .zoom { background: #eaf0ff; }
.carousel-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 55px;
  padding-inline: 18px;
  border-top: 1px solid var(--line);
}
.carousel-controls > .arrow { justify-self: start; }
.carousel-end, .picker { display: flex; align-items: center; gap: 7px; }
.carousel-end { justify-self: end; }
.control {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.control:hover, .control[aria-pressed="true"] { background: var(--soft); border-color: var(--line); color: var(--ink); }
.pick img { display: block; object-fit: contain; }
.pick[aria-pressed="true"] { border-color: var(--focus); }
.arrow { font-size: .85rem; }
.rotation span {
  width: 9px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.rotation[aria-pressed="true"] span {
  width: 0;
  height: 0;
  border: solid transparent;
  border-width: 5px 0 5px 8px;
  border-left-color: currentColor;
}

.technology { margin-top: 19px; }
.network {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 62px;
  align-items: center;
  justify-items: center;
  gap: 1px;
  padding: 13px 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.network::before, .network::after {
  content: "";
  align-self: stretch;
  justify-self: stretch;
  border-radius: 12px;
  pointer-events: none;
}
.network::before {
  grid-area: 1 / 1 / 4 / 4;
  background: var(--soft);
}
.network::after {
  grid-area: 1 / 10 / 4 / 13;
  background: var(--paper);
}
#connections { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#connections polyline { fill: none; stroke: var(--track); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
#connections polyline.development { stroke-dasharray: 4 3; stroke: var(--blue); }
#connections polyline.store { stroke: var(--store-track); }
#connections marker path { fill: var(--track); }
#connections #networkStoreArrow path { fill: var(--store-track); }
.tech-node {
  grid-column: var(--col);
  grid-row: var(--row);
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  background: #f7f9fc;
}
.tech-node:hover, .tech-node:focus-visible { border-color: #6180d1; background: #edf2ff; }
.tech-node img { display: block; width: 25px; height: 25px; object-fit: contain; }
.tech-node[data-zone="development"] { width: 38px; height: 38px; }
.tech-node[data-zone="development"] img { width: 22px; height: 22px; }
.tech-node[data-tech="github"] { width: 49px; height: 49px; border-color: #9cacc7; }
.tech-node[data-zone="product"] { width: 52px; height: 52px; }
.tech-node[data-zone="product"] img { width: 31px; height: 31px; }
.tooltip {
  position: fixed;
  z-index: 5;
  max-width: min(244px, calc(100vw - 14px));
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: .82rem;
  line-height: 1.48;
  pointer-events: none;
}
.tooltip strong { display: block; font-size: .84rem; }
.tooltip span { display: block; color: var(--muted); }

.site-footer { margin-top: 24px; border-top: 1px solid var(--line); }
.footer-inner { padding-block: 15px 22px; color: var(--muted); font-size: .84rem; }
.footer-inner > div { gap: 14px; }
.qq img { object-fit: contain; border-radius: 5px; }

dialog {
  max-width: min(94vw, 1350px);
  max-height: 93svh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 80px #0005;
}
dialog::backdrop { background: #0b132abd; }
.lightbox { padding: 14px; position: relative; }
.lightbox form { position: absolute; top: 22px; right: 22px; }
.close-preview {
  color: #17233b;
  background: white;
  height: 35px;
  width: 35px;
  border: 1px solid #c9d3e4;
  border-radius: 9px;
  box-shadow: 0 1px 6px #0003;
  font-size: 1.45rem;
  line-height: .9;
}
.lightbox > img {
  display: block;
  max-width: 100%;
  max-height: 78svh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-inline: auto;
}
.lightbox figcaption { margin: 8px 4px 0; color: var(--muted); font-size: .88rem; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  nav { gap: 15px; }
  .network { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .network::before { grid-area: 1 / 1 / 3 / 4; }
  .network::after { grid-area: 5 / 1 / 7 / 7; }
  .tech-node { grid-column: var(--narrow-col); grid-row: var(--narrow-row); }
}
@media (max-width: 550px) {
  .shell { width: calc(100% - 26px); }
  .header-inner { min-height: 56px; gap: 8px; }
  nav { gap: 11px; }
  nav a, .language { font-size: .81rem; }
  .brand-latin, .header-github { display: none; }
  .products { margin-top: 15px; }
  .slide { grid-template-columns: 1fr; min-height: 0; }
  .product-copy { padding: 18px 19px; }
  .product-icon { width: 35px; height: 35px; margin-bottom: 9px; }
  .actions { margin-top: 12px; }
  .slide-media { min-height: 165px; padding: 10px 12px; border-radius: 0; }
  .preview { max-height: 222px; }
  .carousel-controls { min-height: 47px; padding-inline: 9px; }
  .carousel-end, .picker { gap: 4px; }
  .control { width: 29px; height: 29px; }
  .network { padding: 10px 8px; grid-auto-rows: 47px; }
  .tech-node { width: 36px; height: 36px; }
  .tech-node img { width: 22px; height: 22px; }
  .tech-node[data-zone="development"] { width: 34px; height: 34px; }
  .tech-node[data-zone="development"] img { width: 20px; height: 20px; }
  .tech-node[data-tech="github"] { width: 40px; height: 40px; }
  .tech-node[data-zone="product"] { width: 42px; height: 42px; }
  .tech-node[data-zone="product"] img { width: 25px; height: 25px; }
  .footer-inner { gap: 8px; }
}
@media (max-width: 350px) {
  .header-inner { flex-wrap: wrap; padding-block: 7px; }
  nav { flex-wrap: wrap; gap: 8px; }
}
