/* Scoped PointerComm 3D flipbook — does not reset global body/html */
.comm-flip {
  --pw: min(calc((100vw - 120px) / 2.3), calc((100vh - 130px) * 700 / 933), 560px);
  --ph: calc(var(--pw) * 933 / 700);
  --t: calc(var(--pw) * 0.017);
  --flip: 1.1s;
  --ease: cubic-bezier(.645,.045,.355,1);
  --f: calc(var(--pw) * .06);
  --rr: 3deg;
  --hr: 16deg;
  --rl: 10deg;
  --hl: 20deg;
  --gold: #cfe6ff;
  margin-top: 32px;
  padding-top: 8px;
}
.comm-flip .section-head { margin-bottom: 18px; }
.voice-calls-page .comm-share-shell {
  width: min(100%, max(320px, 33vw));
  max-width: 480px;
  margin-inline: auto;
}
.voice-calls-page .comm-flip { margin-top: 8px; }
.voice-calls-page .comm-flip .comm-grid { grid-template-columns: 1fr; }
.voice-calls-page .comm-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  color: var(--navy, #0b2a4d);
}
.voice-calls-page .comm-card > p { margin: 0 0 14px; }
.voice-calls-page .comm-card:hover { transform: none; }
.comm-flip .comm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.comm-flip .comm-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #d9e6ef);
  border-radius: 15px;
  padding: 18px;
  box-shadow: 0 5px 18px rgba(11,43,76,.05);
  font-family: Inter, Arial, sans-serif;
  min-width: 0;
  transition: .2s;
}
.comm-flip .comm-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow, 0 12px 34px rgba(11,43,76,.09));
  border-color: #b4d8eb;
}
.comm-flip .comm-ico {
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: var(--pale, #eaf6fc);
  color: var(--blue, #087db5);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.comm-flip .comm-ico svg,
.comm-flip .comm-demo svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.comm-flip .comm-demo svg { width: 14px; height: 14px; color: var(--blue, #087db5); }
.comm-flip .comm-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 5px;
  color: var(--navy, #0b2b4c);
  letter-spacing: -0.01em;
  min-height: 0;
}
.comm-flip .comm-card > p {
  color: var(--muted, #62788b);
  line-height: 1.55;
  margin: 0 0 14px;
  min-height: 0;
  font-size: 12px;
}
.comm-flip .comm-demo {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 8px 9px;
  background: #f9fbfd;
  border: 1px solid #e2ebf1;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: #345168;
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.comm-flip .comm-demo:hover {
  border-color: var(--sky, #27a9e0);
  background: var(--pale, #eaf6fc);
  box-shadow: none;
}
.comm-flip .comm-demo i {
  width: 16px;
  height: 16px;
  border: 1.5px solid #9fb0c6;
  border-radius: 4px;
  flex: none;
}
.comm-flip .comm-demo span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-flip .comm-copy {
  margin-top: 10px;
  border: 1px solid #c5d3e2;
  background: #fff;
  color: #0a2a4d;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.comm-flip .comm-copy:hover { border-color: #0a6bc4; color: #0a6bc4; }
.comm-flip-hint {
  text-align: center;
  color: var(--muted, #62788b);
  font-size: 12px;
  margin: 16px 0 0;
  font-family: Inter, Arial, sans-serif;
}

/* Modal + 3D book */
#commBookModal {
  --pw: min(calc((100vw - 120px) / 2.3), calc((100vh - 130px) * 700 / 933), 560px);
  --ph: calc(var(--pw) * 933 / 700);
  --t: calc(var(--pw) * 0.017);
  --flip: 1.1s;
  --ease: cubic-bezier(.645,.045,.355,1);
  --f: calc(var(--pw) * .06);
  --rr: 3deg;
  --hr: 16deg;
  --rl: 10deg;
  --hl: 20deg;
  --gold: #cfe6ff;
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  background: #071827;
  color: #0b2a4d;
}
#commBookModal.show { display: flex; animation: commBookFade .25s; }
@keyframes commBookFade { from { opacity: 0; } }
html.book-open .comm-flip .comm-grid { visibility: hidden; }

#commBookModal .comm-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px;
  background: transparent;
}
#commBookModal .comm-bar > div:first-child,
#commBookModal .comm-count { display: none; }
#commBookModal .comm-x {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid #0b63c9;
  background: #fff;
  color: #0b63c9;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
#commBookModal .comm-x:hover { background: #0b63c9; color: #fff; }

#commBookModal .comm-stage {
  position: relative;
  perspective: 3200px;
  perspective-origin: 50% 0%;
  padding: 10px 10px 40px;
}
#commBookModal .comm-tilt {
  position: relative;
  width: var(--pw);
  height: var(--ph);
  transform-style: preserve-3d;
  transform: rotateX(7deg);
  transition: transform 2s cubic-bezier(.165,.84,.44,1);
}
#commBookModal .comm-tilt:hover { transform: rotateX(2deg); }
#commBookModal .comm-book {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
#commBookModal .comm-book.ready { transition: transform var(--flip) var(--ease); }
#commBookModal .comm-book[data-s="closed"] { transform: translateX(0); }
#commBookModal .comm-book[data-s="open"] { transform: translateX(calc(var(--pw) * .5)); }
#commBookModal .comm-book[data-s="end"] { transform: translateX(var(--pw)); }

#commBookModal .comm-shadow {
  position: absolute;
  left: 50%;
  bottom: 6px;
  height: 44px;
  width: calc(var(--pw) * 2.3);
  margin-left: calc(var(--pw) * -1.15);
  border-radius: 50%;
  filter: blur(12px);
  background: radial-gradient(ellipse, rgba(11,42,77,.4), transparent 68%);
  transform: scaleX(.5);
  transition: transform var(--flip) var(--ease);
}
#commBookModal .comm-stage[data-s="open"] .comm-shadow { transform: scaleX(1); }

#commBookModal .stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  will-change: transform;
}
#commBookModal .stack.r {
  transform-origin: 0 50%;
  transform: rotateY(calc(var(--rr) * -1)) translateZ(-1px) scaleX(1);
}
#commBookModal .stack.l {
  inset: 0 auto auto -100%;
  width: 100%;
  height: 100%;
  transform-origin: 100% 50%;
  transform: rotateY(var(--rl)) translateZ(-1px) scaleX(1);
}
#commBookModal .stack i { position: absolute; display: block; }
#commBookModal .stack .bot {
  left: 0; right: 0; top: 100%;
  transform-origin: top;
  background: repeating-linear-gradient(180deg,#f7eedc 0 2px,#c9ba98 2px 3px);
}
#commBookModal .stack .side {
  left: 0; top: 0; bottom: 0;
  transform-origin: left;
  background: repeating-linear-gradient(90deg,#f7eedc 0 2px,#c9ba98 2px 3px);
}
#commBookModal .stack.r .side { left: 100%; }
#commBookModal .stack .board {
  inset: -6px;
  border-radius: 3px;
  background: #0a2a4d;
  box-shadow: inset -4px -4px 4px 1px #4f7fb8, inset -7px -7px 4px #06182e;
}
#commBookModal .stack.l .board {
  border-radius: 8px 3px 3px 8px;
  box-shadow: inset 4px -4px 4px 1px #4f7fb8, inset 7px -7px 4px #06182e;
}
#commBookModal .comm-book.ready .stack,
#commBookModal .comm-book.ready .stack i { transition: transform var(--flip) var(--ease); }
#commBookModal .comm-book[data-s="closed"] .stack.l { transform: rotateY(var(--rl)) translateZ(-1px) scaleX(0); }
#commBookModal .comm-book[data-s="end"] .stack.r { transform: rotateY(calc(var(--rr) * -1)) translateZ(-1px) scaleX(0); }
#commBookModal .comm-book,
#commBookModal .leaf,
#commBookModal .hinge { will-change: transform; }
#commBookModal .comm-book.turning { pointer-events: none; }

#commBookModal .spine {
  position: absolute;
  left: calc(var(--pw) * -.028);
  width: calc(var(--pw) * .056);
  top: -6px; bottom: -6px;
  transform: translateZ(-4px);
  border-radius: 3px;
  background: linear-gradient(90deg, #4f7fb8, #0a2a4d 21%, #4f7fb8 30%, #0a2a4d 48%, #4f7fb8 68%, #0a2a4d 79%, #4f7fb8);
}
#commBookModal .hinge {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--rr) * -1));
  transition: transform 650ms cubic-bezier(.165,.84,.44,1);
}
#commBookModal .leaf.flipped .hinge { transform: rotateY(var(--rl)); }
#commBookModal .comm-book.turning .hinge {
  transition-duration: var(--flip);
  transition-timing-function: var(--ease);
}
#commBookModal .comm-book:not(.turning) .leaf.top:hover .hinge { transform: rotateY(calc(var(--hr) * -1)); }
#commBookModal .comm-book:not(.turning) .leaf.flipped.top:hover .hinge { transform: rotateY(var(--hl)); }
#commBookModal .leaf {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  cursor: pointer;
}
#commBookModal .comm-book.ready .leaf { transition: transform var(--flip) var(--ease); }

#commBookModal .face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #fffdf8;
  box-shadow: inset 0 0 26px 2px #d8cccc, 0 1px 10px rgba(34,27,20,.45);
  border-radius: 2px 7px 7px 2px;
}
#commBookModal .face.back { transform: rotateY(180deg); border-radius: 7px 2px 2px 7px; }
#commBookModal .face::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 22%;
  z-index: 2;
  pointer-events: none;
}
#commBookModal .face.front::before {
  left: 0;
  background: linear-gradient(90deg, rgba(40,20,0,.38), rgba(40,20,0,.08) 55%, transparent);
}
#commBookModal .face.back::before {
  right: 0;
  background: linear-gradient(270deg, rgba(40,20,0,.38), rgba(40,20,0,.08) 55%, transparent);
}
#commBookModal .shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--flip) ease;
}
#commBookModal .face.front .shade { background: linear-gradient(270deg, rgba(25,12,0,.65), rgba(25,12,0,.15)); }
#commBookModal .face.back .shade { background: linear-gradient(90deg, rgba(25,12,0,.65), rgba(25,12,0,.15)); opacity: 1; }
#commBookModal .leaf.flipped .face.front .shade { opacity: 1; }
#commBookModal .leaf.flipped .face.back .shade { opacity: 0; }

#commBookModal .photo { position: absolute; inset: 0; background: #0a2a4d; }
#commBookModal .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
#commBookModal .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12% 10px;
  z-index: 3;
  color: #fff;
  text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  font-size: clamp(11px, calc(var(--pw) * .035), 15px);
}

#commBookModal .face.cover {
  inset: -6px -6px -6px 0;
  border-radius: 3px 12px 12px 3px;
  color: var(--gold);
  display: grid;
  place-content: center;
  text-align: center;
  padding: 14%;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.16), transparent 55%),
    repeating-linear-gradient(45deg, rgba(0,0,0,.06) 0 2px, transparent 2px 4px),
    linear-gradient(135deg, #1a5aa8, #0a2a4d 60%, #071c36);
  box-shadow: inset -4px -4px 4px 1px #4f7fb8, inset -7px -7px 4px #06182e;
}
#commBookModal .face.back.cover {
  border-radius: 12px 3px 3px 12px;
  box-shadow: inset 4px -4px 4px 1px #4f7fb8, inset 7px -7px 4px #06182e;
}
#commBookModal .face.cover::before {
  width: 3px; top: 0; bottom: 0; left: 7%; right: auto;
  background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.1));
}
#commBookModal .face.back.cover::before { left: auto; right: 7%; }
#commBookModal .face.cover::after {
  content: "";
  position: absolute;
  inset: 9% 7% 9% 12%;
  border: 2px solid var(--gold);
  border-radius: 3px;
  opacity: .65;
  box-shadow: inset 0 0 0 5px transparent, inset 0 0 0 6px rgba(224,187,116,.35);
}
#commBookModal .face.back.cover::after { inset: 9% 12% 9% 7%; }
#commBookModal .face.cover h1 {
  font-size: clamp(20px, calc(var(--pw) * .1), 42px);
  line-height: 1.12;
  letter-spacing: .02em;
  text-shadow: 0 -1px 0 rgba(0,0,0,.55), 0 1px 0 rgba(255,235,180,.3);
  margin: 0;
}
#commBookModal .face.cover p {
  font-style: italic;
  font-size: clamp(11px, calc(var(--pw) * .04), 16px);
  opacity: .85;
  margin: 0;
}
#commBookModal .orn {
  height: 14px;
  margin: 16px auto;
  width: 55%;
  position: relative;
  background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold) 75%, transparent) center / 100% 1px no-repeat;
}
#commBookModal .orn::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 9px; height: 9px;
  background: var(--gold);
  transform: translate(-50%,-50%) rotate(45deg);
}
#commBookModal .fold {
  position: absolute;
  top: 0;
  width: var(--f);
  height: var(--f);
  z-index: 3;
}
#commBookModal .face.front .fold { right: 0; background: linear-gradient(225deg, #cfc4ae 49%, #fff 51%, #ece4d2); }
#commBookModal .face.back .fold { left: 0; background: linear-gradient(135deg, #cfc4ae 49%, #fff 51%, #ece4d2); }

#commBookModal .comm-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 130;
  width: 48px; height: 48px;
  background: rgba(255,255,255,.8);
  color: #0b63c9;
  border: 1.5px solid #0b63c9;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
#commBookModal .comm-nav.prev { left: 16px; }
#commBookModal .comm-nav.next { right: 16px; }
#commBookModal .comm-nav:hover:not(:disabled) { background: #0b63c9; color: #fff; }
#commBookModal .comm-nav:disabled { opacity: .3; cursor: default; }

#commBookModal .face.audio {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 12%;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, #0f3d73, #0a2a4d 60%, #071c36);
}
#commBookModal .face.audio .mic {
  width: calc(var(--pw) * .26);
  height: calc(var(--pw) * .26);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: grid;
  place-items: center;
}
#commBookModal .face.audio .mic svg { width: 50%; height: 50%; fill: none; stroke: currentColor; stroke-width: 2; }
#commBookModal .face.audio .cat {
  margin: 0;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #9fd0ff;
}
#commBookModal .face.audio h4 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(15px, calc(var(--pw) * .05), 22px);
}
#commBookModal .face.audio audio { width: 100%; }

#commBookModal .face.endp {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8% 6% 12%;
  color: #fff;
  background: linear-gradient(135deg, #0b2a4d 0%, #0e4a80 55%, #0a74b3 100%);
}
#commBookModal .face.endp small {
  font-size: calc(var(--pw) * .032);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7fd1ff;
}
#commBookModal .face.endp h2 {
  font-size: calc(var(--pw) * .08);
  line-height: 1.1;
  margin: .5em 0 .6em;
}
#commBookModal .face.endp p {
  font-size: calc(var(--pw) * .037);
  line-height: 1.6;
  color: #dbe9f7;
  margin: 0;
  max-width: 85%;
}

@media (max-width: 600px) {
  .comm-flip {
    --pw: min(calc(100vw - 36px), calc((100vh - 160px) * 700 / 933), 420px);
    margin-top: 20px;
  }
  .comm-flip .comm-grid { grid-template-columns: 1fr; gap: 12px; }
  .comm-flip .comm-card { padding: 16px; }
  .comm-flip .comm-card h3 { font-size: 14.5px; }
  #commBookModal .comm-nav { width: 44px; height: 44px; font-size: 16px; }
  #commBookModal .comm-nav.prev { left: 6px; }
  #commBookModal .comm-nav.next { right: 6px; }
  #commBookModal .comm-stage { padding: 4px 4px 48px; }
  #commBookModal .comm-close { width: 44px; height: 44px; top: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .comm-flip, #commBookModal { --flip: .01s; }
  #commBookModal .comm-tilt { transition: none; }
}
