/* Agencies V2 · package v3 (approved by Nikolina, Nov 19 2026): new header (lying bear, tall lens, card) + Ivan's scenes in our windows.
   Load in <head>, after the page CSS. Markup is in the HTML; no script builds anything. */

/* ============ 1 · HEADER ============ */
.agp,body{background:#FAF9FE!important}
.agh{overflow:clip!important;background:#cacdfe}
/* stacking: glow 1 · grain, grain2, fade 2 · copy, picture, lens 3 · card 4 */
.agh-glow{position:absolute;left:0;right:0;top:435px;height:465px;pointer-events:none;z-index:1;
  background:radial-gradient(60% 55% at 62% 62%,rgba(238,206,246,.75) 0%,rgba(226,214,252,.45) 40%,rgba(255,255,255,0) 75%),radial-gradient(40% 45% at 20% 70%,rgba(214,222,255,.5) 0%,rgba(255,255,255,0) 70%)}
.agh-grain{z-index:2!important}
.agh-grain2{position:absolute;inset:0;pointer-events:none;z-index:2;background:url(/img/ag/agencies-header-grain.png) 0 0/256px 256px;opacity:1}
.agh-grain,.agh-grain2,.agh-glow{-webkit-mask-image:linear-gradient(#000 0,#000 640px,transparent 880px);mask-image:linear-gradient(#000 0,#000 640px,transparent 880px)}
.agh-fade{z-index:2!important;top:600px!important;bottom:auto!important;height:300px!important;
  background:linear-gradient(180deg,rgba(250,249,254,0) 0%,rgba(250,249,254,.18) 22%,rgba(250,249,254,.5) 48%,rgba(250,249,254,.82) 72%,#FAF9FE 92%)!important}
.agh-inner{position:relative;z-index:3!important}

/* the lens: all geometry in cqw of the lens width, so the sharp bear fills the frame exactly at every width */
.agh-vis{aspect-ratio:440/540;padding:0!important;border-width:0!important;background:none!important}
/* the sharp picture lives inside the lens, which is the cqw container: the frost stays behind the copy */
.agh-lens{position:absolute;inset:0;width:100%!important;height:100%!important;left:0!important;top:0!important;border-radius:28px;z-index:3;background:none!important;border:0!important;container-type:inline-size;outline:1px solid #ffffffe6;outline-offset:-1px}
.agh-clear{position:absolute!important;display:block!important;visibility:visible!important;opacity:1!important;z-index:3;left:-100cqw!important;top:-30.364cqw!important;width:274.30cqw!important;height:182.86cqw!important;max-width:none!important;transition:none!important;clip-path:inset(16.605% 27.085% 16.282% 36.456% round 28px)!important}
.agh-logo{position:absolute;z-index:5;top:16px!important;left:16px!important;width:28px!important;height:28px!important}
.agh-frost{z-index:-2}
@media (min-width:1200px){
  .agh-vis{width:440px!important;height:540px!important;top:195px!important;left:auto!important;right:calc((100% - 1200px)/2 + 110px)!important}
  .agh-frost{left:-1634px!important;top:-1820px!important;width:3336px!important;height:3723px!important}
}
@media (max-width:1199.98px){
  .agh{height:auto}
  .agh-inner{width:calc(100% - 48px);padding:150px 0 0}
  .agh .agh-copy .agh-lede{max-width:none}
  .agh-vis{position:relative!important;top:auto!important;right:auto!important;left:auto!important;width:min(440px,calc(100% - 32px))!important;height:auto!important;margin:56px auto 0!important}
  .agh-frost{display:none!important}
  .agh:after{content:"";height:120px;display:block}
  .agh-fade{top:auto!important;bottom:0!important;height:300px!important}
  .agh-grain,.agh-grain2,.agh-glow{-webkit-mask-image:linear-gradient(#000 0,#000 calc(100% - 260px),transparent calc(100% - 20px));mask-image:linear-gradient(#000 0,#000 calc(100% - 260px),transparent calc(100% - 20px))}
  .agh-glow{top:auto;bottom:0;height:70%}
}
@media (max-width:639px){.agh-inner{width:calc(100% - 40px);padding-top:128px}.agh-vis{margin-top:48px!important}}

/* the content card on the bear's chest (replaces the kanban board) */
.agh-card{position:absolute;left:16px;right:16px;top:262px;z-index:4;background:#fff;border-radius:18px;padding:14px 16px 13px;box-shadow:0 10px 28px rgba(70,50,140,.14);font-family:Inter,system-ui,sans-serif;color:#1E1A33}
.agh-card .h{display:flex;align-items:center;gap:10px}
.agh-card .av{width:30px;height:30px;border-radius:50%;background:#3B3430;color:#fff;font:600 11px/30px Inter,sans-serif;text-align:center;flex:none}
.agh-card .t{font:600 13.5px/1.25 Inter,sans-serif}
.agh-card .st{font:400 11.5px/1.3 Inter,sans-serif;color:#5E5874}
.agh-card .tag{margin-left:auto;font:500 11px/1 Inter,sans-serif;color:#4A3A9A;background:#EFEAFC;border-radius:999px;padding:6px 10px;white-space:nowrap}
.agh-card .steps{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:12px}
.agh-card .sp{font:500 11.5px/1 Inter,sans-serif;text-align:center;padding:8px 4px;border-radius:10px;background:#F5F2FA;color:#3A3456;white-space:nowrap}
.agh-card .sp.ok{background:#EFEAFC;color:#4A3A9A}
.agh-card .sp.ok::before{content:"\2713\00a0";font-weight:700}
.agh-card .sp.rv{background:#fff;box-shadow:inset 0 0 0 1.5px #B9A9F2;color:#2B2252}
.agh-card .ft{display:flex;align-items:center;gap:7px;margin-top:11px;font:400 11.5px/1.3 Inter,sans-serif;color:#5E5874}
.agh-card .ft i{width:7px;height:7px;border-radius:50%;background:#8E74E8;flex:none}
@media (max-width:1199.98px){.agh-card{top:auto;bottom:16px}}
@media (max-width:520px){.agh-card{padding:12px 12px 11px}.agh-card .steps{grid-template-columns:repeat(2,1fr)}.agh-card .tag{display:none}.agh-card .ft{font-size:11px}}

/* ============ 2 · MODULES: 595 x 446 frames, our white 512 x 381 windows ============ */
@media (min-width:1200px){
  .ag-sec .pg-split{grid-template-columns:541px 595px!important;column-gap:64px!important;gap:64px!important;width:1200px;max-width:1200px;margin:0 auto}
  #deliver .pg-split.ag-tabs,#ag5 .pg-split,#ag-acc.pg-split{grid-template-columns:595px 541px!important}
  #deliver .pg-split.ag-tabs{align-items:start}
}
.ag-sec .mc.mkx{width:100%!important;max-width:595px!important;height:auto!important;aspect-ratio:595/446!important;min-height:0!important;container-type:inline-size}
@media (max-width:1199.98px){.ag-sec .mc.mkx,.ag-sec .st-mcard{margin-left:auto!important;margin-right:auto!important}.ag-sec .st-mcard{width:100%!important;max-width:595px!important}}
@media (min-width:1200px){.ag-sec .st-mcard{width:595px!important;max-width:595px!important}}
.ag-sec .mc.mkx>canvas{width:100%!important;height:100%!important}
/* frames are 595 wide from 720 px up, so the window is never scaled; below that the phone layout takes over */
.mkx-win{position:absolute;left:50%;top:50%;width:512px;height:381px;transform:translate(-50%,-50%);
  background:#fff;border-radius:22px;overflow:hidden;z-index:5;container-type:size}
.mkx-win .cpa__panel{position:absolute!important;inset:0!important;width:auto!important;height:auto!important;opacity:0;visibility:hidden;transition:opacity .45s ease,visibility 0s linear .45s}
.mkx-win .cpa__panel.on,.mkx-win .cpa__panel.is-active{opacity:1;visibility:visible;transition:opacity .45s ease,visibility 0s}
.mkx-still .mkx-win .cpa__panel{opacity:1;visibility:visible}
@media (prefers-reduced-motion:reduce){.mkx-win .cpa__panel,.mkx-win .cpa__panel.on{transition:none}}
.mkx-win .cpa__panel>.cpa__ill{position:absolute!important;inset:0!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
.mkx-win .agq-w{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important}
.mkx-win .agq-sq-scene{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;border-radius:0!important;box-shadow:none!important;aspect-ratio:auto!important;padding:0!important;background:#fff!important}
.mkx-win .agq-sq-scene::before,.mkx-win .agq-sq-scene::after{display:none}
/* Ivan's inner card fills our window: no second card, no shadow, no rounded inner edge */
.mkx-win .agq-sq-scene>.agq-sq-wbx{position:absolute!important;inset:0!important;width:auto!important;height:auto!important;max-width:none!important;margin:0!important;border-radius:0!important;box-shadow:none!important;border:0!important;transform:none!important;padding:22px 24px!important;background:#fff!important}
.mkx-win .agq-sq-scene>.agq-editorial,.mkx-win .agq-sq-scene>.agq-client-site{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;border-radius:0!important;box-shadow:none!important;border:0!important;transform:none!important}
/* hidden: Ivan's buttons, fictional-example lines, the social draft label */
.mkx-win [data-pause],.mkx-win [data-replay],.mkx-win .agq-controls,.mkx-win .agq-fiction,.mkx-win .agq-draft-label{display:none!important}
.mkx-win [data-k=collaboration] .agq-user-choice,.mkx-win [data-k=collaboration] button{pointer-events:none}
/* module 3: no description lines in the workspace, projects and roles boxes; no note under the usage meter */
.mkx-win [data-k=workspace] .agq-sq-wbx-rev>p,.mkx-win [data-k=projects] .agq-sq-wbx-rev>p,.mkx-win [data-k=roles] .agq-sq-wbx-rev>p,.mkx-win [data-k=usage] .agq-usage>small{display:none!important}
/* module 6: chart in Agencies tokens; source line hidden (it touched the window edge) */
.mkx-win .agq-bars>div>i{background:#E9DFF8!important}
.mkx-win .agq-bars>div:last-child>i{background:linear-gradient(180deg,#D8AED3 0%,#7E9CE3 100%)!important}
.mkx-win [data-k=results] .agq-source{display:none!important}
/* Social & advertising: the ad as a 300 px card on a soft panel, no animation */
.mkx-win .agq-sq-scene[data-key=social]::before{content:"";display:block;position:absolute;inset:14px;border-radius:16px;background:#F5F2FA}
.mkx-win .agq-sq-scene[data-key=social]>.agq-social-post{position:absolute!important;top:50%!important;left:50%!important;bottom:auto!important;width:300px!important;height:auto!important;max-height:calc(100% - 40px);margin:0!important;transform:translate(-50%,-50%)!important;
  border-radius:14px!important;border:1px solid #E6E0F0!important;box-shadow:0 10px 28px rgba(60,40,110,.10)!important;background:#fff!important;animation:none!important;z-index:1;overflow:hidden}
.mkx-win .agq-sq-scene[data-key=social]>.agq-social-post img{height:132px!important;width:100%;object-fit:cover}
/* contrast 4.5:1 and nothing under 10 px */
.mkx-win .agq-sq-av-small,.mkx-win .agq-sq-av-tag,.mkx-win .agq-sq-sxx-ba>small,.mkx-win .agq-source,.mkx-win .agq-metrics-top>div>small,.mkx-win .agq-workspace-brand>div>small,.mkx-win .agq-project-tabs>span,.mkx-win .agq-usage>small,.mkx-win .agq-user>small,.mkx-win .agq-assistant>div>small,.mkx-win .agq-chat-artifact>div>small,.mkx-win .agq-chat-artifact>div>small>span,.mkx-win .agq-composer>span,.mkx-win .agq-composer>span>b{color:#5F6584!important}
.mkx-win .agq-editorial>header>span,.mkx-win .agq-editorial-body>small,.mkx-win .agq-editorial-body>footer,.mkx-win .agq-site-body>div>small,.mkx-win .agq-social-post>header>div>small,.mkx-win .agq-social-cta>div>small{color:#5E6660!important}
.mkx-win .agq-editorial>header>span{font-size:10.5px!important}

/* round 30 px corner button: only where something moves (modules 1 and 3) */
.mc .mk-rb{position:absolute;right:12px;bottom:12px;width:30px;height:30px;border:0;border-radius:50%;padding:0;z-index:20;cursor:pointer;
  background:#ffffffe0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23252943' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 8v8M14.5 8v8'/%3E%3C/svg%3E") 50%/14px 14px no-repeat;box-shadow:0 2px 8px #1d3f5a26}
.mc .mk-rb:hover{background-color:#fff}
.mc .mk-rb[data-s=paused]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23252943' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 7.8 16.3 12l-6.8 4.2z'/%3E%3C/svg%3E")}
.mc .mk-rb[data-s=done]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23252943' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12a7 7 0 1 0 2.1-5'/%3E%3Cpath d='M5 5v4h4'/%3E%3C/svg%3E")}
.mc .mk-rb:focus-visible{outline:2px solid #1e2047;outline-offset:2px}
@media (prefers-reduced-motion:reduce){.mc .mk-rb{display:none}}
.mc.mkx-still .mc-pause{display:none!important}

/* ============ 3 · PHONES and small tablets (<720 px): never a window scaled as one picture ============ */
@media (max-width:719.98px){
  .ag-sec .mc.mkx{aspect-ratio:auto!important;height:calc(var(--mwh,420px) + 28px)!important}
  .ag-sec .mc.mkx:has(>.mk-rb){height:calc(var(--mwh,420px) + 66px)!important}
  .ag-sec .st-sec #go-card,.st-sec #go-card.mkx,.st-sec #ac-card.mkx{height:calc(var(--mwh,420px) + 66px)!important}
  .mkx-win{left:14px;right:14px;top:14px;width:auto;height:var(--mwh,420px);transform:none!important}
  .mkx-win .agq-sq-scene>.agq-sq-wbx{padding:16px!important}
  .mkx-win .agq-sq-scene[data-key=social]>.agq-social-post{width:calc(100% - 44px)!important;max-width:300px}
  .mkx-win .agq-sq-av-li:nth-of-type(n+5){display:none!important}
}

/* grain, glow and fade are direct children of the header section, positioned against the full header */
.agh>.agh-grain,.agh>.agh-grain2{position:absolute;inset:0}

/* ============ 4 · CLOSING (v5): fade from the page tint #FAF9FE, never from white, so no line where the page meets the end ============ */
.ag-end.mk-end{background:#FAF9FE!important}
.ag-end .mk-end-fade{background:linear-gradient(#FAF9FE 8%,rgba(250,249,254,.996) 16.7%,rgba(250,249,254,.976) 25%,rgba(250,249,254,.914) 33.3%,rgba(250,249,254,.796) 41.7%,rgba(250,249,254,.635) 50%,rgba(250,249,254,.463) 58.3%,rgba(250,249,254,.294) 66.7%,rgba(250,249,254,.157) 75%,rgba(250,249,254,.059) 83.3%,rgba(250,249,254,.008) 91.7%,rgba(250,249,254,0) 100%)!important}
