/* Anderson motion kit — shared by Anderson's Analysis and Anderson's Office.
   Boot intro, POS-style rise-in, counting numbers, a Dynamic Island and the training-app look. */
:root{--am-ease:cubic-bezier(.2,.8,.2,1);--am-rainbow:linear-gradient(90deg,#3f86d9,#8a55c9 30%,#d9457a 55%,#ee7a2f 80%,#e9b23a)}

/* POS-style rise: cards float up one after another */
.am-rise{animation:amRise .56s var(--am-ease) both;animation-delay:var(--am-d,0s)}
@keyframes amRise{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
.am-num{font-variant-numeric:tabular-nums}

/* Progress bars grow from the left, then a soft shine passes once */
.am-grow{position:relative;animation:amGrow 1.1s cubic-bezier(.22,.9,.24,1) both;animation-delay:var(--am-bd,0s)}
@keyframes amGrow{from{clip-path:inset(0 100% 0 0 round 99px)}to{clip-path:inset(0 0 0 0 round 99px)}}
.am-grow::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-100%);animation:amShine .9s ease-out both;animation-delay:calc(var(--am-bd,0s) + .9s);pointer-events:none}
@keyframes amShine{to{transform:translateX(100%)}}

/* Boot: the POS login intro — logo, then the name, then the whole page turns DE blue */
#am-boot{position:fixed;inset:0;z-index:2147483646;display:grid;place-items:center;background:#fff;color:#0b0b0d;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;transition:opacity .5s cubic-bezier(.4,0,.2,1)}
#am-boot.play{animation:amBg 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
#am-boot.done{opacity:0;pointer-events:none}
#am-boot .am-stage{display:grid;justify-items:center;text-align:center}
#am-boot .am-logo{display:block;width:128px;height:128px;opacity:0;transform:scale(.82);filter:blur(8px) drop-shadow(0 24px 46px rgba(0,0,0,.16))}
/* as the page turns blue the logo's shadow fades too, so the square disappears into the background */
#am-boot.play .am-logo{animation:amLogo .7s cubic-bezier(.16,1,.3,1) .1s both,amFlat 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
@keyframes amFlat{from{filter:blur(0) drop-shadow(0 24px 46px rgba(0,0,0,.16))}to{filter:blur(0) drop-shadow(0 24px 46px rgba(0,0,0,0))}}
#am-boot .am-word{margin-top:28px;font-family:"Avenir Next","Avenir","Helvetica Neue",Arial,sans-serif;font-size:21px;letter-spacing:-.03em;white-space:nowrap;opacity:0;transform:translateY(12px);filter:blur(5px)}
#am-boot .am-n{font-weight:700;color:#0b0b0d}
#am-boot .am-s{font-weight:400;color:#8e8e93}
#am-boot.play .am-word{animation:amWord .6s cubic-bezier(.22,1,.36,1) .85s both}
#am-boot.play .am-n{animation:amTone 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
#am-boot.play .am-s{animation:amSTone 1.3s cubic-bezier(.4,0,.2,1) 1.75s both}
#am-boot.still .am-logo,#am-boot.still .am-word{opacity:1;transform:none;filter:none}
#am-boot .am-skip{position:absolute;right:22px;top:22px;padding:9px 13px;border:0;border-radius:999px;background:rgba(127,127,127,.14);color:rgba(127,127,127,.9);font-family:inherit;font-size:10px;font-weight:700;line-height:1;letter-spacing:.08em;cursor:pointer}
@keyframes amBg{from{background:#fff}to{background:#19297a}}
@keyframes amLogo{from{opacity:0;transform:scale(.82);filter:blur(8px) drop-shadow(0 24px 46px rgba(0,0,0,.16))}to{opacity:1;transform:scale(1);filter:blur(0) drop-shadow(0 24px 46px rgba(0,0,0,.16))}}
@keyframes amWord{from{opacity:0;transform:translateY(12px);filter:blur(5px)}to{opacity:1;transform:none;filter:blur(0)}}
@keyframes amTone{from{color:#0b0b0d}to{color:#fff}}
@keyframes amSTone{from{color:#8e8e93}to{color:rgba(255,255,255,.62)}}

/* Dynamic Island */
#am-island{position:fixed;left:50%;top:calc(10px + env(safe-area-inset-top));z-index:2147483000;display:flex;align-items:center;gap:9px;height:36px;padding:0 16px 0 6px;border-radius:999px;background:#0b0b0d;color:#fff;font:600 13px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC",sans-serif;letter-spacing:-.01em;white-space:nowrap;box-shadow:0 10px 30px rgba(0,0,0,.22);pointer-events:none;opacity:0;transform:translateX(-50%) scale(.55);transition:transform .55s cubic-bezier(.3,1.45,.5,1),opacity .25s ease}
#am-island.on{opacity:1;transform:translateX(-50%) scale(1)}
#am-island .am-dot{flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#1f1f23;overflow:hidden}
#am-island .am-dot img{width:17px;height:17px;border-radius:5px}
#am-island small{font-weight:500;color:rgba(255,255,255,.55)}

/* Page switch: the new page floats in */
.am-swap{animation:amSwap .45s var(--am-ease) both}
@keyframes amSwap{from{opacity:0;transform:translateY(10px)}}

.am-rainbow{background:var(--am-rainbow);-webkit-background-clip:text;background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent}

/* ---------- Anderson's Analysis: training-app look ---------- */
html:has(body.am-analysis),html:has(body.am-office){background:#fff}
body.am-analysis{--bg:#fff;--navy:#1d1d1f;--line:#ececf0;--shadow:0 8px 28px rgba(0,0,0,.05);background:#fff}
body.am-analysis .card,body.am-analysis .panel,body.am-analysis .person-card,body.am-analysis .analysis-card,body.am-analysis .compare-card,body.am-analysis .source-board,body.am-analysis .mini,body.am-analysis .overview-store-total,body.am-analysis .focus{border-color:#ececf0;border-radius:20px;box-shadow:0 8px 28px rgba(0,0,0,.045)}
body.am-analysis .overview-total-group,body.am-analysis .analysis-hero{background:linear-gradient(145deg,#0b0b0d,#2c2c31);box-shadow:0 14px 34px rgba(0,0,0,.16)}
body.am-analysis .brand h1,body.am-analysis .page .title{background:var(--am-rainbow);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;width:max-content;max-width:100%}
body.am-analysis .logo{border-color:#1d1d1f}
body.am-analysis .seg button.active,body.am-analysis .navbtn.active{color:#1d1d1f}
body.am-analysis .navbtn.active{background:#f2f2f4}
body.am-analysis .btn.soft{background:#f2f2f4;color:#1d1d1f;border-color:#ececf0}
body.am-analysis .bottomnav{border-radius:24px;box-shadow:0 14px 40px rgba(0,0,0,.14)}
body.am-analysis .navbtn{transition:transform .2s var(--am-ease),background .2s}
body.am-analysis .navbtn:active{transform:scale(.94)}

/* ---------- Anderson's Office: training-app look ---------- */
body.am-office{--bg:#fff;--line:#ececf0;--navy:#1d1d1f;--ink:#1d1d1f;background:#fff;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Helvetica Neue",Arial,sans-serif}
body.am-office .kpi,body.am-office .panel,body.am-office .expenseBill{border-color:#ececf0;border-radius:20px;box-shadow:0 8px 28px rgba(0,0,0,.045)}
body.am-office .kpi.net{background:linear-gradient(145deg,#0b0b0d,#2c2c31);border-color:#0b0b0d;box-shadow:0 14px 34px rgba(0,0,0,.16)}
body.am-office .kpi.net label,body.am-office .kpi.net p{color:rgba(255,255,255,.62)}
body.am-office .top h1,body.am-office .overviewIntro h2,body.am-office header .brand b{background:var(--am-rainbow);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;width:max-content;max-width:100%}
body.am-office .primary{background:#1d1d1f}
body.am-office .primary:hover{background:#3a3a3c}
body.am-office nav{background:rgba(242,242,244,.92);border-radius:14px}
body.am-office nav button{transition:transform .2s var(--am-ease),background .2s}
body.am-office nav button:active{transform:scale(.95)}
body.am-office nav button.active{box-shadow:0 2px 10px rgba(0,0,0,.08)}
body.am-office .actions{box-shadow:0 8px 28px rgba(0,0,0,.045)}
/* Cash Out: three quiet tones by share — under 10% calm green, 10–20% amber, 20% and up soft red */
body.am-office [data-am-level] .spendTrack>span,body.am-office [data-am-level] .shareTrack i{transition:background .4s ease}
body.am-office [data-am-level=low] .spendTrack>span,body.am-office [data-am-level=low] .shareTrack i{background:#3f8f6f}
body.am-office [data-am-level=mid] .spendTrack>span,body.am-office [data-am-level=mid] .shareTrack i{background:#d4a043}
body.am-office [data-am-level=high] .spendTrack>span,body.am-office [data-am-level=high] .shareTrack i{background:#d0654f}
body.am-office [data-am-level=low] .spendLine strong,body.am-office [data-am-level=low] .shareMain strong{color:#3f8f6f}
body.am-office [data-am-level=mid] .spendLine strong,body.am-office [data-am-level=mid] .shareMain strong{color:#b8862e}
body.am-office [data-am-level=high] .spendLine strong,body.am-office [data-am-level=high] .shareMain strong{color:#c4573f}

@media (prefers-reduced-motion:reduce){.am-rise,.am-swap,.am-grow{animation:none!important}}
@media print{#am-island,#am-boot{display:none!important}}