/* Hub-only paper interactions; the existing menu controller owns selection. */
body.hub-editorial[data-studio] .studio-atmosphere { opacity:.65; }
body.hub-editorial[data-studio] .studio-doodle { opacity:.16; }
body.hub-editorial[data-studio] .ui-hero { position:relative; overflow:visible; }
body.hub-editorial[data-studio] .ui-hero::before,body.hub-editorial[data-studio] .ui-hero::after { display:block; }
body.hub-editorial[data-studio] .ui-hero::before { content:""; position:absolute; inset:auto auto -2px 0; width:84px; height:3px; border-radius:50%; background:var(--vermilion); transform-origin:left; animation:hub-ink-in 1.4s .3s both; pointer-events:none; }
body.hub-editorial[data-studio] .ui-hero::after { content:""; position:absolute; inset:24px 8px auto auto; width:34px; height:34px; border:1px solid #ad362450; border-radius:50%; background:transparent; box-shadow:7px -5px 0 -1px var(--paper),8px -6px 0 -1px #527f7955; animation:studio-turn 24s linear infinite; pointer-events:none; }
body.hub-editorial[data-studio] .hub-intro { padding-right:52px; }
body.hub-editorial[data-studio] .hub-category-link { position:relative; transition:background .25s,color .25s,transform .25s; }
body.hub-editorial[data-studio] .hub-category-link::after { content:""; position:absolute; left:34px; right:12px; bottom:3px; height:2px; background:var(--vermilion); opacity:.48; border-radius:50%; transform:scaleX(0) rotate(-1deg); transform-origin:left; transition:transform .4s cubic-bezier(.16,1,.3,1); pointer-events:none; }
body.hub-editorial[data-studio] .hub-category-link[aria-current]::after { transform:scaleX(1) rotate(-1deg); }
body.hub-editorial[data-studio] .group-count { padding:3px 10px; border:1px solid #a9a192; border-radius:2px; rotate:3deg; background:#faf6ed; white-space:nowrap; }
body.hub-editorial[data-studio] .tool-card { background:radial-gradient(ellipse at 50% 30%,#fffdf7 0%,#faf6ed 65%); transition:rotate .3s ease,transform .3s ease,box-shadow .3s ease,border-color .3s ease; }
body.hub-editorial[data-studio] .tool-card::before { width:34px; transition:width .35s,background .35s; }
body.hub-editorial[data-studio] .tool-card::after { content:""; position:absolute; inset:auto 0 0 auto; width:22px; height:22px; background:linear-gradient(135deg,transparent 48%,#e4dccc 50%,#f5eee1 85%); pointer-events:none; transition:width .3s,height .3s; }
body.hub-editorial[data-studio] .tool-card .card-content { position:relative; z-index:1; }
body.hub-editorial[data-studio] .tool-card .icon { transition:transform .45s cubic-bezier(.2,.8,.2,1); }
body.hub-editorial[data-studio] .tool-card .card-link { position:relative; }
body.hub-editorial[data-studio] .tool-card .card-link::before { content:""; position:absolute; top:-1px; left:0; width:100%; height:1px; background:var(--vermilion); transform:scaleX(0); transform-origin:left; transition:transform .45s; }
body.hub-editorial[data-studio] .tool-card:focus-visible { outline:2px solid var(--vermilion); outline-offset:7px; box-shadow:6px 8px 0 var(--paper),7px 9px 0 #bbb19f; }
body.hub-editorial[data-studio] .tool-card:focus-visible .card-link::before { transform:scaleX(1); }
@media(hover:hover) and (pointer:fine) {
  body.hub-editorial[data-studio] .tool-card:hover { transform:translateY(-5px); border-color:#8b7a66; box-shadow:6px 9px 0 var(--paper),7px 10px 0 #bbb19f,0 18px 28px -22px #67533c80; }
  body.hub-editorial[data-studio] .tool-card:hover::before { width:54px; }
  body.hub-editorial[data-studio] .tool-card:hover::after { width:29px; height:29px; }
  body.hub-editorial[data-studio] .tool-card:hover .icon { transform:translateY(-3px) rotate(-8deg); }
  body.hub-editorial[data-studio] .tool-card:hover .card-link::before { transform:scaleX(1); }
}
body.hub-editorial[data-studio] .tool-card:active { transform:translateY(1px); rotate:0deg; box-shadow:1px 2px 0 #bbb19f; }
@keyframes hub-ink-in { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@media(max-width:700px) {
  body.hub-editorial[data-studio] .hub-category-link::after { left:9px; right:9px; bottom:4px; }
  body.hub-editorial[data-studio] .hub-intro { padding-right:0; }
  body.hub-editorial[data-studio] .ui-hero::after { inset:6px 0 auto auto; width:19px; height:19px; }
  body.hub-editorial[data-studio] .group-count { padding:2px 7px; }
}
@media print {
  body.hub-editorial[data-studio] .ui-hero::before,body.hub-editorial[data-studio] .ui-hero::after { display:none; }
  body.hub-editorial[data-studio] .tool-card,body.hub-editorial[data-studio] .group-count { rotate:none!important; transform:none!important; }
}

/* V3: colorful paper tabs, illuminated icons and a stronger selection response. */
body.hub-editorial[data-studio] .studio-atmosphere { opacity:.9; }
body.hub-editorial[data-studio] .studio-doodle { opacity:.3; }
body.hub-editorial[data-studio] .ui-hero::before { width:180px; height:4px; background:linear-gradient(90deg,#ad3624,#d8a852,#367f77); }
body.hub-editorial[data-studio] .tool-card { border-top:2px solid var(--studio-card-tone,#ad3624); background:radial-gradient(ellipse at 50% 20%,color-mix(in srgb,var(--studio-card-tone,#ad3624) 9%,#fffdf7),#faf6ed 70%); }
body.hub-editorial[data-studio] .tool-card::before { width:44px; height:9px; top:-10px; background:var(--studio-card-tone,#ad3624); }
body.hub-editorial[data-studio] .tool-card .icon { position:relative; isolation:isolate; margin-top:4px; }
body.hub-editorial[data-studio] .tool-card .icon::before { content:""; position:absolute; inset:-9px; border-radius:18px 22px 16px 25px; background:color-mix(in srgb,var(--studio-card-tone,#ad3624) 10%,#faf6ed); border:1px solid color-mix(in srgb,var(--studio-card-tone,#ad3624) 22%,transparent); rotate:-8deg; z-index:-1; transition:rotate .5s,scale .5s; }
body.hub-editorial[data-studio] .tool-card .icon svg { color:var(--studio-card-tone,#ad3624); }
body.hub-editorial[data-studio] .tool-card .badges { margin-top:9px; gap:6px; }
body.hub-editorial[data-studio] .tool-card .badge { border-radius:4px; padding:3px 9px; box-shadow:2px 2px 0 #79695414; rotate:-2deg; transition:rotate .4s,translate .4s; }
body.hub-editorial[data-studio] .hub-category-link[aria-current] { background:linear-gradient(110deg,#ecd0be,#f1e6cf); box-shadow:3px 3px 0 #ad362414; }
body.hub-editorial[data-studio] .group-count { border-color:#b09a7d; box-shadow:3px 3px 0 #b09a7d22; }
@media(hover:hover) and (pointer:fine) {
  body.hub-editorial[data-studio] .tool-card:hover { transform:perspective(900px) rotateX(var(--studio-rx,0deg)) rotateY(var(--studio-ry,0deg)) translateY(-8px); box-shadow:7px 11px 0 var(--paper),8px 12px 0 #bbb19f,0 22px 38px -18px #67533c50; }
  body.hub-editorial[data-studio] .tool-card:hover .icon::before { rotate:12deg; scale:1.12; }
  body.hub-editorial[data-studio] .tool-card:hover .badge { rotate:2deg; translate:0 -2px; }
  body.hub-editorial[data-studio] .tool-card:hover::before { width:70px; }
}
body.hub-editorial[data-studio] .tool-card:active { transform:translateY(1px); rotate:0deg; }
@media print { body.hub-editorial[data-studio] .tool-card .badge { box-shadow:none; rotate:none; } }

/* V4: category numbers, headings, stamps and badges respond independently. */
body.hub-editorial[data-studio] .hub-category-number { display:inline-block; transition:rotate .65s cubic-bezier(.2,.8,.2,1),scale .3s,color .3s; }
body.hub-editorial[data-studio] .group-count { transition:rotate .4s,scale .4s,translate .4s; }
body.hub-editorial[data-studio] .group-copy h2 { position:relative; }
body.hub-editorial[data-studio] .group-copy h2::after { content:""; position:absolute; left:0; bottom:-4px; width:100px; height:2px; background:var(--vermilion); border-radius:50%; transform:scaleX(0) rotate(-2deg); transform-origin:left; transition:transform .4s; pointer-events:none; }
body.hub-editorial[data-studio] .tool-card h3 { transition:translate .35s,color .35s; }
body.hub-editorial[data-studio] .tool-card .badge { transition:rotate .4s,translate .4s,scale .4s,box-shadow .4s; }
body.hub-editorial[data-studio] .editorial-masthead>a:last-child { transition:translate .3s,rotate .3s; }
@media(hover:hover) and (pointer:fine) {
  body.hub-editorial[data-studio] .hub-category-link:hover .hub-category-number { rotate:360deg; scale:1.22; color:var(--vermilion); }
  body.hub-editorial[data-studio] .hub-category-link:hover::after { transform:scaleX(1) rotate(-1deg); }
  body.hub-editorial[data-studio] .section-heading:hover .group-count { rotate:-6deg; scale:1.08; translate:0 -3px; }
  body.hub-editorial[data-studio] .section-heading:hover .group-copy h2::after { transform:scaleX(1) rotate(-2deg); }
  body.hub-editorial[data-studio] .tool-card:hover h3 { translate:0 -3px; color:var(--studio-card-tone,var(--vermilion)); }
  body.hub-editorial[data-studio] .tool-card:hover .icon svg { animation:studio-icon-salute .7s ease both; }
  body.hub-editorial[data-studio] .tool-card .badge:hover { rotate:-7deg; scale:1.12; translate:0 -5px; box-shadow:3px 5px 0 #79695420; }
  body.hub-editorial[data-studio] .editorial-masthead>a:last-child:hover { translate:3px -2px; rotate:-3deg; }
}
body.hub-editorial[data-studio] .hub-category-link:focus-visible .hub-category-number { rotate:360deg; scale:1.15; }
