/* HyTerm Beautiful UI Everywhere v1
   Beautiful UI interaction primitives translated into permanent V16 Blackhole Chroma. */

:root{
  --bui-bg:rgba(5,9,20,.84);
  --bui-bg-strong:rgba(4,7,16,.96);
  --bui-line:rgba(130,165,255,.16);
  --bui-line-strong:rgba(0,245,255,.26);
  --bui-cyan:var(--hy-chroma-cyan,#00f5ff);
  --bui-violet:var(--hy-chroma-violet,#a855f7);
  --bui-pink:var(--hy-chroma-pink,#ff2fb3);
  --bui-gold:var(--hy-chroma-gold,#ffd45a);
  --bui-green:var(--hy-chroma-green,#00ff9d);
  --bui-red:var(--hy-chroma-red,#ff356d);
  --bui-radius-sm:10px;
  --bui-radius:14px;
  --bui-radius-lg:18px;
  --bui-shadow:0 18px 54px rgba(0,0,0,.28),0 0 34px rgba(168,85,247,.055);
  --bui-chroma:linear-gradient(100deg,var(--bui-cyan),var(--bui-violet),var(--bui-pink),var(--bui-gold),var(--bui-cyan));
}

body.hyterm-v16.hyterm-bui-everywhere{
  --bui-glass:linear-gradient(145deg,rgba(10,14,29,.82),rgba(4,7,16,.9));
}

/* universal modern control treatment */
body.hyterm-v16 :where(button,input,textarea,select){
  font-family:var(--v16-font,-apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,system-ui,sans-serif);
}
body.hyterm-v16 :where(button){
  border-radius:9px;
  transition:border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease,transform .12s ease;
}
body.hyterm-v16 :where(button:hover:not(:disabled)){transform:translateY(-1px)}
body.hyterm-v16 :where(button:active:not(:disabled)){transform:scale(.985)}
body.hyterm-v16 :where(input:not([type="checkbox"]):not([type="radio"]),textarea,select){
  border:1px solid rgba(139,92,246,.18);
  border-radius:10px;
  background:linear-gradient(135deg,rgba(7,11,22,.92),rgba(5,8,18,.88));
  color:#edf3ff;
  box-shadow:inset 0 0 18px rgba(139,92,246,.018);
}
body.hyterm-v16 :where(input:not([type="checkbox"]):not([type="radio"]),textarea,select):focus{
  outline:none;
  border-color:rgba(0,245,255,.46);
  box-shadow:0 0 0 1px rgba(0,245,255,.09),0 0 28px rgba(0,245,255,.07),inset 0 0 20px rgba(168,85,247,.03);
}
body.hyterm-v16 :where(input,textarea)::placeholder{color:#65718f}

/* 01 loading */
body.hyterm-v16 [data-bui="loading"]{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(0,245,255,.18);
  border-radius:var(--bui-radius);
  background:linear-gradient(110deg,rgba(0,245,255,.045),rgba(168,85,247,.05),rgba(255,47,179,.035));
  box-shadow:0 10px 30px rgba(0,0,0,.18);
}
body.hyterm-v16 [data-bui="loading"]::after{
  content:"";position:absolute;inset:0 auto 0 -32%;width:28%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.025),rgba(0,245,255,.10),rgba(168,85,247,.10),transparent);
  transform:skewX(-12deg);animation:buiLoaderSweep 1.7s ease-in-out infinite;
}
@keyframes buiLoaderSweep{0%{left:-32%;opacity:0}20%{opacity:.7}100%{left:118%;opacity:0}}

/* 02 thinking */
body.hyterm-v16 [data-bui="thinking"]{
  position:relative;
  isolation:isolate;
  border-color:rgba(168,85,247,.24)!important;
  background:
    radial-gradient(circle at 8% 50%,rgba(0,245,255,.075),transparent 24%),
    radial-gradient(circle at 92% 50%,rgba(255,47,179,.07),transparent 26%),
    linear-gradient(100deg,rgba(168,85,247,.075),rgba(4,7,16,.88))!important;
  box-shadow:0 12px 34px rgba(0,0,0,.22),0 0 28px rgba(168,85,247,.08)!important;
}
body.hyterm-v16 [data-bui="thinking"].visible{animation:buiThinkingBreath 2.4s ease-in-out infinite}
@keyframes buiThinkingBreath{0%,100%{box-shadow:0 12px 34px rgba(0,0,0,.22),0 0 18px rgba(168,85,247,.06)}50%{box-shadow:0 12px 34px rgba(0,0,0,.22),0 0 36px rgba(0,245,255,.10),0 0 54px rgba(255,47,179,.07)}}

/* 03 streaming text */
body.hyterm-v16 [data-bui="streaming-text"]{position:relative}
body.hyterm-v16 [data-bui="streaming-text"].streaming::after,
body.hyterm-v16 .ht-msg-asst.streaming [data-bui="streaming-text"]::after{
  content:"";display:inline-block;width:7px;height:15px;margin-left:4px;vertical-align:-2px;border-radius:2px;
  background:linear-gradient(var(--bui-cyan),var(--bui-pink));
  box-shadow:0 0 10px rgba(0,245,255,.38),0 0 18px rgba(255,47,179,.25);
  animation:buiCursor .9s ease-in-out infinite;
}
@keyframes buiCursor{0%,100%{opacity:.34;transform:scaleY(.72)}50%{opacity:1;transform:scaleY(1)}}

/* 04 approvals */
body.hyterm-v16 [data-bui="approval-card"]{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,212,90,.30)!important;
  border-left:3px solid var(--bui-gold)!important;
  border-radius:var(--bui-radius)!important;
  background:
    radial-gradient(circle at 0 0,rgba(255,212,90,.085),transparent 32%),
    linear-gradient(145deg,rgba(255,212,90,.045),rgba(7,10,20,.94))!important;
  box-shadow:0 14px 42px rgba(0,0,0,.24),0 0 28px rgba(255,212,90,.06)!important;
}
body.hyterm-v16 [data-bui="approval-card"]::after{
  content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;
  border:1px solid rgba(255,212,90,.12);animation:buiApproval 1.8s ease-in-out infinite;
}
@keyframes buiApproval{0%,100%{opacity:.35;box-shadow:0 0 0 rgba(255,212,90,0)}50%{opacity:.85;box-shadow:0 0 28px rgba(255,212,90,.13)}}

/* 05 tool chips */
body.hyterm-v16 [data-bui="tool-chips"]{
  position:relative;
  border-radius:var(--bui-radius);
}
body.hyterm-v16 [data-bui="tool-chips"] .ht-tool-card{
  background:linear-gradient(100deg,rgba(8,12,24,.78),rgba(5,8,18,.76))!important;
  border-color:rgba(139,92,246,.15)!important;
}
body.hyterm-v16 [data-bui="tool-chips"] .ht-tool-card:hover{
  border-color:rgba(0,245,255,.24)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.18),0 0 20px rgba(0,245,255,.05)!important;
}

/* 06 task rows */
body.hyterm-v16 [data-bui="task-rows"]{
  position:relative;
}
body.hyterm-v16 [data-bui="task-rows"] :where(.ht-agent-workspace-row,.ht-plan-step,.ht-todo-item,.hfl-card,.htr-row){
  border-radius:10px;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
body.hyterm-v16 [data-bui="task-rows"] :where(.ht-agent-workspace-row,.ht-plan-step,.ht-todo-item,.hfl-card,.htr-row):hover{
  background:linear-gradient(90deg,rgba(0,245,255,.035),rgba(168,85,247,.045));
  box-shadow:inset 0 0 20px rgba(168,85,247,.025);
  transform:translateX(1px);
}

/* 07 chat */
body.hyterm-v16 [data-bui="chat"]{
  position:relative;
  background:
    radial-gradient(circle at 10% 0,rgba(0,245,255,.025),transparent 30%),
    radial-gradient(circle at 90% 100%,rgba(255,47,179,.025),transparent 34%);
}
body.hyterm-v16 [data-bui="chat"]::before{
  content:"";position:sticky;top:0;z-index:0;display:block;height:1px;width:100%;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(0,245,255,.28),rgba(168,85,247,.24),rgba(255,47,179,.24),transparent);
}

/* 08 prompt bar */
body.hyterm-v16 [data-bui="prompt-bar"]{
  position:relative;
  overflow:visible;
  border:1px solid rgba(0,245,255,.20)!important;
  border-radius:18px!important;
  background:
    radial-gradient(500px 120px at 80% 100%,rgba(168,85,247,.08),transparent 70%),
    linear-gradient(145deg,rgba(8,12,25,.97),rgba(3,6,14,.96))!important;
  box-shadow:0 -18px 70px rgba(0,0,0,.52),0 0 34px rgba(0,245,255,.06),inset 0 0 30px rgba(168,85,247,.02)!important;
}
body.hyterm-v16 [data-bui="prompt-bar"]::before{
  content:"";position:absolute;left:18px;right:18px;top:-1px;height:1px;
  background:var(--bui-chroma);background-size:280% 100%;
  animation:buiSpectrum 6s linear infinite;opacity:.75;
}
body.hyterm-v16 [data-bui="prompt-bar"]:focus-within{
  border-color:rgba(0,245,255,.40)!important;
  box-shadow:0 -18px 70px rgba(0,0,0,.54),0 0 42px rgba(0,245,255,.09),0 0 28px rgba(255,47,179,.05)!important;
}
@keyframes buiSpectrum{to{background-position:280% 0}}

/* 09 recommendations */
body.hyterm-v16 [data-bui="recommendation-card"]{
  position:relative;
  border-color:rgba(168,85,247,.20)!important;
  background:
    radial-gradient(circle at 0 0,rgba(0,245,255,.055),transparent 28%),
    radial-gradient(circle at 100% 100%,rgba(255,47,179,.05),transparent 34%),
    linear-gradient(145deg,rgba(9,13,26,.88),rgba(4,7,16,.90))!important;
  box-shadow:0 14px 40px rgba(0,0,0,.23),0 0 30px rgba(168,85,247,.06)!important;
}

/* 10 context cards */
body.hyterm-v16 [data-bui="context-cards"] .ht-source-card,
body.hyterm-v16 [data-bui="context-cards"]>.ht-source-card{
  border:1px solid rgba(0,245,255,.14)!important;
  border-radius:var(--bui-radius)!important;
  background:linear-gradient(145deg,rgba(5,10,20,.80),rgba(8,10,22,.68))!important;
  box-shadow:0 10px 26px rgba(0,0,0,.16)!important;
}
body.hyterm-v16 [data-bui="context-cards"] .ht-source-card:hover{
  transform:translateY(-2px);
  border-color:rgba(0,245,255,.32)!important;
  box-shadow:0 16px 34px rgba(0,0,0,.20),0 0 24px rgba(0,245,255,.07)!important;
}

/* 11-13 tables */
body.hyterm-v16 [data-bui="records-table"],
body.hyterm-v16 [data-bui="diff-table"]{
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden!important;
  border:1px solid rgba(139,92,246,.18)!important;
  border-radius:13px!important;
  background:rgba(5,8,17,.74)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.18)!important;
}
body.hyterm-v16 [data-bui="records-table"] th,
body.hyterm-v16 [data-bui="diff-table"] th{
  background:linear-gradient(90deg,rgba(139,92,246,.10),rgba(0,245,255,.045))!important;
  color:#d6def4!important;
  font-size:10px!important;font-weight:800!important;letter-spacing:.04em!important;
}
body.hyterm-v16 [data-bui="records-table"] td,
body.hyterm-v16 [data-bui="diff-table"] td{
  border-bottom:1px solid rgba(139,92,246,.075)!important;
  color:#aeb9d4!important;
}
body.hyterm-v16 [data-bui="records-table"] tr:hover td{
  background:linear-gradient(90deg,rgba(0,245,255,.025),rgba(168,85,247,.035));
}
body.hyterm-v16 [data-bui="diff-table"]{
  border-color:rgba(255,47,179,.20)!important;
}
body.hyterm-v16 [data-bui="diff-table"] tr:hover td{
  background:linear-gradient(90deg,rgba(255,47,179,.035),rgba(168,85,247,.04));
}
body.hyterm-v16 [data-bui="filter-table"]{
  border-radius:12px;
  background:linear-gradient(90deg,rgba(0,245,255,.03),rgba(168,85,247,.04));
}

/* 14 sidebar nav */
body.hyterm-v16 [data-bui="sidebar-nav"]{
  background:
    radial-gradient(circle at 0 0,rgba(0,245,255,.065),transparent 30%),
    radial-gradient(circle at 100% 100%,rgba(168,85,247,.065),transparent 32%),
    linear-gradient(180deg,rgba(5,9,20,.98),rgba(3,7,16,.97))!important;
  border-color:rgba(139,92,246,.18)!important;
}

/* 15 search */
body.hyterm-v16 [data-bui="search"]{
  min-height:38px;
  padding-inline:12px!important;
  border-radius:11px!important;
  border-color:rgba(139,92,246,.20)!important;
  background:
    linear-gradient(135deg,rgba(0,245,255,.025),rgba(168,85,247,.04)),
    rgba(7,11,22,.84)!important;
}
body.hyterm-v16 [data-bui="search"]:focus{
  border-color:rgba(0,245,255,.48)!important;
  box-shadow:0 0 0 1px rgba(0,245,255,.08),0 0 24px rgba(0,245,255,.07)!important;
}

/* 16 flowchart */
body.hyterm-v16 [data-bui="flowchart"]{
  margin:14px 0;padding:16px;border:1px solid rgba(0,245,255,.15);border-radius:var(--bui-radius);
  background:
    radial-gradient(circle at 20% 0,rgba(0,245,255,.055),transparent 30%),
    radial-gradient(circle at 80% 100%,rgba(255,47,179,.045),transparent 32%),
    rgba(5,8,17,.76);
  box-shadow:0 14px 38px rgba(0,0,0,.20);
}

/* 17 insight cards */
body.hyterm-v16 [data-bui="insight-card"]{
  position:relative;
  overflow:hidden;
  border-radius:var(--bui-radius)!important;
  border:1px solid rgba(139,92,246,.18)!important;
  background:
    radial-gradient(circle at 0 0,rgba(0,245,255,.055),transparent 32%),
    linear-gradient(145deg,rgba(9,12,24,.82),rgba(5,8,18,.86))!important;
  box-shadow:0 12px 34px rgba(0,0,0,.18),inset 0 0 28px rgba(168,85,247,.018)!important;
}
body.hyterm-v16 [data-bui="insight-card"]::before{
  content:"";position:absolute;left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,transparent,var(--bui-cyan),var(--bui-violet),var(--bui-pink),transparent);opacity:.45;
}

/* 18 code blocks */
body.hyterm-v16 [data-bui="code-block"]{
  position:relative;
  padding:14px 16px!important;
  border:1px solid rgba(0,245,255,.15)!important;
  border-radius:13px!important;
  background:
    radial-gradient(circle at 0 0,rgba(0,245,255,.04),transparent 34%),
    linear-gradient(145deg,#02040b,#050714)!important;
  box-shadow:0 16px 44px rgba(0,0,0,.28),0 0 24px rgba(0,245,255,.035)!important;
  color:#dce9ff!important;
}

/* 20 selection actions */
body.hyterm-v16 [data-bui="selection-actions"]{
  display:flex;align-items:center;gap:7px;flex-wrap:wrap;
}
body.hyterm-v16 [data-bui="selection-actions"] :where(button,a){
  min-height:34px;
  border:1px solid rgba(139,92,246,.20);
  border-radius:9px;
  background:linear-gradient(135deg,rgba(139,92,246,.055),rgba(0,245,255,.025));
  color:#c7d2ec;
  box-shadow:inset 0 0 14px rgba(168,85,247,.018);
}
body.hyterm-v16 [data-bui="selection-actions"] :where(button,a):hover{
  border-color:rgba(0,245,255,.40);
  color:#f6fbff;
  box-shadow:0 0 20px rgba(0,245,255,.08);
}

/* 21 agent screen */
body.hyterm-v16 [data-bui="agent-screen"]{
  position:relative;
}
body.hyterm-v16 .ht-agent-transcript[data-bui="agent-screen"],
body.hyterm-v16 .ht-agent-pane[data-bui="agent-screen"]{
  background:
    radial-gradient(circle at 0 0,rgba(0,245,255,.065),transparent 28%),
    radial-gradient(circle at 100% 0,rgba(255,47,179,.055),transparent 30%),
    linear-gradient(145deg,rgba(8,11,22,.86),rgba(3,6,13,.90))!important;
}

/* sheets */
body.hyterm-v16 [data-bui="sheet"]{
  border-color:rgba(0,245,255,.18)!important;
  background:
    radial-gradient(circle at 6% 0,rgba(0,245,255,.07),transparent 28%),
    radial-gradient(circle at 94% 100%,rgba(255,47,179,.065),transparent 30%),
    linear-gradient(160deg,rgba(5,9,20,.985),rgba(3,7,16,.985))!important;
  box-shadow:0 34px 120px rgba(0,0,0,.58),0 0 50px rgba(168,85,247,.08)!important;
}
body.hyterm-v16 [data-bui="sheet"]::backdrop{
  background:rgba(1,3,10,.78);
  backdrop-filter:blur(12px);
}

/* menus */
body.hyterm-v16 [data-bui="menu"]{
  position:relative;
}
body.hyterm-v16 #ht-cmd-palette[data-bui="menu"],
body.hyterm-v16 [role="menu"][data-bui="menu"]{
  border:1px solid rgba(139,92,247,.20);
  border-radius:var(--bui-radius-lg);
  background:
    radial-gradient(circle at 0 0,rgba(0,245,255,.065),transparent 28%),
    linear-gradient(145deg,rgba(7,11,22,.98),rgba(4,7,16,.98));
  box-shadow:0 28px 90px rgba(0,0,0,.52),0 0 40px rgba(168,85,247,.08);
}
body.hyterm-v16 [data-bui="menu"] :where(button,[role="menuitem"]):hover{
  background:linear-gradient(90deg,rgba(0,245,255,.07),rgba(168,85,247,.075),rgba(255,47,179,.04));
}

/* chart frames */
body.hyterm-v16 [data-bui="chart"]{
  position:relative;
  overflow:hidden;
  padding:12px;
  border:1px solid rgba(139,92,246,.16);
  border-radius:var(--bui-radius);
  background:
    radial-gradient(circle at 12% 0,rgba(0,245,255,.055),transparent 28%),
    radial-gradient(circle at 88% 100%,rgba(255,47,179,.05),transparent 32%),
    rgba(5,8,17,.74);
  box-shadow:0 14px 36px rgba(0,0,0,.20);
}
body.hyterm-v16 [data-bui="chart"]::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(115deg,transparent 0 44%,rgba(0,245,255,.025) 49%,rgba(168,85,247,.03) 53%,transparent 58%);
  transform:translateX(-110%);animation:buiChartScan 5.2s ease-in-out infinite;
}
@keyframes buiChartScan{0%,35%{transform:translateX(-115%)}75%,100%{transform:translateX(220%)}}

/* rich text polish everywhere */
body.hyterm-v16 .ht-md a{
  text-decoration:none!important;
  color:#83f6ff!important;
  border-bottom:1px solid rgba(0,245,255,.22);
}
body.hyterm-v16 .ht-md a:hover{
  color:white!important;
  border-bottom-color:rgba(255,47,179,.50);
  text-shadow:0 0 12px rgba(0,245,255,.22);
}
body.hyterm-v16 .ht-md hr{
  border:0;height:1px;margin:16px 0;
  background:linear-gradient(90deg,transparent,rgba(0,245,255,.26),rgba(168,85,247,.28),rgba(255,47,179,.22),transparent);
}
body.hyterm-v16 .ht-md img{
  border-radius:13px;
  border:1px solid rgba(0,245,255,.16);
  box-shadow:0 18px 50px rgba(0,0,0,.28),0 0 28px rgba(168,85,247,.05);
}

/* form fields in Factory / Recycler */
body.hyterm-v16 :where(.hfl-panel,#ht-hyrecycle-panel) :where(input,textarea,select){
  width:100%;
  min-height:40px;
  padding:9px 11px;
  border-radius:10px!important;
  background:linear-gradient(135deg,rgba(7,11,22,.94),rgba(4,8,18,.92))!important;
}
body.hyterm-v16 :where(.hfl-panel,#ht-hyrecycle-panel) label{
  color:#8f9bb9;font-size:10px;font-weight:700;letter-spacing:.025em;
}

/* mobile: same visual language, no crushed desktop cards */
@media(max-width:900px){
  body.hyterm-v16 [data-bui="sheet"]{border-radius:18px 18px 0 0!important}
  body.hyterm-v16 [data-bui="sidebar-nav"]{border-radius:0!important}
}
@media(max-width:600px){
  body.hyterm-v16 [data-bui="prompt-bar"]{border-radius:14px!important}
  body.hyterm-v16 [data-bui="approval-card"],
  body.hyterm-v16 [data-bui="insight-card"],
  body.hyterm-v16 [data-bui="recommendation-card"],
  body.hyterm-v16 [data-bui="context-cards"] .ht-source-card{border-radius:12px!important}
  body.hyterm-v16 [data-bui="records-table"],
  body.hyterm-v16 [data-bui="diff-table"]{font-size:10px!important}
}

/* Assistant response surface: complete answers should read like intentional communication, not stray transcript text. */
body.hyterm-v16 .ht-msg.ht-msg-asst[data-bui="assistant-response"]{
  position:relative;
  width:min(100%,var(--chat-max,900px));
  margin:14px auto!important;
  padding:15px 17px 16px!important;
  border:1px solid rgba(139,92,246,.18)!important;
  border-left:2px solid var(--bui-cyan)!important;
  border-radius:15px!important;
  background:
    radial-gradient(circle at 0 0,rgba(0,245,255,.055),transparent 31%),
    radial-gradient(circle at 100% 100%,rgba(255,47,179,.045),transparent 34%),
    linear-gradient(145deg,rgba(8,12,24,.82),rgba(4,7,16,.88))!important;
  box-shadow:0 14px 40px rgba(0,0,0,.22),0 0 24px rgba(0,245,255,.045)!important;
}
body.hyterm-v16 .ht-msg.ht-msg-asst[data-bui="assistant-response"]::before{
  content:"";position:absolute;left:0;right:0;top:0;height:1px;border-radius:15px 15px 0 0;
  background:linear-gradient(90deg,transparent,var(--bui-cyan),var(--bui-violet),var(--bui-pink),transparent);
  opacity:.5;
}
body.hyterm-v16 .ht-msg.ht-msg-asst[data-bui="assistant-response"] .ht-msg-lbl{
  margin-bottom:9px!important;
  color:#aeb9d6!important;
}
body.hyterm-v16 .ht-msg.ht-msg-asst[data-bui="assistant-response"] .ht-md{
  font-size:13.5px!important;
  line-height:1.68!important;
  color:#e1e8f8!important;
}
body.hyterm-v16 .ht-msg.ht-msg-asst[data-bui="assistant-response"] .ht-md>p:first-child{
  color:#eef5ff!important;
  font-size:14px!important;
}
body.hyterm-v16 .ht-msg.ht-msg-asst[data-bui="assistant-response"] .ht-md h2{
  margin-top:16px!important;
}

/* Thinking disclosure shows operational telemetry only; no private reasoning. */
body.hyterm-v16 .bui-thinking-steps{display:grid;gap:6px}
body.hyterm-v16 .bui-thinking-step{
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr);
  gap:8px;
  align-items:start;
  min-height:28px;
  padding:5px 7px!important;
  border:1px solid rgba(139,92,246,.08);
  border-radius:8px;
  background:rgba(255,255,255,.012);
  color:#aeb9d3!important;
}
body.hyterm-v16 .bui-thinking-step[data-family="tool"]{border-color:rgba(0,245,255,.12);background:rgba(0,245,255,.025)}
body.hyterm-v16 .bui-thinking-step[data-family="done"]{border-color:rgba(0,255,157,.12);background:rgba(0,255,157,.022)}
body.hyterm-v16 .bui-thinking-step[data-family="error"]{border-color:rgba(255,53,109,.18);background:rgba(255,53,109,.028)}
body.hyterm-v16 .bui-thinking-step-icon{
  width:17px;height:17px;display:grid;place-items:center;border-radius:6px;
  color:var(--bui-cyan);background:rgba(0,245,255,.055);font-size:9px;font-weight:900;
}
body.hyterm-v16 .bui-thinking-step[data-family="done"] .bui-thinking-step-icon{color:var(--bui-green);background:rgba(0,255,157,.05)}
body.hyterm-v16 .bui-thinking-step[data-family="error"] .bui-thinking-step-icon{color:var(--bui-red);background:rgba(255,53,109,.05)}

@media(max-width:600px){
  body.hyterm-v16 .ht-msg.ht-msg-asst[data-bui="assistant-response"]{
    margin:10px 0!important;padding:13px 12px 14px!important;border-radius:13px!important;
  }
}

/* Expanded Thinking must remain inspectable inside the transcript viewport. */
body.hyterm-v16 .bui-thinking.expanded .bui-thinking-body{
  display:block;
  max-height:min(42vh,360px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-right:9px!important;
}
body.hyterm-v16 .bui-thinking.expanded .bui-thinking-body::-webkit-scrollbar{width:7px}
body.hyterm-v16 .bui-thinking.expanded .bui-thinking-body::-webkit-scrollbar-track{
  background:rgba(139,92,246,.035);
  border-radius:999px;
}
body.hyterm-v16 .bui-thinking.expanded .bui-thinking-body::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(0,245,255,.55),rgba(139,92,246,.55),rgba(255,47,179,.5));
  border-radius:999px;
}
body.hyterm-v16 #ht-messages{
  scrollbar-width:thin;
  scrollbar-color:rgba(0,245,255,.55) rgba(139,92,246,.035);
}
body.hyterm-v16 #ht-messages::-webkit-scrollbar{width:8px!important}
body.hyterm-v16 #ht-messages::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(0,245,255,.55),rgba(139,92,246,.52),rgba(255,47,179,.45))!important;
  border-radius:999px!important;
}
