/* ============================================================
   DIRECTIVE · website v10 · round 5 (point 90) · hero demo, vector version (loaded after v10.css)
   Drawn after the real Assistant screen (dark theme 2026): sidebar · status bar · Directive Assistant
   column (account, trades in progress, chat) · New Directive field · engine log · Rules panel with tabs.
   Everything is text / CSS / inline SVG sized in container units of the stage: sharp at any size.
   Layouts (container queries on .stage): wide = 3 columns as in the app · medium = icon rail ·
   narrow (phone) = status bar, Rules panel, New Directive, engine log.
   Motion = opacity only (Web Animations in scripts/v8.js, timeline in scripts/hero-demo10.js).
   No JS: the final state (order placed, accepted by the broker) through [data-nf].
   ============================================================ */
.hd{--hd-bg:#08090E;--hd-side:#0B0D13;--hd-line:#191D29;--hd-card:#0C0E15;--hd-card-line:#1E2332;
  --hd-tx:#E8EAF1;--hd-tx2:#B9BFCE;--hd-mut:#8A91A5;--hd-dim:#626A7E;
  --hd-co:#3F63FF;--hd-co2:#6F8BFF;--hd-co3:#9DB0FF;--hd-long:#2FD08A;--hd-red:#FF5A67}

/* frame: the bar above the window carries the honesty note (Manrope, not mono caps) and the pause button */
.hd .hd-bar{justify-content:space-between;padding:0 4px 11px 8px}
.hd .hd-note{font:500 12.5px/1.3 var(--sans);letter-spacing:0;text-transform:none;color:var(--on-block-2,#A9B1C6);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.hd .hd-bar .demo-pause{position:static;flex:none;width:28px;height:28px}

/* the window: real layout flow (no absolute layers, no enlarged image) */
.hd .hd-stage{aspect-ratio:auto;background:var(--hd-bg);border-color:#171B27}
/* real clip (assets/clips/01-hero-plan-executed): the hidden mock no longer sizes the window */
.hd.has-video .hd-stage{aspect-ratio:16/9;border:2px solid var(--hd-co);box-shadow:0 0 0 1px rgba(63,99,255,.25),0 0 48px -6px rgba(63,99,255,.45),0 40px 100px -40px rgba(63,99,255,.6)}
.hd.has-video video{object-fit:contain;background:var(--hd-bg)}
.hd .cam.hd-app{position:relative;inset:auto;transform:none!important;will-change:auto}
.hd-app{--f:clamp(8.5px,1.06cqw,13.5px);font:500 var(--f)/1.45 var(--sans);color:var(--hd-tx);text-align:left;
  display:grid;grid-template-columns:14.6em minmax(0,1fr) minmax(0,1.06fr);grid-template-rows:auto auto 1fr auto auto;
  grid-template-areas:"side top top" "side main rules" "side chat rules" "side inp rules" "side log rules";
  min-height:41em;-webkit-font-smoothing:antialiased}
.hd-app p,.hd-app h3,.hd-app ul{margin:0;padding:0}
.hd-app u{text-decoration:none}
.hd-app svg{display:block;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.hd-m,.hd-t,.hd-id{font-family:var(--mono);font-weight:500;letter-spacing:0}
.hd-mut{color:var(--hd-mut)}
.hd-dim{color:var(--hd-dim)}

/* stacked variants: one grid cell, the size of the largest, so a state change never moves anything */
.hd-sw{display:inline-grid;vertical-align:top}
.hd-sw>*{grid-area:1/1}
html:not(.js) .hd [data-nf]{visibility:hidden}

/* ---- sidebar ---- */
.hd-side{grid-area:side;display:flex;flex-direction:column;gap:1.3em;padding:1.35em .95em 1.1em;background:var(--hd-side);border-right:1px solid var(--hd-line);min-width:0}
.hd-brand{padding:0 .35em}
.hd-logo{height:1.55em;width:auto;overflow:visible}
.hd-logo :is(.lg-letters-irect,.lg-letters-ve){fill:#F7F2EC;stroke:#F7F2EC}
.hd-nav{list-style:none;display:flex;flex-direction:column;gap:.18em;padding-top:.5em;border-top:1px solid var(--hd-line)}
.hd-nav li{font-size:.96em;display:flex;align-items:center;gap:.8em;padding:.55em .7em;border-radius:.5em;color:var(--hd-tx2);white-space:nowrap;overflow:hidden}
.hd-nav li svg{flex:none;width:1.15em;height:1.15em;color:var(--hd-mut)}
.hd-nav li span{overflow:hidden;text-overflow:ellipsis}
.hd-nav .hd-grp{background:#10131C;border-left:1px solid #1E2333;border-right:1px solid #1E2333}
.hd-nav .hd-grp:first-of-type{border-top:1px solid #1E2333;border-radius:.6em .6em 0 0;margin-top:.2em}
.hd-nav .hd-grp+.hd-grp{border-bottom:1px solid #1E2333;border-radius:0 0 .6em .6em;margin-bottom:.2em}
.hd-nav .on{color:#fff;font-weight:700}
.hd-nav .on svg{color:var(--hd-co2)}
.hd-foot{margin-top:auto;display:flex;flex-direction:column;gap:.7em;padding-top:.9em;border-top:1px solid var(--hd-line)}
.hd-me{display:flex;align-items:center;gap:.7em;color:var(--hd-tx)}
.hd-me small{display:block;font-size:.78em;letter-spacing:.08em;text-transform:uppercase;color:var(--hd-dim)}
.hd-av{flex:none;display:grid;place-items:center;width:2em;height:2em;border-radius:50%;background:#1A2140;color:var(--hd-co3);font-weight:700}
.hd-feed{display:flex;align-items:center;gap:.5em;font:500 .86em/1.2 var(--mono);color:var(--hd-tx2);white-space:nowrap;overflow:hidden}
.hd-feed i{flex:none;width:.6em;height:.6em;border-radius:50%;background:var(--hd-long)}
.hd-kill{display:flex;gap:.4em}
.hd-kill span{flex:1;padding:.6em .3em;border:1px solid #262B3B;border-radius:.45em;font-weight:700;font-size:.84em;letter-spacing:.02em;text-transform:uppercase;text-align:center;white-space:nowrap;color:var(--hd-tx)}
.hd-kill .hd-flat{background:#D93A49;border-color:#D93A49;color:#fff}

/* ---- status bar (top) ---- */
.hd-top{grid-area:top;display:flex;align-items:center;gap:.6em 1.6em;padding:.95em 1.7em;border-bottom:1px solid var(--hd-line);font-size:.95em;min-width:0}
.hd-on{display:flex;align-items:center;gap:.5em;white-space:nowrap;min-width:0;color:var(--hd-tx2)}
.hd-on i{flex:none;width:.55em;height:.55em;border-radius:50%;background:var(--hd-co)}
.hd-on b{color:var(--hd-co2);font-weight:700}
.hd-on span{overflow:hidden;text-overflow:ellipsis}
.hd-sum{margin-left:auto;color:var(--hd-tx2);white-space:nowrap;justify-items:end}
.hd-links{display:flex;gap:1.1em;color:var(--hd-co2)}
.hd-links u{text-decoration:underline;text-underline-offset:.2em}

/* ---- Directive Assistant column ---- */
.hd-main{grid-area:main;padding:1.3em 1.7em 0;min-width:0}
.hd-h{font:700 1.2em/1.2 var(--sans);letter-spacing:-.005em;color:#fff}
.hd-acc{display:flex;align-items:center;flex-wrap:wrap;gap:.45em 1em;margin-top:1.4em!important;font-size:.92em}
.hd-sel{padding:.15em .55em;border:1px solid #2A3042;border-radius:.3em;color:var(--hd-tx)}
.hd-trades{margin-top:1.3em!important;padding-bottom:.9em;border-bottom:1px solid var(--hd-line)}
.hd-th{display:flex;justify-content:space-between;gap:1em;font-size:.92em;color:var(--hd-tx2)}
.hd-th u{color:var(--hd-co2);text-decoration:underline;text-underline-offset:.2em;white-space:nowrap}
.hd-row{display:grid;margin-top:.6em!important;font-size:.95em;line-height:1.55;color:var(--hd-tx2)}
.hd-long{font:700 1em var(--mono);color:var(--hd-long)}
.hd-row .hd-m{color:var(--hd-tx)}
.hd-ai{margin-top:.9em!important;font-size:.9em;color:var(--hd-mut)}
.hd-chat{grid-area:chat;display:flex;flex-direction:column;gap:.95em;padding:1.3em 1.7em 1.2em;min-width:0}
.hd-who{font-size:.84em;color:var(--hd-mut);margin-bottom:.2em!important}
.hd-hint{max-width:34em;font-size:1.06em;line-height:1.5;color:var(--hd-tx)}
.hd-msg{max-width:36em;padding:.75em .95em;border-radius:.6em;line-height:1.5}
.hd-you{align-self:flex-end;background:#121731;border:1px solid #232C57;color:#fff}
.hd-bot{background:#0E1018;border:1px solid var(--hd-line);color:var(--hd-tx)}
.hd-bot b{color:#fff}

/* ---- New Directive + engine log ---- */
.hd-inp{grid-area:inp;display:flex;gap:.7em;padding:0 1.7em;min-width:0}
.hd-field{position:relative;flex:1;min-width:0;display:flex;align-items:baseline;gap:.85em;padding:.85em 1.05em;border:1px solid #2C3BB5;border-radius:.45em;background:#090B14}
.hd-nd{flex:none;color:var(--hd-co2);font-weight:700;white-space:nowrap}
.hd-fz{min-width:0;flex:1}
.hd-fz>span{min-width:0}
.hd-typed{color:#fff}
.hd-ty{display:inline-block}
.hd-ty>span{display:inline-block}
.hd-focus{position:absolute;inset:-1px;border-radius:inherit;border:1px solid var(--hd-co2);box-shadow:0 0 0 3px rgba(63,99,255,.22);pointer-events:none}
.hd-send{position:relative;flex:none;display:flex;align-items:center;padding:0 1.15em;border:1px solid #232838;border-radius:.45em;color:var(--hd-mut)}
.hd-press{position:absolute;inset:-1px;border-radius:inherit;background:rgba(111,139,255,.22);box-shadow:0 0 0 2px rgba(111,139,255,.45);pointer-events:none}
.hd-log{grid-area:log;display:flex;align-items:flex-start;gap:.7em;margin:.85em 1.7em 1.1em;padding-top:.75em;border-top:1px solid var(--hd-line);font-size:.9em;min-width:0}
.hd-li{flex:none;width:1.1em;height:1.1em;margin-top:.15em;color:var(--hd-mut)}
.hd-lk{flex:none;color:var(--hd-tx2);white-space:nowrap}
.hd-ll{display:grid;flex:1;min-width:0;color:var(--hd-tx)}
.hd-t{color:var(--hd-co3)}
.hd-id{font-size:.86em;color:var(--hd-dim)}
.hd-chev{flex:none;color:var(--hd-mut)}

/* ---- Rules panel ---- */
.hd-rules{grid-area:rules;display:flex;flex-direction:column;padding:1.3em 1.5em 1.4em;border-left:1px solid var(--hd-line);min-width:0}
.hd-tabs{display:flex;flex-wrap:wrap;gap:.6em 1.45em;margin:1.3em 0 1.5em!important;color:var(--hd-tx2);white-space:nowrap}
.hd-tab{position:relative;padding-bottom:.4em}
.hd-n{vertical-align:baseline;margin-left:.3em;font-size:.82em;color:var(--hd-mut)}
.hd-u{position:absolute;left:0;right:0;bottom:-.1em;display:grid}
.hd-u i{display:block;height:2px;border-radius:2px;background:var(--hd-co)}
.hd-pane{display:grid}
.hd-app .hd-empty{align-self:start;padding:1.2em 1.1em;border:1px dashed #252A3A;border-radius:.6em;color:var(--hd-mut);line-height:1.5}
.hd-empty b{color:var(--hd-tx)}
.hd-card{position:relative;align-self:start;display:flex;flex-direction:column;gap:.6em;padding:1.05em 1.15em 1.1em;background:var(--hd-card);border:1px solid var(--hd-card-line);border-radius:.6em;min-width:0}
.hd-glow{position:absolute;inset:-1px;border-radius:inherit;border:1px solid rgba(111,139,255,.55);box-shadow:0 0 0 3px rgba(63,99,255,.10),0 18px 50px -24px rgba(63,99,255,.6);pointer-events:none}
.hd-ch{display:flex;flex-wrap:wrap;align-items:center;gap:.55em .8em;margin-bottom:.25em}
.hd-st{font:700 .8em/1.2 var(--sans);letter-spacing:.06em;text-transform:uppercase}
.hd-s-draft{color:var(--hd-mut)}
.hd-s-arm{display:inline-flex;align-items:center;gap:.5em;color:var(--hd-co2)}
.hd-s-trig{color:var(--hd-co3)}
/* the exact armed i of the master logo (styles/v10.css --armed-i) */
.hd-i{flex:none;display:inline-block;width:calc(1.7em * var(--i-ratio,.2214));height:1.7em;margin:-.3em 0;background:var(--armed-i) center/contain no-repeat}
.hd-title{font-weight:700;color:#fff;font-size:1.04em}
.hd-btns{margin-left:auto}
.hd-btns>span,.hd-cf{display:flex;flex-wrap:wrap;gap:.45em;justify-content:flex-end}
.hd-btns u,.hd-cf u{position:relative;padding:.32em .75em;border:1px solid #2A3042;border-radius:.4em;font-weight:700;font-size:.9em;color:var(--hd-tx);white-space:nowrap}
.hd-app .hd-pri{background:var(--hd-co);border-color:var(--hd-co);color:#fff}
.hd-app .hd-red{color:var(--hd-red)}
.hd-card p{line-height:1.5;color:var(--hd-tx2)}
.hd-card .hd-l1{font-size:1.05em;color:var(--hd-tx)}
.hd-l1 b{color:#fff}
.hd-ar{color:var(--hd-mut)}
.hd-card .hd-sl{font-size:.95em;color:var(--hd-tx2)}
.hd-k{margin-right:.35em;font-size:.78em;letter-spacing:.06em;text-transform:uppercase;color:var(--hd-co2)}
.hd-state{display:grid;margin-top:.45em;padding-top:.8em;border-top:1px solid var(--hd-line)}
.hd-state>p{align-self:center}
.hd-cf{justify-content:flex-start;align-items:center}
.hd-cf span{margin-right:auto;color:var(--hd-tx)}
.hd-card .hd-w{display:flex;align-items:center;gap:.6em;color:var(--hd-tx)}
.hd-dot{flex:none;width:.55em;height:.55em;border-radius:50%;background:var(--hd-co2);box-shadow:0 0 0 0 rgba(111,139,255,.5);animation:hd-pulse 2.4s ease-in-out infinite}
.hd-card .hd-met{color:#fff}
.hd-met .hd-dot{background:#fff;animation:none}
.hd-card .hd-done{display:flex;align-items:center;gap:.55em;font-weight:700;color:#fff}
.hd-done svg{flex:none;width:1.35em;height:1.35em;padding:.18em;border-radius:50%;background:var(--hd-co);color:#fff;stroke-width:2.2}
@keyframes hd-pulse{0%,100%{box-shadow:0 0 0 0 rgba(111,139,255,.45)}50%{box-shadow:0 0 0 .4em rgba(111,139,255,0)}}
.hd.is-paused .hd-dot{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){.hd-dot{animation:none}}

/* ---- medium window: icon rail ---- */
@container (max-width:900px){
  .hd-app{--f:clamp(8.5px,1.42cqw,12.5px);grid-template-columns:3.6em minmax(0,1fr) minmax(0,1.12fr)}
  .hd-side{padding:1.2em .5em;align-items:center}
  .hd-brand{padding:0;width:1.85em;overflow:hidden}
  .hd-logo{height:1.85em}
  .hd-nav li{padding:.55em;justify-content:center}
  .hd-nav li span,.hd-foot,.hd-links,.hd-xtab{display:none}
  .hd-nav .hd-grp{border:0;border-radius:.5em!important;margin:0!important}
}
/* rail: .hd-brand crops the master logo to its D tile (same SVG, nothing redrawn) */

/* ---- narrow window (phone): status bar, Rules panel, New Directive, engine log ---- */
@container (max-width:600px){
  .hd-app{--f:clamp(10px,3.55cqw,13px);grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto;
    grid-template-areas:"top" "rules" "inp" "log";min-height:0}
  .hd-side,.hd-main,.hd-chat{display:none}
  .hd-top{flex-wrap:wrap;gap:.25em 1em;padding:.85em 1.1em;font-size:.9em}
  .hd-sum{margin-left:0;justify-items:start}
  .hd-rules{border-left:0;padding:1em 1.1em 1.1em}
  .hd-tabs{gap:.5em 1.1em;margin:.9em 0 1em!important}
  .hd-inp{padding:0 1.1em}
  .hd-field{flex-wrap:wrap;gap:.25em .7em;padding:.7em .85em}
  .hd-fz{flex-basis:100%}
  .hd-send{display:none}
  .hd-log{margin:.8em 1.1em 1em;flex-wrap:wrap;gap:.3em .6em}
  .hd-ll{flex-basis:100%}
  .hd-chev{display:none}
  .hd-btns{margin-left:0;flex-basis:100%}
  .hd-btns>span,.hd-cf{justify-content:flex-start}
  .hd-cf span{flex-basis:100%}
}
