/* =============================================================================
static/dash/account_algo_trading_agents.css
ART ARGENTUM — ALGORITHMIC TRADING BUILDER UI
Production stylesheet.

Ownership:
- Build New engine cards and empty Overview engine cards
- Algorithmic builder shell and Hard Settings
- Builder Chat / Strategy / Backtest / Optimization workspace
- Cluster editor and source-context presentation

No append-only hotfix chain: each visual state has one canonical owner.
============================================================================= */

.aa-agent-build-router,
.aa-agent-build-mode-panel,
.algoagent{
  width:100%;
  min-width:0;
}

.aa-agent-engine-router{
  width:min(1180px,100%);
  margin:0 auto;
  padding:0 0 34px;
  color:rgba(255,255,255,.92);
}

/* Build New has no separate intro header. */
.aa-agent-engine-router__header{
  display:none!important;
}

.aa-agent-engine-router__grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

/*
  Creator card layer contract:
  0 — engine artwork (50% opacity)
  1 — black translucent glass
  2 — copy and controls
*/
.aa-agent-engine-choice{
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  min-height:570px;
  font-family:var(--ui-font,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);
  padding:28px 28px 26px;
  overflow:hidden;
  border:0;
  border-radius:0;
  outline:0;
  background:rgba(2,3,4,.94);
  box-shadow:
    0 28px 78px rgba(0,0,0,.52),
    inset 0 1px 0 rgba(255,255,255,.035);
  color:inherit;
  text-decoration:none!important;
  transform:translateZ(0);
  transition:transform .18s ease,box-shadow .18s ease;
}

.aa-agent-engine-choice::before{
  content:"";
  position:absolute;
  z-index:0;
  inset:0;
  pointer-events:none;
  background-position:center 34px;
  background-repeat:no-repeat;
  background-size:auto 430px;
  opacity:.50;
}

.aa-agent-engine-choice--llm::before{
  background-image:url("/static/img/llmtrading.png");
}

.aa-agent-engine-choice--algo::before{
  background-image:url("/static/img/algotrading.png");
}

.aa-agent-engine-choice::after{
  content:"";
  position:absolute;
  z-index:1;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(0,0,0,.72) 0%,rgba(0,0,0,.52) 56%,rgba(0,0,0,.38) 100%),
    rgba(0,0,0,.16);
}

.aa-agent-engine-choice > *{
  position:relative;
  z-index:2;
}

.aa-agent-engine-choice:hover,
.aa-agent-engine-choice:focus-visible{
  box-shadow:
    0 34px 92px rgba(0,0,0,.62),
    inset 0 1px 0 rgba(255,255,255,.05);
  outline:none;
  text-decoration:none!important;
}

/*
  Desktop creator perspective restored from the earlier visual direction.
  Each board leans toward its own side; the artwork keeps a fixed 430px
  height so increasing the board height never enlarges the PNG.
*/
.aa-agent-engine-router__grid{
  perspective:1350px;
  perspective-origin:50% 45%;
  transform-style:preserve-3d;
}

/* Overview empty engine slots use the exact same 3D scene contract as Build New.
   The project-card columns themselves are unaffected because only engine-choice
   cards consume the 3D transforms below. */
.lt-overview-columns{
  perspective:1350px;
  perspective-origin:50% 45%;
  transform-style:preserve-3d;
}
.lt-engine-column.is-empty{
  transform-style:preserve-3d;
}
.lt-engine-column.is-empty > .aa-agent-engine-choice{
  width:100%;
}

.aa-agent-engine-choice{
  transform-style:preserve-3d;
  backface-visibility:hidden;
  will-change:transform;
}

.aa-agent-engine-choice--llm{
  transform-origin:100% 50%;
  transform:perspective(1350px) rotateY(4.2deg) rotateZ(-.35deg) translateZ(0);
  box-shadow:
    -16px 28px 78px rgba(0,0,0,.50),
    inset 0 1px 0 rgba(255,255,255,.035);
}

.aa-agent-engine-choice--algo{
  transform-origin:0 50%;
  transform:perspective(1350px) rotateY(-4.2deg) rotateZ(.35deg) translateZ(0);
  box-shadow:
    16px 28px 78px rgba(0,0,0,.50),
    inset 0 1px 0 rgba(255,255,255,.035);
}

.aa-agent-engine-choice--llm:hover,
.aa-agent-engine-choice--llm:focus-visible{
  transform:perspective(1350px) translateY(-3px) rotateY(3.1deg) rotateZ(-.22deg) scale(1.006);
}

.aa-agent-engine-choice--algo:hover,
.aa-agent-engine-choice--algo:focus-visible{
  transform:perspective(1350px) translateY(-3px) rotateY(-3.1deg) rotateZ(.22deg) scale(1.006);
}

.aa-agent-engine-choice__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.aa-agent-engine-choice__eyebrow{
  color:rgba(255,255,255,.50);
  font-size:9px;
  letter-spacing:.15em;
  text-transform:uppercase;
}

.aa-agent-engine-choice__badge{
  padding:6px 9px;
  border:0;
  border-radius:0;
  background:rgba(0,0,0,.42);
  color:rgba(255,255,255,.68);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
  font-size:9px;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.aa-agent-engine-choice__title,
.lt-root .aa-agent-engine-choice__title{
  max-width:94%;
  margin:112px 0 12px;
  color:rgba(255,255,255,.97);
  font-size:clamp(27px,3vw,40px);
  font-weight:430;
  letter-spacing:-.035em;
  line-height:1.02;
  text-shadow:0 2px 18px rgba(0,0,0,.72);
}

.aa-agent-engine-choice__description{
  max-width:88%;
  margin:0;
  color:rgba(255,255,255,.66);
  font-size:12px;
  line-height:1.48;
  letter-spacing:.005em;
}

.aa-agent-engine-choice__points{
  display:grid;
  gap:7px;
  width:min(94%,520px);
  margin:22px 0 30px;
}

.aa-agent-engine-choice__point{
  display:grid;
  grid-template-columns:16px minmax(0,1fr);
  align-items:start;
  gap:9px;
  min-height:34px;
  padding:8px 10px;
  color:rgba(255,255,255,.76);
  background:rgba(0,0,0,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  font-size:11px;
  line-height:1.38;
  letter-spacing:.005em;
}

.aa-agent-engine-choice__check{
  padding-top:1px;
  color:rgba(255,255,255,.46);
  font-size:12px;
}

.aa-agent-engine-choice__cta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.80);
  font-size:11px;
  letter-spacing:.09em;
  text-decoration:none!important;
  text-transform:uppercase;
}

.aa-agent-engine-choice__arrow{
  font-size:20px;
  line-height:1;
}

.aa-agent-engine-router__note{
  display:flex;
  gap:7px;
  margin:16px 0 0;
  padding:14px 16px;
  border:0;
  border-radius:0;
  background:rgba(0,0,0,.44);
  color:rgba(255,255,255,.52);
  font-size:11px;
  line-height:1.55;
}

.aa-agent-engine-router__note strong{
  color:rgba(255,255,255,.76);
}

.aa-agent-engine-router__back{
  display:inline-block;
  margin-top:18px;
  color:rgba(255,255,255,.52);
  font-size:11px;
  text-decoration:none!important;
}

.aa-agent-engine-router__back:hover,
.aa-agent-engine-router__back:focus-visible{
  color:rgba(255,255,255,.86);
  outline:none;
  text-decoration:none!important;
}

.algoagent{
  max-width:1280px;
  margin:0 auto;
  border:1px solid rgba(255,255,255,.10);
  border-radius:24px;
  overflow:hidden;
  background:rgba(4,6,8,.90);
  box-shadow:0 24px 80px rgba(0,0,0,.36);
  color:rgba(255,255,255,.90);
}

.algoagent-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:end;
  padding:26px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 85% 0,rgba(127,225,170,.12),transparent 35%),
    linear-gradient(140deg,rgba(255,255,255,.055),rgba(255,255,255,.015));
}

.algoagent-hero__meta,
.algoagent-hero__pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.algoagent-status,
.algoagent-hero__pill{
  padding:6px 9px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.62);
  font-size:9px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.algoagent-status--draft{
  color:#e8c77f;
}

.algoagent-hero__title{
  max-width:860px;
  margin:14px 0 8px;
  font-size:clamp(28px,4vw,50px);
  line-height:1.02;
  font-weight:440;
  letter-spacing:-.04em;
}

.algoagent-hero__lead{
  max-width:830px;
  margin:0;
  color:rgba(255,255,255,.56);
  font-size:13px;
  line-height:1.65;
}

.algoagent-body{
  padding:18px;
}

.algoagent-context-card,
.algoagent-inline-note{
  padding:15px 16px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.55);
  font-size:12px;
  line-height:1.6;
}

.algoagent-context-card strong,
.algoagent-inline-note strong{
  display:block;
  margin-bottom:4px;
  color:rgba(255,255,255,.80);
}

.algoagent-context-card p,
.algoagent-inline-note p{
  margin:0;
}

.algoagent-feedback{
  min-height:22px;
  margin:8px 0;
  color:rgba(255,255,255,.62);
  font-size:11px;
}

.algoagent-feedback.is-error{color:#ff9e9e;}
.algoagent-feedback.is-ok{color:#7fe1aa;}

.algoagent-hidden-field{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  opacity:0 !important;
  pointer-events:none !important;
}

.algoagent-settings-tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:14px 0;
}

.algoagent-settings-tab{
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  column-gap:10px;
  min-width:0;
  padding:13px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.50);
  text-align:left;
  cursor:pointer;
}

.algoagent-settings-tab > span{
  grid-row:1 / span 2;
  color:rgba(255,255,255,.30);
  font-size:10px;
}

.algoagent-settings-tab strong{
  color:inherit;
  font-size:11px;
}

.algoagent-settings-tab small{
  margin-top:3px;
  color:rgba(255,255,255,.34);
  font-size:9px;
}

.algoagent-settings-tab.is-active{
  border-color:rgba(127,225,170,.32);
  background:rgba(127,225,170,.07);
  color:rgba(255,255,255,.88);
}

.algoagent-settings-section{
  padding:18px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(255,255,255,.018);
}

.algoagent-settings-section__header{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin-bottom:18px;
}

.algoagent-settings-section__number{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:9px;
  color:rgba(255,255,255,.42);
  font-size:9px;
}

.algoagent-settings-section__header h3{
  margin:0;
  font-size:16px;
  font-weight:500;
}

.algoagent-settings-section__header p{
  margin:5px 0 0;
  color:rgba(255,255,255,.45);
  font-size:11px;
  line-height:1.55;
}

.algoagent-form-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;
}

.algoagent-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}

.algoagent-field--wide{
  margin-top:14px;
}

.algoagent-label{
  color:rgba(255,255,255,.62);
  font-size:10px;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.algoagent-input,
.algoagent-choice__summary{
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:11px;
  outline:none;
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.86);
  font:inherit;
  font-size:12px;
  resize:vertical;
}

.algoagent-input:focus{
  border-color:rgba(127,225,170,.34);
}

.algoagent-input--textarea{
  min-height:220px;
  line-height:1.6;
}

.algoagent-help{
  color:rgba(255,255,255,.35);
  font-size:9px;
  line-height:1.5;
}

.algoagent-choice{
  position:relative;
}

.algoagent-choice > summary{
  list-style:none;
  cursor:pointer;
}

.algoagent-choice > summary::-webkit-details-marker{display:none;}

.algoagent-choice__summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.algoagent-choice__summary em{
  color:rgba(255,255,255,.32);
  font-size:9px;
  font-style:normal;
}

.algoagent-choice__menu{
  position:absolute;
  z-index:200;
  top:calc(100% + 6px);
  left:0;
  right:0;
  display:grid;
  gap:4px;
  padding:7px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  background:#0b0e12;
  box-shadow:0 18px 48px rgba(0,0,0,.52);
}

.algoagent-choice__option{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:rgba(255,255,255,.70);
  text-align:left;
  cursor:pointer;
}

.algoagent-choice__option:hover,
.algoagent-choice__option.is-selected{
  background:rgba(255,255,255,.07);
  color:#fff;
}

.algoagent-choice__option small{
  color:rgba(255,255,255,.36);
}


.algoagent-toggle-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.algoagent-toggle{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-items:center;
  padding:11px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.70);
  text-align:left;
  cursor:pointer;
}

.algoagent-toggle__state{
  display:grid;
  place-items:center;
  min-width:42px;
  height:24px;
  border-radius:999px;
  background:rgba(255,255,255,.09);
  color:rgba(255,255,255,.42);
  font-size:8px;
  letter-spacing:.08em;
}

.algoagent-toggle.is-on .algoagent-toggle__state{
  background:rgba(127,225,170,.20);
  color:#a7f2c3;
}

.algoagent-toggle__copy{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.algoagent-toggle__copy strong{
  font-size:10px;
}

.algoagent-toggle__copy small{
  color:rgba(255,255,255,.34);
  font-size:9px;
  line-height:1.4;
}

.algoagent-actions{
  position:sticky;
  bottom:0;
  z-index:30;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-top:14px;
  padding:12px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:15px;
  background:rgba(6,8,11,.92);
  backdrop-filter:blur(18px);
}

.algoagent-generation-cost{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-right:auto;
  color:rgba(255,255,255,.42);
  font-size:9px;
}

.algoagent-generation-cost strong{
  color:rgba(255,255,255,.78);
  font-size:12px;
}

.algoagent-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 13px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.72);
  font:inherit;
  font-size:10px;
  text-decoration:none;
  cursor:pointer;
}

.algoagent-btn--primary{
  border-color:rgba(127,225,170,.30);
  background:rgba(127,225,170,.13);
  color:#eafff1;
}

.algoagent-btn--ghost{
  background:transparent;
}

@media (max-width:980px){
  .aa-agent-engine-router{
    width:min(100%,calc(100% - 18px));
    padding:0 0 26px;
  }

  .aa-agent-engine-router__grid{
    grid-template-columns:1fr;
  }

  .aa-agent-engine-choice{
    min-height:500px;
    transform:none;
    transform-style:flat;
  }

  .aa-agent-engine-choice::before{
    background-position:center 30px;
    background-size:auto 360px;
  }

  .aa-agent-engine-choice--llm:hover,
  .aa-agent-engine-choice--llm:focus-visible,
  .aa-agent-engine-choice--algo:hover,
  .aa-agent-engine-choice--algo:focus-visible{
    transform:translateY(-2px);
  }

  .aa-agent-engine-router__note{
    display:block;
  }

  .algoagent{
    border-radius:18px;
  }

  .algoagent-hero{
    grid-template-columns:1fr;
    padding:18px;
  }

  .algoagent-settings-tabs{
    display:flex;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
  }

  .algoagent-settings-tab{
    flex:0 0 215px;
    scroll-snap-align:start;
  }

  .algoagent-settings-section{
    padding:13px;
  }

  .algoagent-actions{
    position:relative;
  }

  .algoagent-generation-cost{
    width:100%;
  }
}

/* =============================================================================
CONNECTED DATA FILES — CORRELATION / CROSS-MARKET CONTEXT
============================================================================= */


.algoagent-files{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}


@media(max-width:980px){
  .algoagent-files{grid-template-columns:1fr;}

}

/* Algorithmic agents use chart files only. */
.algoagent-toggle-grid--chart-only{
  grid-template-columns:minmax(0,1fr);
}

/* =============================================================================
ALGORITHMIC BUILDER SHELL AND SETTINGS
============================================================================= */
.extended-html-body .algoagent:not(.algoagent--dashboard){
  position:relative;
  isolation:isolate;
  max-width:1280px;
  margin:0 auto;
  overflow:visible;
  border:0;
  border-radius:0;
  outline:0;
  background:
    linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.010) 34%,rgba(0,0,0,.14) 78%),
    rgba(2,3,5,.73);
  box-shadow:
    0 46px 132px rgba(0,0,0,.72),
    inset 0 1px 0 rgba(255,255,255,.045),
    inset 0 -1px 0 rgba(0,0,0,.58);
  backdrop-filter:blur(30px) saturate(116%);
  -webkit-backdrop-filter:blur(30px) saturate(116%);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-hero{
  border:0;
  border-radius:0;
  background:
    linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.008)),
    rgba(0,0,0,.12);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-body{
  padding:18px;
}

/* Browser-like settings navigation. */
.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tabs{
  display:flex;
  gap:0;
  margin:14px 0 16px;
  padding:0 8px;
  overflow-x:auto;
  background:rgba(0,0,0,.14);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tab{
  position:relative;
  flex:1 1 0;
  min-width:190px;
  min-height:64px;
  padding:12px 14px;
  border:0;
  border-radius:0;
  outline:0;
  background:transparent;
  color:rgba(255,255,255,.42);
  box-shadow:none;
  transition:background .16s ease,color .16s ease;
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tab:hover,
.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tab:focus-visible{
  background:rgba(255,255,255,.028);
  color:rgba(255,255,255,.78);
  outline:none;
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tab.is-active{
  border:0;
  background:rgba(255,255,255,.050);
  color:rgba(255,255,255,.94);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tab.is-active::after{
  content:"";
  position:absolute;
  right:14px;
  bottom:0;
  left:14px;
  height:1px;
  background:rgba(127,225,170,.72);
  pointer-events:none;
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tab > span{
  color:rgba(127,225,170,.54);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-section{
  padding:18px;
  border:0;
  border-radius:0;
  background:rgba(0,0,0,.17);
  box-shadow:none;
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-section__header{
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.045);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-section__number{
  border:0;
  border-radius:0;
  background:rgba(127,225,170,.075);
  color:rgba(167,242,195,.78);
}

/* Form controls retain a small radius; large sections and actions stay sharp. */
.extended-html-body .algoagent:not(.algoagent--dashboard) :is(
  .algoagent-input,
  .algoagent-choice__summary
){
  border:0;
  border-radius:12px;
  background:rgba(52,53,56,.76);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) :is(
  .algoagent-input,
  .algoagent-choice__summary
):hover{
  background:rgba(58,59,63,.86);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-input:focus{
  border:0;
  background:rgba(62,63,67,.94);
  box-shadow:
    inset 0 0 0 1px rgba(127,225,170,.28),
    0 0 0 3px rgba(127,225,170,.04);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-choice__menu{
  border:0;
  border-radius:0;
  background:rgba(8,10,13,.985);
  box-shadow:0 22px 54px rgba(0,0,0,.58);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-choice__option{
  border:0;
  border-radius:0;
  background:rgba(0,0,0,.24);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-choice__option:hover,
.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-choice__option.is-selected{
  background:rgba(127,225,170,.10);
}


.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-toggle{
  border:0;
  border-radius:0;
  background:rgba(0,0,0,.24);
  box-shadow:none;
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-toggle:hover{
  background:rgba(0,0,0,.34);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-toggle__state{
  border-radius:999px;
}


.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-actions{
  border:0;
  border-radius:0;
  background:rgba(2,3,5,.92);
  box-shadow:0 -12px 38px rgba(0,0,0,.24);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-btn{
  border:0;
  border-radius:0;
  outline:0;
  background:rgba(0,0,0,.56);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.024),0 8px 22px rgba(0,0,0,.14);
  text-decoration:none !important;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-btn:hover,
.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-btn:focus-visible{
  transform:translateY(-1px);
  background:rgba(0,0,0,.78);
  color:rgba(255,255,255,.94);
  outline:none;
  text-decoration:none !important;
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-btn--primary{
  background:rgba(127,225,170,.12);
  color:rgba(255,255,255,.94);
  box-shadow:inset 0 1px 0 rgba(127,225,170,.22),0 10px 24px rgba(0,0,0,.20);
}

.extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-btn--ghost{
  background:rgba(0,0,0,.30);
}

@media(max-width:980px){
  .extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tabs{
    padding:0;
  }

  .extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-tab{
    flex:0 0 210px;
    min-width:210px;
  }

  .extended-html-body .algoagent:not(.algoagent--dashboard) .algoagent-settings-section{
    padding:13px;
  }
}

/* =============================================================================
SAFE STRATEGY SOURCE IMPORT
============================================================================= */
.algoagent-reference-code{
  display:grid;
  gap:10px;
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(0,0,0,.18);
}
.algoagent-reference-code__header{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.algoagent-reference-code__copy{
  display:flex;
  flex:1 1 420px;
  flex-direction:column;
  gap:5px;
}
.algoagent-input--code{
  min-height:390px;
  tab-size:4;
  white-space:pre;
  overflow:auto;
  resize:vertical;
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:11px;
  line-height:1.55;
}
.algoagent-source-security{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:11px 12px;
  border-left:2px solid rgba(232,199,127,.50);
  background:rgba(232,199,127,.045);
}
.algoagent-source-security__badge{
  color:#e8c77f;
  font-size:8px;
  font-weight:800;
  letter-spacing:.12em;
  white-space:nowrap;
}
.algoagent-source-security p{
  margin:0;
  color:rgba(255,255,255,.46);
  font-size:9px;
  line-height:1.55;
}
.algoagent-priority-list{
  display:grid;
  gap:6px;
  margin:8px 0 0;
  padding-left:20px;
  color:rgba(255,255,255,.55);
}
.algoagent-inline-note--priority{
  margin-top:14px;
}
@media(max-width:760px){
  .algoagent-reference-code__header{align-items:stretch;}
  .algoagent-reference-code__header .algoagent-btn{flex:1 1 auto;}
  .algoagent-input--code{min-height:330px;}
  .algoagent-source-security{grid-template-columns:1fr;}
}

/* =============================================================================
STRATEGY BUILD / EDIT MODES
============================================================================= */
.algoagent-source-security--trusted{
  border-color:rgba(127,225,170,.18);
  background:rgba(127,225,170,.055);
}
.algoagent-source-security--trusted .algoagent-source-security__badge{
  color:#a7f2c3;
}

/* =============================================================================
STRICT ENGINE CHAT PROCESS RESULTS
Backtest and optimization summaries attached to the project conversation.
============================================================================= */
.algoagent-strategy-chat__bubble.is-backtest{
  border-color:rgba(142,203,255,.16);
  background:rgba(142,203,255,.05);
}
.algoagent-strategy-chat__process-list{
  display:grid;
  gap:4px;
  margin:8px 0;
  border-top:1px solid rgba(255,255,255,.05);
  border-bottom:1px solid rgba(255,255,255,.05);
}
.algoagent-strategy-chat__process-row{
  display:grid;
  grid-template-columns:minmax(64px,.34fr) minmax(0,1.66fr);
  align-items:center;
  gap:10px;
  padding:6px 0;
  color:rgba(255,255,255,.48);
  font-size:8.5px;
  line-height:1.45;
}
.algoagent-strategy-chat__process-row + .algoagent-strategy-chat__process-row{
  border-top:1px solid rgba(255,255,255,.035);
}
.algoagent-strategy-chat__process-row strong{
  color:rgba(255,255,255,.76);
  font-size:8px;
  letter-spacing:.08em;
}
.algoagent-strategy-chat__process-row span{
  min-width:0;
  overflow-wrap:anywhere;
}

.extended-html-body .algoagent--creator .algoagent-actions{
  position:relative!important;
  bottom:auto!important;
}

/* GPT-5.4 mini is the fixed algorithmic-agent model. */
.algoagent-input--locked{
  display:flex;
  align-items:center;
  min-height:42px;
  resize:none;
  cursor:default;
  color:rgba(255,255,255,.88);
}


/* =============================================================================
CONVERSATION BRANCH EDITING AND BUILD TABS
============================================================================= */
.extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__history{
  align-items:stretch;
}
.extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble{
  width:min(84%,880px);
  max-width:84%;
  margin-right:auto;
  margin-left:0;
}
.extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-user{
  align-self:flex-end;
  margin-right:0;
  margin-left:auto;
}
.extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble:is(.is-assistant,.is-system,.is-backtest,.is-optimizer){
  align-self:flex-start;
  margin-right:auto;
  margin-left:0;
}
.extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-pending{
  opacity:.72;
}
.extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-pending::after{
  content:"";
  display:inline-block;
  width:18px;
  height:2px;
  margin-top:9px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent);
  animation:aaAlgoChatPending 1.05s linear infinite;
}
@keyframes aaAlgoChatPending{
  from{transform:translateX(0);opacity:.35}
  50%{transform:translateX(18px);opacity:1}
  to{transform:translateX(36px);opacity:.35}
}

.algoagent-chat-message__head-actions{
  display:flex;
  align-items:center;
  gap:6px;
}
.algoagent-chat-message-edit__trigger{
  padding:3px 7px;
  border:0;
  background:transparent;
  color:rgba(255,255,255,.34);
  font:inherit;
  font-size:7px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  cursor:pointer;
}
.algoagent-chat-message-edit__trigger:hover,
.algoagent-chat-message-edit__trigger:focus-visible{
  color:rgba(255,255,255,.86);
  outline:none;
}
.algoagent-chat-message-edit[hidden]{display:none!important}
.algoagent-chat-message-edit{
  display:grid;
  gap:9px;
  margin-top:9px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.07);
}
.algoagent-chat-message-edit__input{
  width:100%;
  min-height:132px!important;
  max-height:320px;
  margin:0;
  resize:vertical;
}
.algoagent-chat-message-edit__actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
}
.algoagent-strategy-chat__bubble.is-user.is-editing{
  width:min(94%,980px);
  max-width:94%;
}

@media(max-width:980px){
  .extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-build-tabs{
    display:flex;
    overflow-x:auto;
  }
  .extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab{
    flex:0 0 180px;
  }
}
@media(max-width:720px){
  .extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble,
  .extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-user,
  .extended-html-body :is(.algoagent--builder,.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-user.is-editing{
    width:96%;
    max-width:96%;
  }
}


/* =============================================================================
ALGORITHMIC BUILDER CHAT + STRATEGY
One page scroll plus one optional Chat-history scroll after 10 visible entries.
The history viewport has a stable CSS height; JavaScript never measures bubbles.
============================================================================= */
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-panel--chat.is-active{
  display:grid!important;
  grid-template-columns:minmax(205px,235px) minmax(0,1fr)!important;
  align-items:start!important;
  gap:16px!important;
  width:100%!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:14px 0 0!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail{
  position:sticky!important;
  top:12px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:13px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:15px!important;
  overflow:clip!important;
  border:0!important;
  border-radius:0!important;
  background:
    radial-gradient(circle at 12% 112%,rgba(var(--algo-market-rgb,91,221,155),.08),transparent 42%),
    linear-gradient(180deg,rgba(8,9,11,.97),rgba(0,0,0,.94))!important;
  box-shadow:0 20px 54px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.025)!important;
  backdrop-filter:blur(18px) saturate(120%);
  -webkit-backdrop-filter:blur(18px) saturate(120%);
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__head{
  display:grid!important;
  gap:5px!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__eyebrow{
  color:rgba(255,255,255,.34)!important;
  font-size:8px!important;
  font-weight:700!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__head strong{
  color:rgba(255,255,255,.84)!important;
  font-size:11px!important;
  font-weight:520!important;
  line-height:1.42!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__status{
  margin-top:3px!important;
  color:rgba(var(--algo-market-rgb,91,221,155),.82)!important;
  font-size:8px!important;
  font-weight:760!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__status.is-error{color:#eda6ae!important}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__status.is-stale{color:#e8c77f!important}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__status.is-refreshing{color:#bdd9ff!important}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__captured{
  color:rgba(255,255,255,.24)!important;
  font-size:7px!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__items{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  gap:1px!important;
  width:100%!important;
  background:rgba(255,255,255,.04)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__item{
  display:grid!important;
  gap:4px!important;
  width:100%!important;
  min-width:0!important;
  padding:10px!important;
  border:0!important;
  background:rgba(0,0,0,.52)!important;
  box-shadow:none!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__item strong{
  color:rgba(255,255,255,.46)!important;
  font-size:7.5px!important;
  font-weight:760!important;
  letter-spacing:.10em!important;
  text-transform:uppercase!important;
  white-space:normal!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__item small{
  color:rgba(255,255,255,.72)!important;
  font-size:10px!important;
  font-weight:500!important;
  line-height:1.42!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__item.is-on{
  background:linear-gradient(90deg,rgba(var(--algo-market-rgb,91,221,155),.055),rgba(0,0,0,.52) 52%)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__item.is-on strong{
  color:rgba(var(--algo-market-rgb,91,221,155),.82)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail__item.is-off{opacity:.50!important}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-conversation{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  min-width:0!important;
  min-height:520px!important;
  --aa-algo-chat-history-min-height:370px;
  --aa-algo-chat-history-max-height:clamp(520px,64vh,760px);
  overflow:visible!important;
  border:0!important;
  background:rgba(0,0,0,.17)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.024)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__history{
  display:flex!important;
  flex:0 0 auto!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:10px!important;
  width:100%!important;
  height:auto!important;
  min-height:var(--aa-algo-chat-history-min-height,370px)!important;
  max-height:none!important;
  overflow:visible!important;
  padding:18px!important;
  scrollbar-gutter:stable;
  overflow-anchor:none;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__history.has-scroll{
  max-height:var(--aa-algo-chat-history-max-height,760px)!important;
  overflow-y:auto!important;
  overflow-x:clip!important;
  overscroll-behavior-y:auto!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble,
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event{
  align-self:flex-start;
  width:auto!important;
  max-width:min(88%,920px)!important;
  margin-right:auto!important;
  margin-left:0!important;
  padding:12px 14px!important;
  border:0!important;
  border-radius:0!important;
  background:rgba(255,255,255,.025)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.024)!important;
  color:rgba(255,255,255,.68);
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-user{
  align-self:flex-end!important;
  margin-right:0!important;
  margin-left:auto!important;
  background:rgba(var(--algo-market-rgb,91,221,155),.075)!important;
  box-shadow:inset 0 1px 0 rgba(var(--algo-market-rgb,91,221,155),.15)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-assistant{
  background:rgba(105,166,255,.045)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-backtest{
  background:rgba(142,203,255,.05)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-optimizer{
  background:rgba(232,199,127,.045)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-error{
  background:rgba(255,158,158,.04)!important;
  box-shadow:inset 2px 0 0 rgba(255,158,158,.28)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-pending{opacity:.72}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble.is-pending::after{
  content:"";
  display:inline-block;
  width:18px;
  height:2px;
  margin-top:9px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.65),transparent);
  animation:aaAlgoChatPending 1.05s linear infinite;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble-head strong{
  color:rgba(255,255,255,.62);
  font-size:8px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble-head small{
  color:rgba(255,255,255,.27);
  font-size:8px;
  letter-spacing:.06em;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-message__body,
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble p{
  margin:0!important;
  color:rgba(255,255,255,.76)!important;
  font-size:12px!important;
  line-height:1.62!important;
  white-space:pre-wrap!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__details{
  margin-top:8px;
  border-top:1px solid rgba(255,255,255,.05);
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__details>summary{
  padding-top:8px;
  cursor:pointer;
  color:rgba(255,255,255,.42);
  font-size:8px;
  text-transform:uppercase;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__details pre{
  max-height:none;
  overflow:visible;
  white-space:pre-wrap;
  color:rgba(255,255,255,.55);
  font:9px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:14px 16px 16px!important;
  border:0!important;
  border-top:1px solid rgba(255,255,255,.045)!important;
  background:rgba(3,4,6,.985)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer>.algoagent-label{
  color:rgba(255,255,255,.42)!important;
  font-size:8px!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer-input{
  width:100%!important;
  min-height:112px!important;
  max-height:220px!important;
  margin:0!important;
  overflow-y:auto!important;
  resize:none!important;
  field-sizing:content;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer-foot{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(280px,.72fr)!important;
  align-items:end!important;
  gap:12px!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer-foot>.algoagent-help{
  margin:0!important;
  max-width:78ch!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)!important;
  gap:8px!important;
  width:100%!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__send{
  width:100%!important;
  min-width:0!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__send.is-conversation{
  background:rgba(255,255,255,.045)!important;
  color:rgba(255,255,255,.72)!important;
}

/* Read-only Strategy tab. */
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-panel--strategy{
  display:flex;
  flex-direction:column;
  width:100%!important;
  height:clamp(620px,calc(100vh - 210px),860px)!important;
  min-height:620px!important;
  max-height:860px!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:rgba(4,9,15,.98)!important;
  box-shadow:inset 0 1px 0 rgba(var(--algo-market-rgb,91,221,155),.08)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-code-workspace__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex:0 0 auto;
  min-height:64px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.055);
  background:rgba(255,255,255,.018);
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-code-workspace__eyebrow{
  display:block;
  color:rgba(255,255,255,.34);
  font-size:8px;
  font-weight:800;
  letter-spacing:.13em;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-code-workspace__header strong{
  display:block;
  margin-top:4px;
  color:rgba(255,255,255,.82);
  font-size:12px;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-code-workspace__header small{
  display:block;
  margin-top:3px;
  color:rgba(255,255,255,.34);
  font-size:8px;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-panel--strategy .algoagent-code-workspace__editor{
  flex:1 1 0!important;
  width:100%!important;
  height:0!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:16px!important;
  overflow:auto!important;
  resize:none!important;
  border:0!important;
  border-radius:0!important;
  background:rgba(0,0,0,.34)!important;
  color:rgba(255,255,255,.70)!important;
  font:10px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  white-space:pre!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-panel--strategy .algoagent-source-security{
  flex:0 0 auto;
  margin:0!important;
  padding:12px 16px!important;
  border:0!important;
  border-top:1px solid rgba(255,255,255,.045)!important;
  border-radius:0!important;
}

@media(max-width:980px){
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-panel--chat.is-active{
    grid-template-columns:1fr!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-source-rail{
    position:relative!important;
    top:auto!important;
  }
}
@media(max-width:720px){
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-chat-conversation{
    --aa-algo-chat-history-min-height:300px;
    --aa-algo-chat-history-max-height:clamp(360px,58vh,620px);
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__history{
    padding:14px!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__bubble,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event{
    max-width:94%!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer-foot,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-strategy-chat__composer-actions{
    grid-template-columns:1fr!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-panel--strategy{
    height:min(760px,82vh)!important;
    min-height:560px!important;
    max-height:760px!important;
  }
}

/* =============================================================================
BACKTEST / OPTIMIZATION WORKSPACE
Runtime panels stack vertically and own the full Build Strategy width.
============================================================================= */
.extended-html-body .algoagent--dashboard
.algoagent-build-tab-shell
> .algoagent-build-panel--runtime.is-active:not([hidden]){
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  align-items:stretch!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}

.extended-html-body .algoagent--dashboard
.algoagent-build-tab-shell
> .algoagent-build-panel--runtime.is-active:not([hidden])
> .algoagent-context-actions{
  grid-column:1/-1!important;
  display:grid!important;
  grid-template-columns:minmax(220px,1fr) auto!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
}

.extended-html-body .algoagent--dashboard
.algoagent-build-tab-shell
> .algoagent-build-panel--runtime.is-active:not([hidden])
> .algoagent-dashboard-panel{
  grid-column:1/-1!important;
  display:grid!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  overflow:visible!important;
}


.extended-html-body .algoagent--dashboard
.algoagent-build-panel--runtime
.algoagent-context-actions__buttons{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:7px!important;
}

@media(max-width:820px){
  .extended-html-body .algoagent--dashboard
  .algoagent-build-tab-shell
  > .algoagent-build-panel--runtime.is-active:not([hidden])
  > .algoagent-context-actions{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  .extended-html-body .algoagent--dashboard
  .algoagent-build-panel--runtime
  .algoagent-context-actions__buttons{
    justify-content:flex-start!important;
  }
}

/* Creator-only edit header. */
.extended-html-body .algoagent--creator .algoagent-edit-dashboard-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(420px,.62fr);
  gap:18px;
  align-items:center;
  padding:14px 0;
}

.extended-html-body .algoagent--creator .algoagent-edit-dashboard-head > div:first-child strong{
  color:rgba(255,255,255,.82);
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.extended-html-body .algoagent--creator .algoagent-edit-dashboard-head > div:first-child p{
  margin:5px 0 0;
  color:rgba(255,255,255,.38);
  font-size:9px;
  line-height:1.5;
}

@media(max-width:900px){
  .extended-html-body .algoagent--creator.algoagent--dashboard{
    width:min(100%,calc(100% - 18px));
  }
  .extended-html-body .algoagent--creator.algoagent--dashboard > .algoagent-hero,
  .extended-html-body .algoagent--creator .algoagent-edit-dashboard-head{
    grid-template-columns:1fr;
  }
  .extended-html-body .algoagent--creator.algoagent--dashboard > .algoagent-body{
    padding:0 10px 22px;
  }
}

/* =============================================================================
CLUSTER EDITOR — canonical Algorithmic Trading portfolio controller
============================================================================= */
.extended-html-body .algoagent-cluster-editor{
  display:grid;
  gap:12px;
  min-width:0;
  padding:14px;
  background:rgba(0,0,0,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.extended-html-body .algoagent-clusters-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.05);
}
.extended-html-body .algoagent-clusters-header strong{
  display:block;
  color:rgba(255,255,255,.84);
  font-size:11px;
  letter-spacing:.04em;
}
.extended-html-body .algoagent-clusters-header p{
  max-width:820px;
  margin:5px 0 0;
  color:rgba(255,255,255,.38);
  font-size:9px;
  line-height:1.55;
}
.extended-html-body .algoagent-clusters-header>em{
  color:rgba(255,255,255,.34);
  font-size:8px;
  font-style:normal;
  font-weight:800;
  letter-spacing:.11em;
  white-space:nowrap;
}
.extended-html-body .algoagent-cluster-list{
  display:grid;
  gap:12px;
}
.extended-html-body .algoagent-cluster-card{
  min-width:0;
  overflow:hidden;
  background:rgba(4,7,10,.72);
  box-shadow:inset 3px 0 0 rgba(127,225,170,.20),0 16px 42px rgba(0,0,0,.17);
}
.extended-html-body .algoagent-cluster-card>header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:13px 14px;
  border-bottom:1px solid rgba(255,255,255,.05);
  background:rgba(255,255,255,.016);
}
.extended-html-body .algoagent-cluster-card>header>div{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.extended-html-body .algoagent-cluster-card>header>div:first-child{
  flex:1 1 auto;
}
.extended-html-body .algoagent-cluster-card>header span{
  flex:0 0 auto;
  color:rgba(255,255,255,.29);
  font-size:7px;
  font-weight:800;
  letter-spacing:.12em;
}
.extended-html-body .algoagent-cluster-name{
  min-height:34px;
  max-width:390px;
  padding:7px 9px;
  resize:none;
}
.extended-html-body .algoagent-cluster-card>header em{
  color:#a7f2c3;
  font-size:7px;
  font-style:normal;
  font-weight:850;
  letter-spacing:.09em;
  white-space:nowrap;
}
.extended-html-body .algoagent-cluster-market-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px;
  background:rgba(255,255,255,.04);
}
.extended-html-body .algoagent-cluster-market-group{
  min-width:0;
  padding:11px;
  background:rgba(3,5,8,.82);
}
.extended-html-body .algoagent-cluster-market-group>strong{
  display:block;
  margin-bottom:8px;
  color:rgba(255,255,255,.30);
  font-size:7px;
  letter-spacing:.12em;
}
.extended-html-body .algoagent-cluster-instruments{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.extended-html-body .algoagent-cluster-instrument{
  min-height:28px;
  padding:0 8px;
  border:0;
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.42);
  font:800 8px/1 var(--ui-font,Inter,sans-serif);
  letter-spacing:.05em;
  cursor:pointer;
  transition:background .15s ease,color .15s ease,opacity .15s ease;
}
.extended-html-body .algoagent-cluster-instrument:hover:not(:disabled){
  background:rgba(255,255,255,.075);
  color:rgba(255,255,255,.90);
}
.extended-html-body .algoagent-cluster-instrument.is-selected{
  background:rgba(127,225,170,.13);
  color:#dffbea;
  box-shadow:inset 0 -1px 0 rgba(127,225,170,.58);
}
.extended-html-body .algoagent-cluster-instrument.is-assigned,
.extended-html-body .algoagent-cluster-instrument:disabled{
  opacity:.24;
  cursor:not-allowed;
}
.extended-html-body .algoagent-cluster-card>footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:38px;
  padding:0 14px;
  border-top:1px solid rgba(255,255,255,.045);
  color:rgba(255,255,255,.47);
  font-size:8px;
}
.extended-html-body .algoagent-cluster-card>footer em{
  color:rgba(255,255,255,.30);
  font-style:normal;
  white-space:nowrap;
}
@media(max-width:900px){
  .extended-html-body .algoagent-cluster-market-grid{grid-template-columns:1fr;}
  .extended-html-body .algoagent-cluster-card>header{display:grid;}
  .extended-html-body .algoagent-cluster-card>header>div:last-child{justify-content:space-between;}
}

/* =============================================================================
ALGO HARD SETTINGS · LLM WORKSPACE PARITY
Canonical owner for creator and existing-project Hard Settings.
============================================================================= */

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-dashboard-panel--edit{
  display:grid;
  gap:12px;
  overflow:visible;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-form--unified{
  display:grid;
  gap:11px;
  min-width:0;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tabs{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:0!important;
  margin:14px 0 0!important;
  padding:0!important;
  overflow:visible!important;
  border:0!important;
  background:rgba(0,0,0,.24)!important;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.045)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  min-width:0!important;
  min-height:62px!important;
  padding:12px 16px!important;
  border:0!important;
  border-right:1px solid rgba(255,255,255,.035)!important;
  border-radius:0!important;
  outline:0!important;
  background:rgba(255,255,255,.012)!important;
  color:rgba(255,255,255,.42)!important;
  text-align:left!important;
  cursor:pointer!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab:last-child{
  border-right:0!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab strong{
  color:inherit!important;
  font-size:10px!important;
  font-weight:820!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab small{
  display:block!important;
  overflow:hidden!important;
  max-width:100%!important;
  color:rgba(255,255,255,.28)!important;
  font-size:8px!important;
  line-height:1.35!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab:hover:not(:disabled),
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab:focus-visible:not(:disabled){
  background:rgba(255,255,255,.035)!important;
  color:rgba(255,255,255,.76)!important;
  outline:none!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab.is-active{
  background:rgba(var(--algo-market-rgb,91,221,155),.09)!important;
  color:rgba(255,255,255,.94)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab.is-active::after{
  content:""!important;
  position:absolute!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  display:block!important;
  height:2px!important;
  background:rgba(var(--algo-market-rgb,91,221,155),.76)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab.is-disabled,
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab:disabled{
  opacity:.34!important;
  cursor:not-allowed!important;
}

/* `hidden` is the single source of truth for every Build Strategy panel. */
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) [data-aa-algo-build-panel][hidden]{
  display:none!important;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-panel--hard{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  padding:0!important;
  overflow:visible!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-summary{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.045)!important;
  background:rgba(0,0,0,.18)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-summary>.algoagent-metric{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  min-width:0!important;
  padding:12px 18px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-summary>.algoagent-metric:not(:last-child)::after{
  content:""!important;
  position:absolute!important;
  top:10px!important;
  right:0!important;
  bottom:10px!important;
  width:1px!important;
  background:rgba(255,255,255,.045)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-summary>.algoagent-metric span{
  color:rgba(255,255,255,.30)!important;
  font-size:7px!important;
  letter-spacing:.11em!important;
  text-transform:uppercase!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-summary>.algoagent-metric strong{
  overflow:hidden!important;
  color:rgba(255,255,255,.82)!important;
  font-size:11px!important;
  font-weight:560!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck{
  overflow:visible!important;
  border:0!important;
  background:rgba(0,0,0,.18)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.026)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__header{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px!important;
  min-height:0!important;
  padding:16px 18px 14px!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.055)!important;
  background:rgba(255,255,255,.014)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__header h3{
  margin:4px 0 5px!important;
  color:rgba(255,255,255,.88)!important;
  font-size:15px!important;
  font-weight:580!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__header p{
  max-width:780px!important;
  margin:0!important;
  color:rgba(255,255,255,.42)!important;
  font-size:9px!important;
  line-height:1.55!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__header>em{
  color:rgba(255,255,255,.30)!important;
  font-size:8px!important;
  font-style:normal!important;
  font-weight:800!important;
  letter-spacing:.12em!important;
  white-space:nowrap!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__body{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  padding:0 18px 18px!important;
  background:transparent!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__body>.algoagent-control-group{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:18px 0!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.045)!important;
  background:transparent!important;
  box-shadow:none!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__body>.algoagent-control-group:last-child{
  border-bottom:0!important;
  padding-bottom:0!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-group>header{
  display:block!important;
  min-height:0!important;
  margin:0 0 12px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-group>header strong{
  display:block!important;
  color:rgba(255,255,255,.76)!important;
  font-size:10px!important;
  font-weight:720!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-group>header p{
  max-width:780px!important;
  margin:4px 0 0!important;
  color:rgba(255,255,255,.34)!important;
  font-size:9px!important;
  line-height:1.5!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-group__body{
  display:grid!important;
  gap:12px!important;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-form-grid--identity,
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-form-grid--account,
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-runtime-parameters{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-runtime-trigger-grid,
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-toggle-grid--permissions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-runtime-parameters{
  margin-top:0!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-group.is-market>.algoagent-control-group__body>.algoagent-toggle{
  max-width:none!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-group.is-market .algoagent-cluster-editor{
  margin:0!important;
  padding:14px!important;
  background:rgba(0,0,0,.16)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions.algoagent-actions{
  position:sticky!important;
  bottom:0!important;
  z-index:30!important;
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:10px!important;
  margin:14px 0 0!important;
  padding:12px 14px!important;
  border:0!important;
  border-radius:0!important;
  background:rgba(2,3,5,.94)!important;
  box-shadow:0 -12px 38px rgba(0,0,0,.24)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions .algoagent-generation-cost{
  margin-right:auto!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions .algoagent-generation-cost span{
  color:rgba(255,255,255,.30)!important;
  font-size:7px!important;
  letter-spacing:.11em!important;
  text-transform:uppercase!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions .algoagent-generation-cost strong{
  color:rgba(255,255,255,.76)!important;
  font-size:10px!important;
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions__buttons{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  gap:8px!important;
}

@media(max-width:980px){
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tabs{
    display:flex!important;
    overflow-x:auto!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-build-tab{
    flex:0 0 190px!important;
  }
}
@media(max-width:720px){
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-summary,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-form-grid--identity,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-form-grid--account,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-runtime-parameters,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-runtime-trigger-grid,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-toggle-grid--permissions{
    grid-template-columns:1fr!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-summary>.algoagent-metric::after{
    display:none!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__header{
    display:grid!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-deck__body{
    padding:0 13px 13px!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions.algoagent-actions{
    position:relative!important;
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions__buttons,
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-hard-settings-actions__buttons .algoagent-btn{
    width:100%!important;
  }
}


/* =============================================================================
ALGORITHMIC BUILDER SOURCE CONTEXT
Frontend contract for source-context snapshot state and events.
============================================================================= */
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-control-group.is-builder-context{
  grid-column:1 / -1!important;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-config{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1px;
  background:rgba(255,255,255,.045);
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-config__item{
  display:grid;
  gap:5px;
  min-width:0;
  padding:13px 14px;
  background:rgba(0,0,0,.28);
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-config__item > span{
  color:rgba(255,255,255,.30);
  font-size:7px;
  font-weight:760;
  letter-spacing:.11em;
  text-transform:uppercase;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-config__item > strong{
  overflow:hidden;
  color:rgba(255,255,255,.84);
  font-size:11px;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-config__item > small{
  color:rgba(255,255,255,.34);
  font-size:8px;
  line-height:1.5;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-isolation{
  margin-top:1px;
  padding:13px 14px;
  background:rgba(127,225,170,.035);
  box-shadow:inset 2px 0 0 rgba(127,225,170,.34);
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-isolation strong{
  display:block;
  margin-bottom:5px;
  color:rgba(167,242,195,.76);
  font-size:8px;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-isolation p{
  margin:0;
  color:rgba(255,255,255,.40);
  font-size:8.5px;
  line-height:1.55;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event{
  margin:6px 0;
  padding:10px 12px;
  border:0;
  background:rgba(127,225,170,.040);
  box-shadow:inset 2px 0 0 rgba(127,225,170,.38);
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__eyebrow{
  display:block;
  margin-bottom:3px;
  color:rgba(127,225,170,.62);
  font-size:7px;
  font-weight:820;
  letter-spacing:.10em;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__head strong{
  color:rgba(255,255,255,.72);
  font-size:9px;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__identity{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:3px;
  color:rgba(255,255,255,.46);
  font-size:7px;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__items{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}

.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__item{
  display:inline-flex;
  gap:6px;
  padding:5px 7px;
  background:rgba(0,0,0,.20);
}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__item strong{color:rgba(255,255,255,.34);font-size:7px;text-transform:uppercase}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__item small{color:rgba(255,255,255,.62);font-size:7px}
.extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__id{display:block;margin-top:7px;color:rgba(255,255,255,.25);font-size:7px}

@media(max-width:900px){
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-config{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:560px){
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-builder-context-config{
    grid-template-columns:1fr;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__head{
    display:grid;
  }
  .extended-html-body :is(.algoagent--creator,.algoagent--dashboard) .algoagent-source-context-event__identity{
    align-items:flex-start;
  }
}
