/* =========================================================
   MYFUNADS — PUBLISHERS PAGE
   "Publisher Traffic Intelligence". Builds on the shared
   system in css/pages.css; behaviour in js/publishers.js.
========================================================= */


/* =====================================================
   HERO
===================================================== */

.pub-hero {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 214, 180, .55), transparent 46%),
        radial-gradient(circle at 92% 70%, rgba(244, 123, 32, .14), transparent 34%);
}

/* faint data grid behind the hero */
.pub-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(17, 17, 17, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 17, 17, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000, transparent 75%);
}

.pub-hero-copy {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}

.pub-hero-copy .pg-hero-topline,
.pub-hero-copy .pg-actions {
    justify-content: center;
}

.pub-hero-copy .pg-lead {
    margin-inline: auto;
    max-width: 680px;
}

.pub-title {
    margin: 0;
    font-size: clamp(42px, 7vw, 96px);
    line-height: .95;
    letter-spacing: -.06em;
    font-weight: 700;
    text-wrap: balance;
}


/* =====================================================
   HERO SIDE VISUALS (decorative CSS 3D)
   Two clusters in the wide margins beside the centred
   copy: an orb with orbital rings (left) and a layered
   data stack with a floating cube (right). Everything is
   sized in em from --decor-w, so each cluster scales as
   one piece; they sit at least 380px from the centre
   (the lead is 680px wide) and never reach the copy.
   Transform / opacity animation only; static under
   reduced motion; paused off-screen ([data-loop]).
===================================================== */

.pub-hero-decor {
    --decor-w: min(300px, calc(50vw - 404px));
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    pointer-events: none;
}

@media (min-width: 1180px) {
    .pub-hero-decor {
        display: block;
    }
}

.pub-decor {
    position: absolute;
    /* vertically centred on the copy block (176px → ~666px) */
    top: calc(421px - var(--decor-w) * .7);
    width: var(--decor-w);
    height: calc(var(--decor-w) * 1.4);
    font-size: calc(var(--decor-w) / 30);
}

.pub-decor--left {
    right: calc(50% + 380px);
}

.pub-decor--right {
    left: calc(50% + 380px);
}

.pub-decor-float {
    position: absolute;
    inset: 0;
    perspective: 1100px;
}

.pub-decor-scene {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    /* --tx / --ty: pointer position over the hero (pages.js) */
    transform:
        rotateX(calc(var(--ty) * -6deg))
        rotateY(calc(var(--tx) * 10deg));
    transition: transform .2s linear;
}

/* :where() keeps this base at zero specificity */
:where(.pub-decor-scene) span,
:where(.pub-decor-scene) i {
    position: absolute;
    display: block;
}

.pub-decor-shadow {
    left: 14%;
    right: 14%;
    bottom: 3%;
    height: 4em;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(120, 50, 10, .2), transparent 70%);
    transform: translateZ(-4em);
}

/* ---- left: orb + orbital rings ---- */

.pub-orb {
    left: 50%;
    top: 46%;
    width: 12em;
    height: 12em;
    margin: -6em 0 0 -6em;
    border-radius: 50%;
    background:
        radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .95) 0 5%, rgba(255, 255, 255, 0) 24%),
        radial-gradient(circle at 72% 80%, rgba(110, 30, 0, .5), transparent 55%),
        radial-gradient(circle at 40% 34%, #ffbe85 0%, #f47b20 40%, #d9600c 68%, #6e2604 100%);
    box-shadow:
        0 2.6em 4.2em rgba(217, 96, 12, .34),
        inset -.9em -1.3em 2.4em rgba(90, 25, 0, .38),
        inset .6em .6em 1.4em rgba(255, 255, 255, .32);
}

.pub-ring {
    left: 50%;
    top: 46%;
    border-radius: 50%;
    transform-style: preserve-3d;
}

.pub-ring--outer {
    width: 27em;
    height: 27em;
    margin: -13.5em 0 0 -13.5em;
    border: 1px dashed rgba(17, 17, 17, .2);
    transform: rotateX(74deg) rotateY(-12deg);
}

.pub-ring--inner {
    width: 19.5em;
    height: 19.5em;
    margin: -9.75em 0 0 -9.75em;
    border: 1.5px solid rgba(244, 123, 32, .55);
    box-shadow: 0 0 1.4em rgba(244, 123, 32, .28);
    transform: rotateX(70deg) rotateY(16deg);
}

/* carriers turn inside each tilted ring, so their dots trace
   a true 3D orbit and pass behind the orb */
.pub-ring i {
    inset: -1px;
    border-radius: 50%;
}

.pub-ring i::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -.55em;
    width: 1.1em;
    height: 1.1em;
    margin-left: -.55em;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffd2ab, var(--mf-orange) 60%);
    box-shadow: 0 0 1.2em rgba(244, 123, 32, .9);
}

.pub-ring--outer i::before {
    background: var(--mf-ink);
    box-shadow: 0 0 0 .3em rgba(255, 255, 255, .7);
}

.pub-ring--inner i:nth-child(2) {
    rotate: 180deg;
}

.pub-ring--inner i:nth-child(2)::before {
    width: .75em;
    height: .75em;
    margin-left: -.37em;
    top: -.37em;
}

.pub-glass {
    left: 0;
    top: 5%;
    width: 12.5em;
    height: 8.4em;
    padding: 1.3em 1.2em 1.1em;
    display: flex;
    align-items: flex-end;
    gap: .55em;
    border-radius: 1.5em;
    background: linear-gradient(150deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .45));
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 1.8em 3.4em rgba(120, 60, 20, .16), inset 0 1px 0 #fff;
    transform: translateZ(6em) rotateY(18deg) rotateX(8deg);
}

.pub-glass b {
    flex: 1;
    height: calc(var(--h) * 100%);
    border-radius: .35em;
    background: linear-gradient(180deg, #ff9a52, var(--mf-orange));
    transform-origin: 50% 100%;
}

.pub-glass b:nth-child(odd) {
    background: linear-gradient(180deg, #3a3334, var(--mf-ink));
}

.pub-tile {
    right: 3%;
    bottom: 13%;
    width: 7.6em;
    height: 7.6em;
    border-radius: 1.7em;
    background: linear-gradient(145deg, #2c2627, var(--mf-dark));
    box-shadow: 0 1.8em 3em rgba(17, 17, 17, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
    transform: translateZ(3.5em) rotateX(16deg) rotateY(-26deg);
}

.pub-tile::before,
.pub-tile::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
}

.pub-tile::before {
    width: 1.4em;
    height: 1.4em;
    margin: -.7em 0 0 -.7em;
    background: var(--mf-orange);
    box-shadow: 0 0 1.6em rgba(244, 123, 32, .95);
}

.pub-tile::after {
    width: 4.2em;
    height: 4.2em;
    margin: -2.1em 0 0 -2.1em;
    border: 1px solid rgba(244, 123, 32, .45);
}

/* ---- right: layered data stack + cube ---- */

.pub-stack {
    left: 50%;
    top: 60%;
    width: 17em;
    height: 17em;
    margin: -8.5em 0 0 -8.5em;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateZ(-40deg);
}

.pub-slab {
    inset: 0;
    border-radius: 2.4em;
    transform-style: preserve-3d;
    translate: 0 0 calc(var(--z) * 3.4em);
}

/* edge, so each slab reads as a solid layer */
.pub-slab::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transform: translateZ(-.8em);
    background: rgba(120, 50, 10, .22);
}

.pub-slab:nth-child(1) {
    background:
        radial-gradient(circle, rgba(244, 123, 32, .6) 1.5px, transparent 2.2px) 0 0 / 2.3em 2.3em,
        linear-gradient(145deg, #262021, var(--mf-dark));
    box-shadow: 0 3em 4em rgba(17, 17, 17, .25), inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.pub-slab:nth-child(1)::before {
    background: #070606;
}

.pub-slab:nth-child(2) {
    background:
        linear-gradient(rgba(17, 17, 17, .06) 1px, transparent 1px) 0 0 / 2.3em 2.3em,
        linear-gradient(90deg, rgba(17, 17, 17, .06) 1px, transparent 1px) 0 0 / 2.3em 2.3em,
        rgba(255, 255, 255, .7);
    box-shadow: inset 0 0 0 1px #fff;
}

.pub-slab:nth-child(2)::before {
    background: rgba(214, 190, 170, .55);
}

.pub-slab:nth-child(3) {
    inset: 18%;
    border-radius: 1.8em;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), transparent 45%),
        linear-gradient(135deg, #ffb170, var(--mf-orange) 55%, var(--mf-coral));
    box-shadow: 0 0 3.2em rgba(244, 123, 32, .5);
}

.pub-slab:nth-child(3)::before {
    background: #b8500a;
}

.pub-beam {
    left: 50%;
    top: 4%;
    width: 2px;
    height: 46%;
    margin-left: -1px;
    background: linear-gradient(to top, rgba(244, 123, 32, .85), rgba(244, 123, 32, 0));
    transform: translateZ(8em);
}

.pub-beam i {
    left: 50%;
    bottom: 0;
    width: .8em;
    height: .8em;
    margin-left: -.4em;
    border-radius: 50%;
    background: var(--mf-orange);
    box-shadow: 0 0 1em rgba(244, 123, 32, .9);
    opacity: 0;
}

.pub-cube {
    right: 6%;
    top: 7%;
    width: 5em;
    height: 5em;
    transform-style: preserve-3d;
    transform: translateZ(5em) rotateX(-24deg) rotateY(38deg);
}

.pub-cube i {
    inset: 0;
    border-radius: .7em;
    background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 236, 220, .7));
    border: 1px solid rgba(244, 123, 32, .35);
    box-shadow: inset 0 0 1.4em rgba(244, 123, 32, .12);
}

.pub-cube i:nth-child(1) { transform: translateZ(2.5em); background: linear-gradient(145deg, #ffb170, var(--mf-orange)); border-color: rgba(255, 255, 255, .5); }
.pub-cube i:nth-child(2) { transform: rotateY(180deg) translateZ(2.5em); }
.pub-cube i:nth-child(3) { transform: rotateY(90deg) translateZ(2.5em); }
.pub-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(2.5em); background: linear-gradient(145deg, #2c2627, var(--mf-dark)); border-color: rgba(255, 255, 255, .1); }
.pub-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(2.5em); }
.pub-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(2.5em); }

.pub-halo {
    left: 2%;
    top: 16%;
    width: 8em;
    height: 8em;
    border-radius: 50%;
    border: 1px dashed rgba(244, 123, 32, .55);
    transform: translateZ(2em) rotateX(64deg) rotateY(-10deg);
}

.pub-halo::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -.4em;
    width: .8em;
    height: .8em;
    margin-left: -.4em;
    border-radius: 50%;
    background: var(--mf-ink);
}

/* ---- shared sparks ---- */

.pub-spark {
    width: .9em;
    height: .9em;
    border-radius: 50%;
    background: var(--mf-orange);
    box-shadow: 0 0 1em rgba(244, 123, 32, .8);
}

.pub-spark--a { right: 12%; top: 10%; transform: translateZ(7em); }
.pub-spark--b { left: 12%; bottom: 8%; width: .6em; height: .6em; background: var(--mf-ink); box-shadow: none; transform: translateZ(2em); }
.pub-spark--c { left: 10%; bottom: 14%; transform: translateZ(4em); }
.pub-spark--d { right: 18%; bottom: 30%; width: .6em; height: .6em; background: var(--mf-coral); transform: translateZ(9em); }

@media (prefers-reduced-motion: no-preference) {

    .pub-decor {
        animation: pubDecorIn 1.6s var(--mf-ease) .45s backwards;
    }

    .pub-decor--right {
        animation-delay: .6s;
    }

    .pub-decor-float {
        animation: pubFloat 8s ease-in-out infinite alternate;
    }

    .pub-decor--right .pub-decor-float {
        animation-duration: 9.5s;
        animation-delay: -4s;
    }

    .pub-ring--inner i {
        animation: pubOrbit 9s linear infinite;
    }

    .pub-ring--inner i:nth-child(2) {
        animation-name: pubOrbitHalf;
    }

    .pub-ring--outer i {
        animation: pubOrbit 22s linear infinite reverse;
    }

    .pub-glass b {
        animation: pubBar 3.2s ease-in-out infinite alternate;
    }

    .pub-glass b:nth-child(2) { animation-delay: -.6s; }
    .pub-glass b:nth-child(3) { animation-delay: -1.3s; }
    .pub-glass b:nth-child(4) { animation-delay: -2s; }
    .pub-glass b:nth-child(5) { animation-delay: -2.6s; }

    .pub-slab {
        animation: pubLift 6s ease-in-out infinite alternate;
    }

    .pub-beam i {
        animation: pubRise 3.6s cubic-bezier(.3, 0, .6, 1) infinite;
    }

    .pub-beam i:nth-child(2) { animation-delay: -1.2s; }
    .pub-beam i:nth-child(3) { animation-delay: -2.4s; }

    .pub-cube {
        animation: pubCube 18s linear infinite;
    }

    .pub-halo {
        animation: pubHalo 14s linear infinite;
    }

    .pub-spark {
        animation: pubTwinkle 4.5s ease-in-out infinite alternate;
    }

    .pub-spark--b,
    .pub-spark--d {
        animation-delay: -2.2s;
    }

    .pub-hero-decor.is-paused * {
        animation-play-state: paused;
    }
}

@keyframes pubDecorIn {
    from {
        opacity: 0;
        translate: 0 2.4em;
    }
}

@keyframes pubFloat {
    to {
        translate: 0 -1.3em;
    }
}

@keyframes pubOrbit {
    to {
        rotate: 360deg;
    }
}

@keyframes pubOrbitHalf {
    from {
        rotate: 180deg;
    }

    to {
        rotate: 540deg;
    }
}

@keyframes pubBar {
    from {
        scale: 1 .72;
    }
}

@keyframes pubLift {
    to {
        translate: 0 0 calc(var(--z) * 4.6em);
    }
}

@keyframes pubRise {
    0% {
        opacity: 0;
        translate: 0 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        translate: 0 -13em;
    }
}

@keyframes pubCube {
    from {
        transform: translateZ(5em) rotateX(-24deg) rotateY(38deg);
    }

    to {
        transform: translateZ(5em) rotateX(-24deg) rotateY(398deg);
    }
}

@keyframes pubHalo {
    to {
        transform: translateZ(2em) rotateX(64deg) rotateY(-10deg) rotateZ(360deg);
    }
}

@keyframes pubTwinkle {
    to {
        opacity: .35;
        translate: 0 -.8em;
    }
}


/* =====================================================
   DEMO BADGE
===================================================== */

.pub-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px dashed rgba(217, 96, 12, .55);
    background: rgba(244, 123, 32, .08);
    color: var(--mf-orange-deep);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pub-demo-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.pub-demo-badge--dark {
    border-color: rgba(244, 123, 32, .6);
    background: rgba(244, 123, 32, .12);
    color: #ffb37a;
}


/* =====================================================
   TRAFFIC FLOW MAP
===================================================== */

.pub-flow {
    position: relative;
    margin-top: clamp(48px, 7vw, 84px);
    padding: clamp(20px, 3vw, 34px);
    border-radius: var(--mf-radius-xl);
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 40px 100px rgba(120, 60, 20, .14), inset 0 1px 0 #fff;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.pub-flow-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px 24px;
    margin-bottom: 28px;
}

.pub-flow-title {
    margin: 0;
    font-size: clamp(20px, 2vw, 26px);
    letter-spacing: -.035em;
}

.pub-flow-hint {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--mf-muted);
}

.pub-flow-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px clamp(28px, 5vw, 64px);
}

.pub-flow-links {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.pub-flow-links path {
    fill: none;
    stroke: rgba(17, 17, 17, .1);
    stroke-width: 1.5;
    transition: stroke .35s ease, stroke-width .35s ease;
}

.pub-flow-links path.is-active {
    stroke: var(--mf-orange);
    stroke-width: 2;
}

.pub-flow-col {
    position: relative;
    z-index: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pub-flow-stage {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    padding: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mf-ink-soft);
}

.pub-flow-stage b {
    color: var(--mf-orange-deep);
}

.pub-node-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pub-node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1.5px solid var(--mf-line);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--mf-ink);
    overflow-wrap: break-word;
    transition: opacity .35s ease, border-color .35s ease, background .35s ease, box-shadow .35s ease;
}

.pub-node small {
    order: 2;
    flex-shrink: 0;
    padding: 3px 7px;
    border-radius: 7px;
    background: var(--mf-surface-3);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--mf-muted);
}

.pub-node.is-active {
    border-color: rgba(244, 123, 32, .7);
    background: #fff7f0;
    box-shadow: 0 10px 26px rgba(244, 123, 32, .16);
}

.pub-node.is-active small {
    background: var(--mf-orange);
    color: #fff;
}

.pub-node.is-dim {
    opacity: .42;
}

/* source nodes are the radio controls */
.pub-node--source {
    cursor: pointer;
}

.pub-node--source input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pub-node--source:hover {
    border-color: var(--mf-line-strong);
}

.pub-node--source:has(input:checked) {
    border-color: var(--mf-ink);
    background: var(--mf-ink);
    color: #fff;
    box-shadow: 0 12px 28px rgba(17, 17, 17, .18);
    opacity: 1;
}

.pub-node--source:has(input:focus-visible) {
    outline: 2px solid var(--mf-orange);
    outline-offset: 3px;
}

.pub-node--outcome strong {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.pub-node--outcome span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: 1px;
}

.pub-node--outcome.is-approved span::before { background: var(--mf-orange); }
.pub-node--outcome.is-pending span::before { background: #b9b6bd; }
.pub-node--outcome.is-rejected span::before { background: #4a4749; }

.pub-flow-readout {
    min-height: 1.6em;
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--mf-line);
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--mf-ink-soft);
}

.pub-flow-readout b {
    color: var(--mf-orange-deep);
}


/* =====================================================
   TRAFFIC INTELLIGENCE (dark band)
===================================================== */

.pub-intel-section {
    padding-top: 0;
}

.pub-intel {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4.5vw, 64px);
    border-radius: var(--mf-radius-xl);
    color: #fff;
    background:
        radial-gradient(circle at 88% 0%, rgba(244, 123, 32, .22), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(255, 107, 79, .1), transparent 40%),
        linear-gradient(165deg, #171313, #0a0909 60%);
    box-shadow: var(--mf-shadow-dark);
}

.pub-intel-head {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px 48px;
    align-items: end;
    margin-bottom: 36px;
}

.pub-index-light {
    color: #ffb37a;
}

.pub-intel-lead {
    max-width: 560px;
    margin: 20px 0 0;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .72);
}

.pub-intel-note {
    margin: 0;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .72);
}

.pub-intel-note .pub-demo-badge {
    display: flex;
    width: max-content;
    margin-bottom: 10px;
}


/* ---------- controls ---------- */

.pub-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px 28px;
    margin-bottom: 26px;
}

.pub-segmented,
.pub-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.pub-control-label {
    width: 100%;
    margin-bottom: 8px;
    padding: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

.pub-segmented label,
.pub-chips label {
    position: relative;
    cursor: pointer;
}

.pub-segmented input,
.pub-chips input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pub-segmented span,
.pub-chips span {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .04);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .82);
    transition: background .3s ease, color .3s ease, border-color .3s ease;
}

.pub-segmented label:hover span,
.pub-chips label:hover span {
    border-color: rgba(255, 255, 255, .34);
}

.pub-segmented input:checked + span {
    background: #fff;
    border-color: #fff;
    color: var(--mf-ink);
}

.pub-chips input:checked + span {
    background: var(--mf-orange);
    border-color: var(--mf-orange);
    color: #fff;
}

.pub-segmented input:focus-visible + span,
.pub-chips input:focus-visible + span {
    outline: 2px solid #ffb37a;
    outline-offset: 3px;
}


/* ---------- KPIs ---------- */

.pub-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.pub-kpi {
    min-width: 0;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .04);
}

.pub-kpi--accent {
    border-color: rgba(244, 123, 32, .4);
    background: linear-gradient(160deg, rgba(244, 123, 32, .2), rgba(244, 123, 32, .04));
}

.pub-kpi-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}

.pub-kpi strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.pub-kpi-delta {
    display: inline-block;
    min-height: 1.4em;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, .62);
}

.pub-kpi-delta.is-up {
    color: #ffb37a;
}

.pub-kpi small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .5);
}


/* ---------- panels ---------- */

.pub-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 14px;
}

.pub-panel {
    min-width: 0;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .035);
}

.pub-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin-bottom: 18px;
}

.pub-panel-head h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.02em;
}

.pub-panel-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
}

.pub-panel-note {
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .55);
}


/* ---------- chart ---------- */

/* the chart grows to fill its panel next to the funnel */
.pub-panel--chart {
    display: flex;
    flex-direction: column;
}

.pub-chart {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pub-chart-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 190px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 100% 25%;
}

.pub-chart-bars li {
    flex: 1;
    min-width: 0;
    height: var(--h, 0%);
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(180deg, rgba(244, 123, 32, .95), rgba(244, 123, 32, .35));
    transition: height .55s var(--mf-ease), opacity .25s ease;
}

.pub-chart-bars li.is-hover {
    background: linear-gradient(180deg, #ffd0a8, #f47b20);
}

.pub-chart-bars.is-hovering li:not(.is-hover) {
    opacity: .5;
}

.pub-chart-readout {
    position: absolute;
    top: 6px;
    left: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .55);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.pub-chart-readout.is-visible {
    opacity: 1;
}

.pub-chart-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .5);
}


/* ---------- funnel ---------- */

.pub-funnel {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.pub-funnel li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    font-size: 13.5px;
}

.pub-funnel li span {
    color: rgba(255, 255, 255, .78);
}

.pub-funnel li strong {
    font-variant-numeric: tabular-nums;
}

.pub-funnel li i {
    grid-column: 1 / -1;
    display: block;
    height: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.pub-funnel li i::after {
    content: "";
    display: block;
    width: var(--w, 0%);
    min-width: 4px;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f47b20, #ff9b55);
    transition: width .55s var(--mf-ease);
}

.pub-funnel li em {
    grid-column: 1 / -1;
    margin-top: -2px;
    font-style: normal;
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
}


/* ---------- sources table ---------- */

.pub-table-wrap {
    margin: 0 -6px;
}

.pub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.pub-table th,
.pub-table td {
    padding: 12px 6px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.pub-table th:first-child,
.pub-table td:first-child {
    text-align: left;
}

.pub-table th {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
    white-space: nowrap;
}

.pub-table th button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.pub-table th button::after {
    content: "↕";
    opacity: .4;
}

.pub-table th[aria-sort="descending"] button,
.pub-table th[aria-sort="ascending"] button {
    color: #ffb37a;
}

.pub-table th[aria-sort="descending"] button::after {
    content: "↓";
    opacity: 1;
}

.pub-table th[aria-sort="ascending"] button::after {
    content: "↑";
    opacity: 1;
}

.pub-table th button:hover {
    color: #fff;
}

.pub-table th button:focus-visible {
    outline: 2px solid #ffb37a;
    outline-offset: 2px;
}

.pub-table td {
    color: rgba(255, 255, 255, .86);
}

.pub-table tr.is-selected td {
    color: #fff;
    background: rgba(244, 123, 32, .12);
}

.pub-table tr.is-selected td:first-child {
    box-shadow: inset 3px 0 0 var(--mf-orange);
}

.pub-table td:first-child {
    font-weight: 700;
    color: #fff;
}


/* ---------- status ---------- */

.pub-status-bar {
    display: flex;
    height: 14px;
    gap: 3px;
    border-radius: 8px;
    overflow: hidden;
}

.pub-status-bar span {
    width: var(--w, 33%);
    min-width: 3px;
    transition: width .55s var(--mf-ease);
}

.pub-status-bar .is-approved { background: var(--mf-orange); }
.pub-status-bar .is-pending { background: #b9b6bd; }
.pub-status-bar .is-rejected { background: #5a5658; }

.pub-status-legend {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.pub-status-legend li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, .82);
}

.pub-status-legend li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--c);
}

.pub-status-legend strong {
    font-variant-numeric: tabular-nums;
    color: #fff;
}


/* =====================================================
   PUBLISHER LOOP
===================================================== */

.pub-loop {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    counter-reset: none;
}

/* connecting rail behind the step icons */
.pub-loop::before {
    content: "";
    position: absolute;
    top: 66px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(244, 123, 32, .55) 0 10px, transparent 10px 18px);
}

.pub-loop-step {
    position: relative;
    min-width: 0;
    padding: 26px 24px 30px;
    border-radius: var(--mf-radius-lg);
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--mf-line);
    box-shadow: var(--mf-shadow-sm);
}

.pub-loop-step--earn {
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, .22), transparent 45%),
        linear-gradient(140deg, #f47b20, #e2572a);
    border-color: transparent;
    box-shadow: 0 30px 70px rgba(244, 123, 32, .28);
}

.pub-loop-num {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    color: var(--mf-orange-deep);
}

.pub-loop-step--earn .pub-loop-num {
    color: rgba(255, 255, 255, .85);
}

.pub-loop-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 14px 0 26px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(244, 123, 32, .5);
    color: var(--mf-orange-deep);
    font-size: 19px;
    font-weight: 800;
}

.pub-loop-step--earn .pub-loop-icon {
    border-color: #fff;
}

.pub-loop-step p {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--mf-muted);
}

.pub-loop-step--earn p {
    color: rgba(255, 255, 255, .9);
}

.pub-loop-repeat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 26px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--mf-ink-soft);
}

.pub-loop-repeat span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mf-ink);
    color: #fff;
}


/* =====================================================
   EARNING MODELS STRIP
===================================================== */

.pub-models-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px 48px;
    align-items: end;
    margin-bottom: 40px;
}

.pub-models-head .pg-lead {
    margin: 0;
}

.pub-models {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.pub-model {
    min-width: 0;
    padding: 22px 20px 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--mf-line);
    transition: transform .45s var(--mf-ease), box-shadow .45s ease, border-color .35s ease;
}

.pub-model:hover {
    transform: translateY(-5px);
    box-shadow: var(--mf-shadow);
    border-color: rgba(244, 123, 32, .35);
}

.pub-model b {
    display: inline-grid;
    place-items: center;
    min-width: 52px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--mf-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.pub-model span {
    display: block;
    margin-top: 16px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mf-faint);
}

.pub-model strong {
    display: block;
    margin-top: 6px;
    font-size: 17px;
    letter-spacing: -.02em;
}

.pub-model p {
    margin: 8px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--mf-muted);
}


/* =====================================================
   CLOSING: CHECKLIST + CTA
===================================================== */

.pub-closing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 18px;
    align-items: stretch;
}

.pub-checklist {
    min-width: 0;
    padding: clamp(26px, 4vw, 48px);
    border-radius: var(--mf-radius-xl);
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--mf-line);
}

.pub-checklist .pg-h3 {
    margin-top: 6px;
}

.pub-checklist ul {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.pub-checklist li {
    position: relative;
    padding: 14px 0 14px 38px;
    border-top: 1px solid var(--mf-line);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--mf-muted);
}

.pub-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 14px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(244, 123, 32, .12);
    color: var(--mf-orange-deep);
    font-size: 12px;
    font-weight: 900;
}

.pub-checklist li strong {
    display: block;
    margin-bottom: 2px;
    color: var(--mf-ink);
    font-size: 15.5px;
}

.pub-cta {
    --gx: 70%;
    --gy: 20%;
    position: relative;
    overflow: hidden;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px, 5vw, 64px);
    border-radius: var(--mf-radius-xl);
    color: #fff;
    background:
        radial-gradient(480px circle at var(--gx) var(--gy), rgba(244, 123, 32, .34), transparent 60%),
        linear-gradient(160deg, #1a1414, #080707);
    box-shadow: var(--mf-shadow-dark);
}

.pub-cta .pg-h2 {
    font-size: clamp(34px, 4.4vw, 62px);
}

.pub-cta p {
    max-width: 460px;
    margin: 20px 0 0;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .72);
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {

    .pub-models {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pub-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {

    /* flow map: stages stack, nodes wrap in rows */
    .pub-flow-map {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .pub-flow-col,
    .pub-node-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pub-flow-stage {
        width: 100%;
    }

    .pub-node {
        flex: 1 1 150px;
    }

    .pub-intel-head,
    .pub-models-head,
    .pub-dash-grid,
    .pub-closing {
        grid-template-columns: minmax(0, 1fr);
    }

    .pub-loop {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pub-loop::before {
        display: none;
    }
}

@media (max-width: 640px) {

    .pub-title {
        font-size: clamp(38px, 11.5vw, 56px);
    }

    .pub-flow {
        border-radius: var(--mf-radius-lg);
    }

    .pub-node {
        flex-basis: calc(50% - 5px);
        font-size: 13.5px;
    }

    .pub-node--offer,
    .pub-node--outcome {
        flex-basis: 100%;
    }

    .pub-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pub-kpi {
        padding: 16px;
    }

    .pub-panel {
        padding: 18px 16px;
    }

    .pub-chart-bars {
        min-height: 150px;
        gap: 2px;
    }

    .pub-loop,
    .pub-models {
        grid-template-columns: minmax(0, 1fr);
    }

    /* table → stacked rows with inline labels; the header
       row stays visible as sort chips */
    .pub-table thead {
        display: block;
    }

    .pub-table thead tr {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 0 12px;
    }

    .pub-table th {
        padding: 0;
        border: 0;
    }

    .pub-table th:first-child {
        display: none;
    }

    .pub-table th button {
        min-height: 40px;
        padding: 0 12px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 999px;
    }

    .pub-table,
    .pub-table tbody,
    .pub-table td {
        display: block;
        width: 100%;
    }

    .pub-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 12px;
        padding: 14px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .pub-table td {
        padding: 2px 0;
        border: 0;
        text-align: left;
    }

    .pub-table td:first-child {
        grid-column: 1 / -1;
        margin-bottom: 4px;
        font-size: 15px;
    }

    .pub-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, .5);
    }

    .pub-table tr.is-selected td:first-child {
        box-shadow: none;
    }

    .pub-table tr.is-selected {
        box-shadow: inset 3px 0 0 var(--mf-orange);
        background: rgba(244, 123, 32, .12);
    }

    .pub-table tr.is-selected td {
        background: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .pub-chart-bars li,
    .pub-funnel li i::after,
    .pub-status-bar span,
    .pub-node,
    .pub-flow-links path {
        transition: none;
    }

    .pub-model:hover {
        transform: none;
    }
}
