/* Native, data-aware adaptations of Animated Beam, Magic Card and Border Beam.
   SVG paths are decorative. Source status and market readings come from the report. */
:root[data-theme] .source-flow{position:relative;border:1px solid var(--ui-border);border-radius:16px;margin:24px 0;background:var(--ui-surface);box-shadow:0 12px 32px #13233c08;overflow:hidden;isolation:isolate}
:root[data-theme] .source-flow-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:24px 26px 0}
:root[data-theme] .source-flow-head .eyebrow{font-size:.6rem;color:var(--ui-blue);letter-spacing:.13em;margin-bottom:8px}
:root[data-theme] .source-flow-head h3{font-size:1.1rem;font-weight:550;letter-spacing:-.025em;color:var(--ui-text)}
:root[data-theme] .flow-period{border:1px solid var(--ui-border);padding:5px 10px;border-radius:6px;color:var(--ui-muted);font-size:.72rem;flex:none;font-variant-numeric:tabular-nums}
:root[data-theme] .flow-stage{position:relative;height:420px;background-image:radial-gradient(circle at 54% 50%,#2563eb13 0,transparent 34%),radial-gradient(var(--ui-border) .8px,transparent .8px);background-size:100% 100%,18px 18px;margin:10px 16px 0;isolation:isolate}
:root[data-theme] .flow-wires{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:-1;pointer-events:none}
:root[data-theme] .flow-mobile{display:none}
:root[data-theme] .flow-track{fill:none;stroke:var(--ui-border);stroke-width:1.5;stroke-linecap:round;stroke-dasharray:2 7;vector-effect:non-scaling-stroke}
:root[data-theme] .flow-signal{fill:none;stroke:#2563eb;stroke-width:2;stroke-linecap:round;stroke-dasharray:1 3;vector-effect:non-scaling-stroke;opacity:0;animation:source-packets 9s linear var(--flow-delay,0s) infinite;animation-play-state:paused}
:root[data-theme] .flow-signal.active{opacity:.75}
:root[data-theme] .flow-signal.cached{stroke:#ba862d;opacity:.65}
:root[data-theme] .source-flow.flow-visible .flow-signal.active{animation-play-state:running}
:root[data-theme] .flow-source{position:absolute;left:13%;top:var(--source-y);transform:translate(-50%,-50%);width:170px;min-height:58px;display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:10px;align-items:center;text-align:left;padding:9px 11px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:10px;box-shadow:0 4px 12px #0d122008;color:var(--ui-text);transition:border-color 160ms,box-shadow 160ms}
:root[data-theme] .publisher-icon{grid-row:span 2;display:grid;place-items:center;position:relative;width:38px;height:38px;border:1px solid #e8ecf3;border-radius:9px;background:#fff;box-shadow:0 2px 5px #10224209}
:root[data-theme] .publisher-icon img{width:26px;height:26px;object-fit:contain;border-radius:3px}
:root[data-theme] .publisher-icon i{position:absolute;right:-3px;bottom:-2px;width:9px;height:9px;background:#94a0b1;border:2px solid var(--ui-surface);border-radius:50%}
:root[data-theme] .is-active .publisher-icon i{background:#2563eb}
:root[data-theme] .is-cached .publisher-icon i{background:#ba862d}
:root[data-theme] .flow-source strong{font-size:.74rem;font-weight:600;line-height:1.4}
:root[data-theme] .flow-source small{font-size:.61rem;color:var(--ui-muted);line-height:1.5}
:root[data-theme] .flow-source.is-idle{border-style:dashed}
:root[data-theme] .flow-source[aria-expanded=true],:root[data-theme] .flow-source:hover{border-color:var(--ui-blue);box-shadow:0 4px 18px #2563eb15}
:root[data-theme] .flow-hub{position:absolute;left:54%;top:50%;transform:translate(-50%,-50%);width:150px;display:flex;flex-direction:column;align-items:center;background:none;color:var(--ui-text);border:0;padding:0;isolation:isolate}
:root[data-theme] .flow-hub-logo{position:relative;display:grid;place-items:center;width:94px;height:94px;background:#fff;border:1px solid #d9e4f7;border-radius:22px;box-shadow:0 0 0 7px #2563eb09,0 12px 24px #1b3c6620;transition:box-shadow 180ms,transform 180ms}
:root[data-theme] .flow-hub-logo img{width:76px;height:76px;object-fit:contain;border-radius:15px}
:root[data-theme] .flow-hub-halo{position:absolute;top:-23px;width:140px;height:140px;border:1px solid #2563eb1f;border-radius:50%;z-index:-1;box-shadow:0 0 0 18px #2563eb04}
:root[data-theme] .flow-hub strong{font-size:.85rem;font-weight:600;margin-top:13px}
:root[data-theme] .flow-hub small{font-size:.6rem;line-height:1.5;color:var(--ui-muted);margin-top:3px}
:root[data-theme] .flow-hub:hover .flow-hub-logo{box-shadow:0 0 0 8px #2563eb12,0 14px 30px #1b3c6628;transform:translateY(-2px)}
:root[data-theme] .flow-output{--flow-tone:var(--ui-muted);position:absolute;left:87%;top:var(--output-y);transform:translate(-50%,-50%);width:150px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:11px;box-shadow:0 5px 16px #1228420b;padding:13px;display:grid;grid-template-columns:25px 1fr;gap:5px 7px;align-items:center;color:var(--ui-text);text-align:left}
:root[data-theme] .flow-output.bullish{--flow-tone:#07875f;border-top:2px solid #07875f}
:root[data-theme] .flow-output.bearish{--flow-tone:#c64058;border-top:2px solid #c64058}
:root[data-theme] .flow-output.neutral{--flow-tone:#a87818;border-top:2px solid #a87818}
:root[data-theme="dark"] .flow-output.bullish{--flow-tone:#70dfb0}
:root[data-theme="dark"] .flow-output.bearish{--flow-tone:#ff9fad}
:root[data-theme="dark"] .flow-output.neutral{--flow-tone:#edc376}
:root[data-theme] .flow-output strong{font-size:.85rem;display:flex;align-items:center;justify-content:space-between;gap:6px}
:root[data-theme] .flow-output b{color:var(--flow-tone);font-size:1.2rem;font-weight:550}
:root[data-theme] .flow-market-icon{display:grid;place-items:center;color:var(--flow-tone)}
:root[data-theme] .flow-market-icon svg{width:19px;height:19px}
:root[data-theme] .flow-output small{grid-column:1/-1;color:var(--flow-tone);font-size:.62rem;line-height:1.5}
:root[data-theme] .flow-output:hover{box-shadow:0 6px 22px #2563eb1a;border-color:var(--ui-blue)}
:root[data-theme] .flow-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 24px;background:var(--ui-subtle);border-top:1px solid var(--ui-border);color:var(--ui-muted)}
:root[data-theme] .flow-caption>span{display:flex;align-items:center;gap:8px;font-size:.67rem}
:root[data-theme] .flow-caption i{height:5px;width:5px;border-radius:50%;background:#2563eb;flex:none}
:root[data-theme] .flow-caption small{font-size:.6rem;max-width:240px;line-height:1.6}
:root[data-theme] .flow-detail{border-top:1px solid var(--ui-border);padding:22px 24px;background:var(--ui-surface);animation:flow-reveal 180ms ease-out}
:root[data-theme] .flow-detail h4{margin:0 0 10px;font-size:.9rem}
:root[data-theme] .flow-detail h4 span{font-weight:400;color:var(--ui-muted);margin-left:8px;font-size:.72rem}
:root[data-theme] .flow-detail p{font-size:.8rem;color:var(--ui-muted);line-height:1.75}
:root[data-theme] .flow-detail>small{display:block;font-size:.7rem;color:var(--ui-muted);margin-top:10px}
:root[data-theme] .flow-detail ul{list-style:none;padding:0;margin:15px 0 0}
:root[data-theme] .flow-detail li+li{border-top:1px solid var(--ui-border)}
:root[data-theme] .flow-detail a{display:block;padding:12px 0;color:var(--ui-blue);font-size:.8rem;line-height:1.6}
:root[data-theme] .flow-detail a:hover{text-decoration:underline;text-underline-offset:3px}
/* Card depth reacts to deliberate hovering, without changing document layout. */
:root[data-theme] :is(.module-card,.analysis-card,.study-card,.practice-tile,.continue-card){position:relative;isolation:isolate;transition:box-shadow 200ms,border-color 200ms}
:root[data-theme] :is(.module-card,.analysis-card,.study-card,.practice-tile):after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(280px circle at var(--spot-x,50%) var(--spot-y,50%),#2563eb12,transparent 75%);opacity:0;transition:opacity 180ms;z-index:2}
:root[data-theme] .continue-card{box-shadow:0 7px 24px #12254308;border-color:#2563eb35;background:linear-gradient(115deg,var(--ui-surface) 70%,var(--ui-bluewash))}
:root[data-theme] .continue-card:after{content:'';position:absolute;inset:-1px;border-radius:inherit;border:1px solid transparent;pointer-events:none;background:linear-gradient(110deg,transparent 28%,#2563eb 49%,#95baff 51%,transparent 72%) border-box;background-size:300% 100%;mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);mask-composite:exclude;animation:edge-light 4s ease-in-out 2;opacity:.8}
:root[data-theme] .source-flow-head{background:linear-gradient(125deg,transparent,var(--ui-bluewash))}
@media(hover:hover) and (pointer:fine){
 :root[data-theme] :is(.module-card,.analysis-card,.study-card,.practice-tile):hover{box-shadow:0 8px 26px #132c5015;border-color:#7da4f3;transform:translateY(-2px)}
 :root[data-theme] :is(.module-card,.analysis-card,.study-card,.practice-tile):hover:after{opacity:1}
 :root[data-theme] .nav a:hover svg{transform:translateY(-1px);transition:transform 180ms}
}
@keyframes source-packets{to{stroke-dashoffset:-100}}
@keyframes edge-light{0%{background-position:130% 0}100%{background-position:-30% 0}}
@keyframes flow-reveal{from{opacity:.5;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media(max-width:1100px){:root[data-theme] .flow-source{width:138px;grid-template-columns:30px 1fr;padding:9px 8px;column-gap:7px}:root[data-theme] .publisher-icon{width:29px;height:29px}:root[data-theme] .publisher-icon img{width:22px;height:22px}:root[data-theme] .flow-source strong{font-size:.68rem}:root[data-theme] .flow-output{width:125px}}
@media(max-width:1100px){
 :root[data-theme] .source-flow-head{padding:20px 18px 8px;gap:10px}
 :root[data-theme] .source-flow-head h3{font-size:.95rem}
 :root[data-theme] .flow-stage{height:570px;margin:0 8px;background-position:center;background-size:100% 100%,16px 16px}
 :root[data-theme] .flow-desktop{display:none}
 :root[data-theme] .flow-mobile{display:block}
 :root[data-theme] .flow-source{top:var(--source-mobile-y);left:var(--source-x);width:29%;padding:9px 3px;display:flex;flex-direction:column;gap:5px;min-height:98px;justify-content:start;text-align:center;border-radius:8px}
 :root[data-theme] .publisher-icon{width:31px;height:31px;flex:none}
 :root[data-theme] .publisher-icon img{width:24px;height:24px}
 :root[data-theme] .flow-source strong{font-size:.64rem;line-height:1.35}
 :root[data-theme] .flow-source small{font-size:.6rem;line-height:1.45}
 :root[data-theme] .flow-hub{left:50%;top:59.6491%;width:150px}
 :root[data-theme] .flow-hub-logo{width:78px;height:78px;border-radius:17px}
 :root[data-theme] .flow-hub-logo img{width:64px;height:64px}
 :root[data-theme] .flow-hub-halo{width:124px;height:124px}
 :root[data-theme] .flow-hub strong{margin-top:10px}
 :root[data-theme] .flow-output{left:var(--output-x);top:89.4737%;width:42%;max-width:160px;padding:10px}
 :root[data-theme] .flow-caption{padding:14px 18px;align-items:start;flex-direction:column;gap:7px}
 :root[data-theme] .flow-caption small{max-width:none}
 :root[data-theme] .flow-detail{padding:20px 18px}
}
@media(prefers-reduced-motion:reduce){:root[data-theme] .flow-signal,:root[data-theme] .continue-card:after,:root[data-theme] .flow-detail{animation:none!important}:root[data-theme] :is(.module-card,.analysis-card,.study-card,.practice-tile):after{display:none}:root[data-theme] :is(.module-card,.analysis-card,.study-card,.practice-tile):hover{transform:none}:root[data-theme] .flow-hub:hover .flow-hub-logo{transform:none}:root[data-theme] .nav a:hover svg{transform:none}}
