/* HAL workspace refresh. Presentation only; the existing runtime owns all state.
   This layer loads last, including after the deferred hal.css insertion. */
html.pg-app.hx-ui.hs-sidebar-v1 {
  color-scheme: dark;
  --hw-canvas: #0c1728;
  --hw-surface: #122136;
  --hw-raised: #192c43;
  --hw-sidebar: #101d30;
  --hw-ink: #ecf3fa;
  --hw-muted: #a4b5c9;
  --hw-line: #293e55;
  --hw-line-strong: #486078;
  --hw-accent: #65dbc6;
  --hw-accent-alt: #85bdf5;
  --hw-accent-ink: #062921;
  --c-accent: 101 219 198;
  --hw-shadow: 0 12px 32px rgb(0 8 20 / .18);
  --bg: var(--hw-canvas);
  --panel: var(--hw-surface);
  --panel-2: var(--hw-sidebar);
  --panel-3: var(--hw-raised);
  --text: var(--hw-ink);
  --muted: var(--hw-muted);
  --text-muted: var(--hw-muted);
  --divider: var(--hw-line);
  --divider-strong: var(--hw-line-strong);
  --accent: var(--hw-accent);
  --on-accent: var(--hw-accent-ink);
  --hx-blue: var(--hw-accent);
  --hx-link: var(--hw-accent);
  --sp-a: var(--hw-accent);
  --sp-b: var(--hw-accent-alt);
  --sp-text: var(--hw-ink);
  --sp-edge: linear-gradient(110deg, var(--hw-accent), var(--hw-accent-alt));
  --sp-button-a: var(--hw-accent);
  --sp-button-b: var(--hw-accent);
  --hs-side-bg: var(--hw-sidebar);
  --hs-side-ink: var(--hw-ink);
  --hs-side-muted: var(--hw-muted);
  --hs-side-line: var(--hw-line);
  --hs-side-hover: var(--hw-raised);
  --message-user-bg: var(--hw-raised);
  --message-user-border: var(--hw-line);
  --message-assistant-start: var(--hw-surface);
  --ink-on-art: var(--hw-ink);
}
html.pg-app.hx-ui.hs-sidebar-v1[data-theme="light"] {
  color-scheme: light;
  --hw-canvas: #f6f8fb;
  --hw-surface: #ffffff;
  --hw-raised: #edf3f7;
  --hw-sidebar: #f0f4f8;
  --hw-ink: #182d44;
  --hw-muted: #53667d;
  --hw-line: #dce5ed;
  --hw-line-strong: #a4b6c8;
  --hw-accent: #08786d;
  --hw-accent-alt: #28629c;
  --hw-accent-ink: #ffffff;
  --c-accent: 8 120 109;
  --hw-shadow: 0 10px 28px rgb(22 45 70 / .07);
}
/* The existing palette selector remains functional. Navy surfaces are shared;
   each saved palette still changes the accent and active-control treatment. */
html.pg-app.hx-ui.hs-sidebar-v1[data-palette="supreme"] { --hw-accent: #f1cd76; --hw-accent-alt: #f7a978; --c-accent: 241 205 118; }
html.pg-app.hx-ui.hs-sidebar-v1[data-palette="aurora"] { --hw-accent: #6ee0b2; --hw-accent-alt: #c1acff; --c-accent: 110 224 178; }
html.pg-app.hx-ui.hs-sidebar-v1[data-palette="ember"] { --hw-accent: #ffb28f; --hw-accent-alt: #f4a4ba; --c-accent: 255 178 143; }
html.pg-app.hx-ui.hs-sidebar-v1[data-palette="ocean"] { --hw-accent: #83c9f4; --hw-accent-alt: #65dbc6; --c-accent: 131 201 244; }
html.pg-app.hx-ui.hs-sidebar-v1[data-palette="electric"] { --hw-accent: #83d5ee; --hw-accent-alt: #a0bbff; --c-accent: 131 213 238; }
html.pg-app.hx-ui.hs-sidebar-v1[data-palette="sunset"] { --hw-accent: #f6b89c; --hw-accent-alt: #e6b0d1; --c-accent: 246 184 156; }
html.pg-app.hx-ui.hs-sidebar-v1[data-theme="light"][data-palette="supreme"] { --hw-accent: #84610d; --hw-accent-alt: #95531c; --c-accent: 132 97 13; }
html.pg-app.hx-ui.hs-sidebar-v1[data-theme="light"][data-palette="aurora"] { --hw-accent: #10764d; --hw-accent-alt: #6846a8; --c-accent: 16 118 77; }
html.pg-app.hx-ui.hs-sidebar-v1[data-theme="light"][data-palette="ember"] { --hw-accent: #a24524; --hw-accent-alt: #a13960; --c-accent: 162 69 36; }
html.pg-app.hx-ui.hs-sidebar-v1[data-theme="light"][data-palette="ocean"] { --hw-accent: #2366a0; --hw-accent-alt: #08786d; --c-accent: 35 102 160; }
html.pg-app.hx-ui.hs-sidebar-v1[data-theme="light"][data-palette="electric"] { --hw-accent: #0b6c88; --hw-accent-alt: #414fad; --c-accent: 11 108 136; }
html.pg-app.hx-ui.hs-sidebar-v1[data-theme="light"][data-palette="sunset"] { --hw-accent: #9a4a2b; --hw-accent-alt: #8c3b76; --c-accent: 154 74 43; }

/* One calm header. Secondary destinations are also present in the sidebar and
   command center; compact breakpoints reduce duplicate text, not functionality. */
html.pg-app.hx-ui.hs-sidebar-v1 #app .header {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px 18px;
  min-height: 66px;
  height: auto;
  background: var(--hw-surface);
  border-bottom: 1px solid var(--hw-line);
  box-shadow: none;
}
html.pg-app.hx-ui.hs-sidebar-v1 #app .header::after { display: none !important; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .header-spacer { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-brand-suite { display: inline-flex; gap: 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-hal-brand { min-width: 0; width: auto; gap: 10px !important; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-hal-name {
  display: inline;
  color: var(--hw-ink);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: 18px;
  font-weight: 780 !important;
  letter-spacing: -.025em !important;
  text-shadow: none;
}
html.pg-app.hx-ui.hs-sidebar-v1 #app :is(.premium-hal-mark, .hs-side-brand img, .hx-orbit-core img) {
  border: 0;
  border-radius: 0 !important;
  object-fit: contain;
  background: none !important;
  box-shadow: none;
  filter: none !important;
  transform: none !important;
}
html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-hal-mark { width: 36px !important; height: 36px !important; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .uacfl-brand { min-width: 36px; padding: 2px; border: 0; background: none; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .uacfl-brand::before { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .uacfl-wordmark { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .uacfl-mark { width: 28px; height: 28px; flex-basis: 28px; filter: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-headernav { gap: 2px; margin-inline: 8px; flex: 0 0 auto; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-headernav > a { padding: 8px 12px; min-height: 38px; border: 0; border-radius: 9px; background: transparent; box-shadow: none; color: var(--hw-muted); font-size: 13px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-headernav > a[aria-current="page"] { color: var(--hw-accent); background: var(--hw-raised); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-control { position: relative; flex: 0 0 auto; margin: 0; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-trigger {
  position: static;
  display: inline-flex;
  width: auto;
  min-width: 100px;
  max-width: none;
  min-height: 42px;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--hw-line);
  border-radius: 11px;
  background: var(--hw-surface);
  box-shadow: none;
}
html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-trigger-kicker { padding: 0; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--hw-accent); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-trigger-label { font-size: 12px; font-weight: 750; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-trigger-desc { display: block; font-size: 10px; line-height: 1.25; color: var(--hw-muted); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-chevron { width: 13px; flex: 0 0 13px; color: var(--hw-muted); }
html.pg-app.hx-ui.hs-sidebar-v1 #mode-popover,
html.pg-app.hx-ui.hs-sidebar-v1 #mode-sheet { display: none !important; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .header-actions { gap: 6px; margin-left: auto; min-width: 0; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .header :is(.hx-search-trigger, .hx-plugin-trigger, .icon-btn, .btn-menu) {
  min-height: 40px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--hw-muted);
  font-weight: 600;
  text-shadow: none;
}
html.pg-app.hx-ui.hs-sidebar-v1 #app .header :is(.hx-search-trigger, .hx-plugin-trigger) { padding: 8px 10px; gap: 7px; font-size: 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .header :is(.hx-search-trigger, .hx-plugin-trigger, .icon-btn, .btn-menu, .mode-trigger):hover { color: var(--hw-ink); background: var(--hw-raised); border-color: var(--hw-line); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .header #btn-settings { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .status-pill { border: 0; box-shadow: none; background: var(--hw-raised); color: var(--hw-muted); min-height: 28px; font-size: 10px; }

/* Conversations are first in the sidebar; every existing destination remains. */
html.pg-app.hx-ui.hs-sidebar-v1 #app .sidebar { box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-head { min-height: 68px; padding: 12px 16px; border-bottom-color: var(--hw-line); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-brand img { width: 34px; height: 34px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-brand b { font-size: 15px; letter-spacing: -.02em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-brand small { font-size: 11px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-scroll { padding: 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-action { min-height: 40px; border-radius: 9px; padding: 9px 10px; font-size: 12px; gap: 10px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app #btn-new-chat { min-height: 44px; margin-bottom: 4px; color: var(--hw-accent); border: 1px solid var(--hw-line); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-icon { width: 18px; height: 18px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-history-section { min-height: 76px; padding: 10px 0 12px; margin: 6px 0 8px; border-block: 1px solid var(--hw-line); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .history-list { max-height: min(28vh, 280px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--hw-line-strong) transparent; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .history-entry.active { box-shadow: inset 2px 0 var(--hw-accent); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-grp { margin: 18px 10px 6px; color: var(--hw-muted); font: 650 10px/1.4 var(--font-ui); letter-spacing: .1em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-grp:first-child { margin-top: 6px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-nav .hs-side-action:hover { transform: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-side-foot { padding: 10px 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app #hs-sidebar-settings { display: flex !important; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hs-storage-note { font-size: 9px; max-width: 84px; }

/* Work context stays compact, with truthful status supplied by the same JS. */
html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon {
  height: auto;
  min-height: 54px;
  padding: 7px 18px;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--hw-canvas);
  border-bottom: 1px solid var(--hw-line);
  box-shadow: none;
}
html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-copy { flex: 1 1 160px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-copy strong { font-size: 12px; font-weight: 700; color: var(--hw-ink); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-copy span { font-size: 10px; color: var(--hw-muted); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-actions { display: flex; align-items: center; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; min-height: 36px; gap: 6px; padding-inline-start: 0; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-actions :is(.cast-launch, .hal-acct-chip) { position: static; width: 36px; height: 36px; min-width: 36px; min-height: 36px; margin: 0; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-actions :is(.workspace-launch, .avatar-main-launch, .radio-live-link, .hal-connect-trigger) { height: auto; min-height: 36px; padding: 6px 9px; border: 1px solid var(--hw-line); border-radius: 9px; background: var(--hw-surface); box-shadow: none; color: var(--hw-ink); font-size: 11px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hal-connect-trigger { color: var(--hw-accent); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-center { margin: 0; padding: 8px 16px; gap: 10px; border: 0; border-bottom: 1px solid var(--hw-line); border-radius: 0; background: var(--hw-surface); box-shadow: none; backdrop-filter: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-center::before { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-surfaces { gap: 4px; scrollbar-width: thin; scrollbar-color: var(--hw-line) transparent; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-surface { min-height: 42px; min-width: 76px; padding: 7px 10px; border-radius: 9px; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-surface[aria-pressed="true"] { border-color: transparent; background: var(--hw-raised); color: var(--hw-accent); box-shadow: inset 0 -2px var(--hw-accent); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-label { font-size: 11px; font-weight: 700; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-sub { font-size: 9px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-chip { min-height: 28px; padding-inline: 8px; border-radius: 7px; border-color: var(--hw-line); background: var(--hw-canvas); font-size: 9px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-work-focus { flex-wrap: wrap; gap: 7px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-work-focus-kicker { font-family: var(--font-ui); letter-spacing: .08em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-work-lifecycle-stage { border-radius: 7px; background: var(--hw-surface); font-family: var(--font-ui); }

/* A lighter welcome canvas. The H tile is never cropped into a circle. */
html.pg-app.hx-ui.hs-sidebar-v1 #app .messages-wrap { padding: 20px 28px; background: transparent; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .messages { --msg-col: min(1120px, 100%); gap: 20px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .empty { padding: 8px 0 24px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .signal-portal { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .signal-portal::before { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-story { padding: 8px 4px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-toolbar { margin-bottom: 24px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .empty-kicker { color: var(--hw-muted); font: 650 10px/1.4 var(--font-ui); letter-spacing: .12em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-release { color: var(--hw-accent); padding: 5px 8px; border: 0; border-radius: 6px; background: var(--hw-raised); font-size: 9px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-hero-grid { grid-template-columns: minmax(0, 1fr) 172px; align-items: center; gap: 24px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app #signal-title { margin: 0 0 18px; color: var(--hw-ink); font-size: clamp(28px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -.045em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app #signal-title em { background: none !important; color: var(--hw-accent) !important; -webkit-text-fill-color: currentColor !important; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-hero-copy > p { max-width: 580px; margin: 0 0 20px; color: var(--hw-muted); font-size: 14px; line-height: 1.7; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-actions { gap: 8px; flex-wrap: wrap; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-cta { min-height: 42px; padding: 10px 15px; border: 1px solid var(--hw-line); border-radius: 10px; background: var(--hw-surface); color: var(--hw-ink); box-shadow: none; font-size: 12px; font-weight: 650; text-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-cta.primary { background: var(--hw-accent) !important; color: var(--hw-accent-ink) !important; border-color: transparent; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-orbit { min-height: 166px; height: 166px; border: 0; background: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app :is(.hx-orbit-ring, .hx-orbit-dot, .hx-orbit-label) { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-orbit-core { position: static; transform: none; width: 150px; height: 150px; margin: auto; padding: 0; border: 0; border-radius: 0; background: none !important; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-orbit-core img { width: 144px; height: 144px; opacity: 1; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-orbit-core > span { display: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hal-workspace-intro { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 28px 0 24px; padding: 16px 18px; border: 1px solid var(--hw-line); border-radius: 12px; background: var(--hw-surface); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hal-workspace-intro .mode-lab-kicker { color: var(--hw-accent); font: 650 9px/1.4 var(--font-ui); letter-spacing: .1em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hal-workspace-intro strong { display: block; margin-top: 4px; color: var(--hw-ink); font-size: 14px; font-weight: 650; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hal-workspace-intro p { margin: 4px 0 0; color: var(--hw-muted); font-size: 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hal-settings-shortcut { flex: 0 0 auto; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-section-label { margin: 0 0 12px; color: var(--hw-muted); font-size: 9px; letter-spacing: .1em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-paths { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-path { min-height: 124px; padding: 16px; border: 1px solid var(--hw-line); border-radius: 12px; background: var(--hw-surface); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-path .hx-card-icon { color: var(--hw-accent); background: var(--hw-raised); border-radius: 8px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-path b { color: var(--hw-ink); font-size: 13px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-path small { color: var(--hw-muted); font-size: 11px; line-height: 1.5; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-path:hover { border-color: var(--hw-line-strong); transform: translateY(-1px); box-shadow: var(--hw-shadow); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect { margin-top: 20px; padding: 14px 0; border: 0; border-top: 1px solid var(--hw-line); border-radius: 0; background: transparent; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect-copy > span { color: var(--hw-muted); font-size: 8px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect-copy > strong { color: var(--hw-ink); font-size: 12px; letter-spacing: 0; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect-copy > small { color: var(--hw-muted); font-size: 10px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect-links > a { min-height: 36px; border: 1px solid var(--hw-line); border-radius: 8px; background: var(--hw-surface); box-shadow: none; color: var(--hw-muted); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect-links > a > :is(span, b) { color: inherit; font-size: 10px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .generation-note { margin-top: 12px; color: var(--hw-muted); font-size: 10px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .prompt-lab { margin-top: 20px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .starter { border-color: var(--hw-line); border-radius: 10px; background: var(--hw-surface); color: var(--hw-muted); box-shadow: none; font-size: 12px; }

/* The composer stays in its original measured grid row: no fixed positioning,
   no overlay on stop/approval controls, and no replacement of voice widgets. */
html.pg-app.hx-ui.hs-sidebar-v1 #app .composer { padding: 10px 22px 6px; background: var(--hw-canvas); border-top: 1px solid var(--hw-line); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .composer-inner { max-width: 1120px; padding: 0; gap: 7px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .composer-row { min-height: 58px; padding: 6px; gap: 8px; align-items: flex-end; border: 1px solid var(--hw-line-strong); border-radius: 15px; background: var(--hw-surface); box-shadow: 0 4px 16px rgb(0 12 28 / .04); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .composer-row:focus-within { border-color: var(--hw-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hw-accent) 12%, transparent); }
html.pg-app.hx-ui.hs-sidebar-v1 #app #composer-input { padding: 12px 10px; color: var(--hw-ink); font-size: 14px; line-height: 1.6; }
html.pg-app.hx-ui.hs-sidebar-v1 #app #composer-input::placeholder { color: var(--hw-muted); opacity: 1; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .composer-row :is(.btn-send, .btn-stop, .btn-attach) { min-height: 44px; height: 44px; border-radius: 10px; box-shadow: none; text-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .btn-send:not(:disabled) { background: var(--hw-accent); color: var(--hw-accent-ink); border-color: transparent; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .btn-send:disabled { background: var(--hw-raised); color: var(--hw-muted); border-color: transparent; opacity: .75; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .chat-voice-controls { gap: 7px; padding-inline: 2px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .chat-voice-controls > button { border-color: var(--hw-line); border-radius: 8px; background: var(--hw-surface); color: var(--hw-ink); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app #chat-voice-status { color: var(--hw-muted); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .msg { width: min(880px, 100%); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .msg-bubble { padding: 18px 20px; border-radius: 14px; border-color: var(--hw-line); box-shadow: none; line-height: 1.7; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .msg.assistant:not(.error) .msg-bubble { background: var(--hw-surface); border-left: 2px solid var(--hw-accent); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .msg-role { font-size: 11px; font-weight: 650; letter-spacing: .02em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .footer { background: var(--hw-canvas); border-color: transparent; padding: 4px 22px 8px; box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .footer-brand { font-size: 9px; color: var(--hw-muted); }

/* Shared side workspace: retain the 16-view selector and every status/action. */
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-pane { border-color: var(--hw-line); background: var(--hw-surface); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--hw-line); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-head h2 { font-size: 19px; letter-spacing: -.03em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-kicker { color: var(--hw-accent); font: 650 9px/1.4 var(--font-ui); letter-spacing: .1em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-pane > .workspace-label { margin: 16px 18px 6px; font-size: 11px; color: var(--hw-muted); }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-select { border-color: var(--hw-line-strong); border-radius: 9px; background: var(--hw-surface); color: var(--hw-ink); min-height: 42px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-content { padding: 14px 18px 22px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-view > h3 { margin-bottom: 12px; font-size: 16px; letter-spacing: -.02em; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-view > p { color: var(--hw-muted); line-height: 1.65; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-button { border-color: var(--hw-line); border-radius: 9px; background: var(--hw-raised); color: var(--hw-ink); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-cards { gap: 8px; }
html.pg-app.hx-ui.hs-sidebar-v1 #app .workspace-activity { padding-block: 9px; color: var(--hw-muted); border-color: var(--hw-line); background: var(--hw-canvas); }
html.pg-app.hx-ui.hs-sidebar-v1 #app :is(.hs-hub-card, .hs-auto-row, .hs-auto-metric, .hs-owner-build-row) { border-color: var(--hw-line); background: var(--hw-surface); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #app :is(.hs-auto-hero, .hs-auto-callout) { background: var(--hw-raised); box-shadow: none; }

/* HAL settings uses only existing controls, grouped for scanning and keyboard use. */
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .modal-card { width: min(760px, calc(100vw - 32px)); max-width: 760px; max-height: min(88dvh, 900px); padding: 24px; border: 1px solid var(--hw-line); border-radius: 20px; background: var(--hw-surface); color: var(--hw-ink); box-shadow: 0 24px 80px rgb(0 8 24 / .3); overflow-y: auto; overscroll-behavior: contain; }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-heading img { width: 40px; height: 40px; object-fit: contain; border-radius: 0; }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-heading h2 { margin: 0; color: var(--hw-ink); font-size: 23px; letter-spacing: -.03em; }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-heading p { margin: 4px 0 0; color: var(--hw-muted); font-size: 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-section { min-width: 0; padding: 18px; border: 1px solid var(--hw-line); border-radius: 12px; background: var(--hw-canvas); }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-section > h3 { margin: 0 0 14px; color: var(--hw-accent); font-size: 12px; font-weight: 700; }
html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-sounds { grid-column: 1 / -1; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .setting-row { gap: 10px; margin: 0 0 16px; padding: 0; border: 0; background: none; color: var(--hw-ink); font-size: 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .setting-row-stack { display: flex; flex-direction: column; align-items: stretch; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .setting-row-stack > label { font-weight: 600; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal :is(.hx-palette-row, .hal-settings-section:first-child .setting-row:has(select)) { flex-direction: column; align-items: stretch; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal :is(.setting-select, .setting-input) { width: 100%; max-width: none; min-height: 42px; padding: 9px 10px; border: 1px solid var(--hw-line-strong); border-radius: 8px; background: var(--hw-surface); color: var(--hw-ink); box-shadow: none; font-size: 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal :is(.hx-palette-note, #voice-mode-note, #voice-preview-status, .hal-settings-storage-note) { margin: 6px 0 14px; color: var(--hw-muted); font-size: 11px; line-height: 1.65; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .setting-inline { display: flex; gap: 8px; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .setting-inline input { min-width: 0; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .btn-secondary { min-height: 40px; border: 1px solid var(--hw-line-strong); border-radius: 8px; background: var(--hw-surface); color: var(--hw-ink); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .toggle { flex: 0 0 44px; width: 44px; height: 26px; border: 1px solid var(--hw-line-strong); background: var(--hw-line-strong); box-shadow: none; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .toggle.on { border-color: var(--hw-accent); background: var(--hw-accent); }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .hal-settings-storage-note { margin: 18px 0 12px; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .modal-actions { margin-top: 0; padding-top: 14px; border-top: 1px solid var(--hw-line); justify-content: space-between; }
html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal #btn-close-settings { min-width: 88px; background: var(--hw-accent); border-color: transparent; color: var(--hw-accent-ink); }

/* All newly styled controls preserve visible focus and disabled/hidden state. */
html.pg-app.hx-ui.hs-sidebar-v1 :is(#app, #settings-modal) :is(button, a, input, textarea, select, summary):focus-visible { outline: 2px solid var(--hw-accent); outline-offset: 3px; }
html.pg-app.hx-ui.hs-sidebar-v1 :is(#app, #settings-modal) [hidden] { display: none !important; }
@media (max-width: 1280px) {
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-headernav { display: none; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-hero-grid { grid-template-columns: minmax(0, 1fr) 136px; gap: 16px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-orbit-core { width: 128px; height: 128px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-orbit-core img { width: 120px; height: 120px; }
}
@media (min-width: 901px) {
  html.pg-app.hx-ui.hs-sidebar-v1[data-sidebar-collapsed="true"] #app .hs-side-head { padding: 12px 10px; }
  html.pg-app.hx-ui.hs-sidebar-v1[data-sidebar-collapsed="true"] #app .hs-side-scroll { padding: 10px; }
  html.pg-app.hx-ui.hs-sidebar-v1[data-sidebar-collapsed="true"] #app .hs-grp { height: 1px; padding: 0; margin: 9px 7px; background: var(--hw-line); }
  html.pg-app.hx-ui.hs-sidebar-v1[data-sidebar-collapsed="true"] #app .hs-side-foot { padding: 8px 10px; }
  html.pg-app.hx-ui.hs-sidebar-v1[data-sidebar-collapsed="true"] #app #hs-sidebar-settings { width: 48px; justify-content: center; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app[data-workspace-open="true"] .hx-hero-grid { grid-template-columns: minmax(0, 1fr); }
  html.pg-app.hx-ui.hs-sidebar-v1 #app[data-workspace-open="true"] .hx-orbit { display: none; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app[data-workspace-open="true"] .hal-workspace-intro { align-items: flex-start; flex-direction: column; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app[data-workspace-open="true"] .founder-connect { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header { gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon { padding: 8px 12px; gap: 8px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-copy { flex-basis: 120px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .messages-wrap { padding: 18px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .composer { padding: 9px 14px 6px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-center { padding-inline: 12px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header-actions .hx-search-trigger > span:not(.hx-search-glyph),
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header-actions .hx-search-trigger > kbd { display: none; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header-actions .hx-search-trigger { min-width: 40px; justify-content: center; padding: 8px; }
}
@media (max-width: 700px) {
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 8px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .btn-menu { grid-column: 1; grid-row: 1; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-brand-suite { grid-column: 2; grid-row: 1; gap: 10px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-brand-suite .brand { min-width: 44px !important; min-height: 44px !important; justify-content: center; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-control { grid-column: 3; grid-row: 1; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header .hx-plugin-trigger { grid-column: 1; grid-row: 2; min-width: 44px !important; min-height: 44px !important; padding: 8px; justify-content: center; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-plugin-label { display: none; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header-actions { grid-column: 2 / 4; grid-row: 2; justify-content: flex-end; width: 100%; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-trigger,
  html.pg-app.hx-ui.hs-sidebar-v1 #app .header-actions :is(.icon-btn, .hx-search-trigger) { min-width: 44px !important; min-height: 44px !important; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-center { gap: 7px; padding-block: 7px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-surface { min-height: 40px; min-width: 70px; padding: 7px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-command-sub { display: none; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-copy { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-actions { flex-basis: 100%; gap: 6px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .product-ribbon-actions :is(.workspace-launch, .avatar-main-launch, .radio-live-link, .hal-connect-trigger) { min-height: 44px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-toolbar { margin-bottom: 18px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-hero-grid { grid-template-columns: minmax(0, 1fr); }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-orbit { display: none; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hal-workspace-intro { align-items: flex-start; flex-direction: column; gap: 12px; margin-block: 22px; padding: 15px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect { grid-template-columns: 1fr; gap: 10px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .hx-section-label > span:last-child { display: none; }
  html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-grid { grid-template-columns: minmax(0, 1fr); }
  html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .modal-card { padding: 20px; }
  html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-heading { margin-bottom: 18px; }
  html.pg-app.hx-ui.hs-sidebar-v1 .hal-settings-section { padding: 15px; }
}
@media (max-width: 420px) {
  html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-hal-name { font-size: 16px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .premium-hal-mark { width: 30px !important; height: 30px !important; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .uacfl-brand { min-width: 44px; width: 44px; min-height: 44px; justify-content: center; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .uacfl-mark { width: 23px; height: 23px; flex-basis: 23px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .mode-trigger { min-width: 92px; min-height: 44px; padding-inline: 8px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .messages-wrap { padding: 14px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-toolbar { align-items: flex-start; gap: 8px; flex-direction: column; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .portal-path { padding: 13px; min-height: 122px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .founder-connect-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .composer { padding-inline: 10px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .composer-row { padding: 4px; gap: 4px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .msg-bubble { padding: 14px; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app .footer { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html.pg-app.hx-ui.hs-sidebar-v1 #app :is(.portal-path, .hs-side-action, .hx-command-surface, .premium-hal-mark) { transition: none; transform: none; }
}
@media (forced-colors: active) {
  html.pg-app.hx-ui.hs-sidebar-v1 { --hw-canvas: Canvas !important; --hw-surface: Canvas !important; --hw-raised: Canvas !important; --hw-sidebar: Canvas !important; --hw-ink: CanvasText !important; --hw-muted: CanvasText !important; --hw-line: ButtonBorder !important; --hw-line-strong: ButtonBorder !important; --hw-accent: Highlight !important; --hw-accent-ink: HighlightText !important; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app :is(.portal-cta.primary, .btn-send:not(:disabled)) { background: Highlight !important; color: HighlightText !important; border: 1px solid ButtonBorder; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app #signal-title em { color: CanvasText !important; -webkit-text-fill-color: CanvasText !important; }
  html.pg-app.hx-ui.hs-sidebar-v1 #app :is(.header, .composer, .msg-bubble, .hx-command-center, .portal-path),
  html.pg-app.hx-ui.hs-sidebar-v1 #settings-modal .hal-settings-section { border-color: ButtonBorder; }
}
