/* Solid WebGL device, with a fully open HTML fallback when 3D is unavailable. */
.smart-duo {
  --duo-progress: 1;
  --fold-radius: clamp(16px, 3.7vw, 35px);
  --fold-rim: clamp(3px, .65vw, 6px);
  position: relative;
  width: min(100%, 1000px, max(320px, calc((100svh - 220px) * 1.36)));
  padding: 0;
  margin: 0 auto 40px;
}
.smart-duo::before {
  content: "";
  position: absolute;
  inset: 0 -5% 10%;
  background: radial-gradient(ellipse at 50% 55%, #f126321b, transparent 67%);
  pointer-events: none;
}
.duo-fold {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 1.36;
  isolation: isolate;
}
.duo-canvas { visibility: hidden; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.duo-3d-ready .duo-canvas { visibility: visible; }
.duo-3d-ready .duo-leaf { visibility: hidden; }
.duo-fold::before {
  content: "";
  position: absolute;
  width: 88%;
  height: 16%;
  left: 6%;
  bottom: 2%;
  background: #000b;
  border-radius: 50%;
  filter: blur(22px);
  z-index: -1;
  pointer-events: none;
}
.duo-leaf {
  position: absolute;
  top: 9.5%;
  width: 43%;
  height: 81%;
  padding: var(--fold-rim);
  background: linear-gradient(120deg, #a3a3a5 0%, #55565c 12%, #17191e 43%, #595b60 78%, #b5b6b9 100%);
  box-shadow: inset 0 0 0 1px #b6b7bd, inset 0 0 0 3px #292b30, 0 5px 0 #72767c, 0 8px 0 #181c20, 0 14px 28px #0007;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.duo-leaf--gosuslugi {
  left: 7%;
  padding-right: 0;
  border-radius: var(--fold-radius) 7px 7px var(--fold-radius);
}
.duo-leaf--telegram {
  right: 7%;
  padding-left: 0;
  border-radius: 7px var(--fold-radius) var(--fold-radius) 7px;
}
.duo-leaf--telegram::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 25%;
  width: 3px;
  height: 12%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(#a0a1a8, #34353b 20%, #22232a 80%, #a0a1a8);
}
.duo-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 3px solid #080b10;
  border-right: 0;
  border-radius: calc(var(--fold-radius) - var(--fold-rim)) 3px 3px calc(var(--fold-radius) - var(--fold-rim));
  color: #183863;
  background: radial-gradient(ellipse at 10% 100%, #cddfff, transparent 65%), linear-gradient(135deg, #fff, #eef5ff 70%);
  padding: 20% 11% 10%;
}
.duo-screen--telegram {
  border-left: 0;
  border-right: 3px solid #080b10;
  border-radius: 3px calc(var(--fold-radius) - var(--fold-rim)) calc(var(--fold-radius) - var(--fold-rim)) 3px;
  color: #f0f8ff;
  background: radial-gradient(ellipse at 90% 5%, #2b668a, transparent 66%), linear-gradient(145deg, #153c55, #0f2333);
}
.duo-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, #ffffff15 0%, transparent 35%, transparent 65%, #ffffff06);
  box-shadow: inset -15px 0 18px -14px #09132155;
}
.duo-screen--telegram::after { box-shadow: inset 15px 0 18px -14px #000b; }
.duo-status {
  position: absolute;
  top: 5%;
  left: 9%;
  right: 9%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: Arial, sans-serif;
  font-size: clamp(9px, 1.2vw, 12px);
  font-weight: 700;
  line-height: 1;
}
.duo-battery { position: relative; width: 18px; height: 9px; border: 1px solid currentColor; border-radius: 3px; opacity: .8; }
.duo-battery::before { content: ""; position: absolute; inset: 1px; border-radius: 1px; background: currentColor; }
.duo-battery::after { content: ""; position: absolute; right: -3px; top: 2px; width: 1px; height: 3px; background: currentColor; }
.duo-app-icon { width: 35%; max-width: 98px; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 25%; }
.duo-screen-title { margin-top: 7%; font-size: clamp(14px, 2.4vw, 26px); font-weight: 700; line-height: 1.25; white-space: nowrap; }
.duo-ui { width: 100%; display: grid; gap: clamp(6px, 1.4vw, 14px); margin-top: 15%; }
.duo-ui-row { display: flex; align-items: center; gap: 9%; padding: 9% 8%; border-radius: clamp(7px, 1.6vw, 16px); background: #ffffffc9; box-shadow: 0 4px 20px #23446906; }
.duo-ui-row i { display: block; flex: 0 0 17%; aspect-ratio: 1; background: #dce8fc; border-radius: 27%; }
.duo-ui-row span { display: block; width: 59%; height: clamp(3px, .6vw, 6px); border-radius: 5px; background: #b7cce9; box-shadow: 0 clamp(6px, 1vw, 10px) 0 #e1e9f5; }
.duo-screen--telegram .duo-ui-row { background: #ffffff0d; border: 1px solid #ffffff0a; }
.duo-screen--telegram .duo-ui-row:nth-child(2) { margin-left: 12%; background: #2b6688; }
.duo-screen--telegram .duo-ui-row i { background: #499ec9; border-radius: 50%; }
.duo-screen--telegram .duo-ui-row span { background: #a5c8dc; box-shadow: 0 clamp(6px, 1vw, 10px) 0 #58839d; }
.duo-home { position: absolute; bottom: 3%; left: 34%; width: 32%; height: 3px; border-radius: 3px; background: currentColor; opacity: .7; }
.duo-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 0;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px #0008);
}
.duo-hub-icon { display: none; }
.duo-hub .brand-name {
  font-family: "Fredoka Expanded", var(--font-display);
  font-size: clamp(15px, 4.2cqw, 38px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
}
.duo-connection {
  position: relative;
  margin: 10px auto 0;
  padding: 21px 8px 0;
  text-align: center;
  text-wrap: balance;
}
.duo-connection::before {
  content: "";
  position: absolute;
  top: 0;
  left: 23%;
  width: 54%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f3263c80, transparent);
}
.duo-connection strong {
  display: block;
  color: var(--text);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  line-height: 1.3;
}
.duo-connection span {
  display: block;
  max-width: 46ch;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.5;
}
.duo-3d-ready .duo-hub { opacity: clamp(0, calc((var(--duo-progress) - .62) / .35), 1); }
@media (max-width: 600px) {
  .smart-duo { padding: 0; margin-bottom: 30px; }
  .duo-screen { border-width: 2px; padding-top: 22%; padding-inline: 9%; }
  .duo-battery { width: 14px; height: 7px; }
  .duo-battery::after { top: 1px; }
  .duo-connection { margin-top: 12px; padding-inline: 0; }
  .duo-home { height: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .smart-duo { --duo-progress: 1 !important; }
}

.duo-connection .duo-illustration-note {
  display: block;
  max-width: 78ch;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.duo-connection .duo-illustration-note span {
  display: inline;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}
