/* Preserve the exact grid pattern and speed; move a composited texture instead
   of repainting its background-position behind every translucent card. */
[data-cs-root]>div:first-child>div[style*="csGridFloor"]{
  background:none!important;
  animation:none!important;
  overflow:hidden;
}
[data-cs-root]>div:first-child>div[style*="csGridFloor"]::before{
  content:"";position:absolute;inset:-50px 0 0;
  background:linear-gradient(90deg,rgba(106,111,242,.16) 1px,transparent 1px) 0 0/60px 100%,linear-gradient(rgba(106,111,242,.16) 1px,transparent 1px) 0 0/100% 50px;
  animation:csGridTexture 2.4s linear infinite;
  will-change:transform;
}
@keyframes csGridTexture{from{transform:translate3d(0,0,0)}to{transform:translate3d(0,50px,0)}}
[data-cs-canvas]{transform:translateZ(0)}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  [data-cs-root]>div:first-child>div[style*="csGridFloor"]::before{animation:none!important}
}

/* ---- UI upgrade 2026-11-10 ---- */
::selection{background:rgba(106,111,242,.5);color:#fff}
:focus-visible{outline:2px solid #9ca0f8;outline-offset:3px}
a:focus:not(:focus-visible),button:focus:not(:focus-visible){outline:none}

/* Cursor spotlight on cards (mouse only; position set by a rAF-throttled listener) */
@media (hover:hover) and (pointer:fine){
  .card:hover{background:radial-gradient(380px circle at var(--mx,50%) var(--my,0%),rgba(138,142,245,.18),rgba(74,222,128,.05) 40%,transparent 62%),linear-gradient(160deg,#2c2f5e6b,#12142e5c)}
  .card-dashed:hover{background:radial-gradient(320px circle at var(--mx,50%) var(--my,0%),rgba(138,142,245,.16),transparent 60%),#1e20408c}
}

/* Homepage hero cards: the side cards tuck under the middle one, so keep their text clear of it */
@media (min-width:921px){
  .hero-card-side--l{padding-right:64px}
  .hero-card-side--r{padding-left:50px}
}

/* Real cover images get a gentle zoom on hover */
a.card>img[width="1200"]{transition:transform .8s cubic-bezier(.22,1,.36,1)}
a.card:hover>img[width="1200"]{transform:scale(1.035)}
article img[width="1200"]{box-shadow:0 30px 70px rgba(3,4,18,.55),0 0 0 1px rgba(255,255,255,.03) inset}

/* Live-count stats */
[data-cs-stat]{font-variant-numeric:tabular-nums}

/* PDF & Image tools strip on the homepage */
.cs-strip{margin-top:22px;display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding:22px 26px;border-radius:20px;text-decoration:none;color:#eef0ff;
  background:linear-gradient(120deg,rgba(74,222,128,.12),rgba(106,111,242,.18) 45%,rgba(248,113,113,.10));border:1px solid rgba(165,170,255,.3);
  transition:border-color .3s,transform .3s,box-shadow .3s}
.cs-strip:hover{border-color:rgba(175,179,255,.6);transform:translateY(-3px);box-shadow:0 24px 54px rgba(3,4,18,.55),0 0 40px rgba(106,111,242,.18)}
.cs-strip__icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:rgba(74,222,128,.18);flex:none}
.cs-strip__body{flex:1;min-width:220px}
.cs-strip__title{font-family:'Space Grotesk',sans-serif;font-size:18px;font-weight:600;margin-bottom:4px}
.cs-strip__text{font-size:13px;line-height:1.6;color:rgba(238,240,255,.76)}
.cs-strip__chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.cs-strip__chips span{font-size:11px;font-weight:600;color:#c3c5ff;background:rgba(106,111,242,.2);border-radius:999px;padding:4px 10px}

/* Article extras: heading anchors and share bar */
.prose h2,.prose h3{scroll-margin-top:96px}
.cs-anchor{margin-left:10px;font-weight:500;color:#8a8ef5;text-decoration:none!important;opacity:0;transition:opacity .2s}
.prose h2:hover .cs-anchor,.prose h3:hover .cs-anchor,.cs-anchor:focus-visible{opacity:1}
@media (hover:none){.cs-anchor{display:none}}
.cs-share{margin-top:40px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cs-share span{font-size:12px;font-weight:600;letter-spacing:1.6px;color:#9ca0f8;text-transform:uppercase;margin-right:6px}
.cs-share a,.cs-share button{font:600 12.5px 'Instrument Sans',system-ui,sans-serif;color:#eef0ff;background:rgba(30,32,64,.7);border:1px solid rgba(138,142,245,.38);border-radius:999px;padding:8px 15px;text-decoration:none;cursor:pointer;transition:background .25s,border-color .25s}
.cs-share a:hover,.cs-share button:hover{background:rgba(106,111,242,.3);border-color:rgba(175,179,255,.7)}

/* Back-to-top button */
.cs-top{position:fixed;right:20px;bottom:22px;z-index:60;width:46px;height:46px;border-radius:50%;border:1px solid rgba(165,170,255,.4);cursor:pointer;
  background:linear-gradient(160deg,rgba(44,47,94,.92),rgba(18,20,46,.92));color:#eef0ff;display:grid;place-items:center;
  box-shadow:0 10px 30px rgba(3,4,18,.55),0 0 22px rgba(106,111,242,.25);opacity:0;transform:translateY(14px) scale(.9);pointer-events:none;
  transition:opacity .3s,transform .3s,border-color .3s}
.cs-top.is-on{opacity:1;transform:none;pointer-events:auto}
.cs-top:hover{border-color:rgba(175,179,255,.85)}

/* Phones: one compact header row for logo + subscribe, and a swipeable nav row under it */
@media (max-width:720px){
  header>div:first-child{padding:10px 16px!important;gap:8px 12px!important}
  header>div:first-child>nav{order:3;width:100%;flex-wrap:nowrap!important;overflow-x:auto;gap:4px!important;margin:0 -16px;padding:0 16px 2px;width:calc(100% + 32px);
    scrollbar-width:none;-webkit-mask:linear-gradient(90deg,transparent,#000 14px,#000 calc(100% - 22px),transparent);mask:linear-gradient(90deg,transparent,#000 14px,#000 calc(100% - 22px),transparent)}
  header>div:first-child>nav::-webkit-scrollbar{display:none}
  header>div:first-child>nav .navlink{padding:7px 14px;font-size:13px;flex:none}
  header>div:first-child>a.btn{padding:9px 16px;font-size:11px;letter-spacing:.5px}
  .cs-top{right:14px;bottom:16px;width:42px;height:42px}
}
@media (max-width:620px){
  .cs-strip{padding:18px}
}
@media (prefers-reduced-motion:reduce){
  .cs-top,.cs-strip,a.card>img[width="1200"]{transition:none}
}
/* Wide tables scroll inside the article instead of widening the whole page on phones */
@media (max-width:760px){.prose table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.prose th,.prose td{min-width:120px}}
