/* OpenCode-inspired workspace shell. Keeps HarbourMind branding and runtime behavior. */
.studio-workspace-bar {
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:6px 14px;
  border-bottom:1px solid var(--line);
  background:rgba(6,12,20,.86);
  box-shadow:0 8px 28px rgba(0,0,0,.12);
  backdrop-filter:blur(14px);
}
.studio-session-tab {
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  color:#d9e5f2;
}
.studio-session-indicator {
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-radius:50%;
  background:var(--cyan);
  box-shadow:0 0 0 4px rgba(45,212,191,.09),0 0 14px rgba(45,212,191,.44);
}
body[data-studio-session-state="working"] .studio-session-indicator {
  background:var(--gold);
  box-shadow:0 0 0 4px rgba(232,184,74,.1),0 0 16px rgba(232,184,74,.5);
  animation:studio-session-pulse 1.3s ease-in-out infinite;
}
@keyframes studio-session-pulse { 50% { opacity:.45; transform:scale(.78); } }
.studio-session-copy { min-width:0; display:grid; gap:1px; }
.studio-session-copy strong {
  max-width:min(42vw,520px);
  overflow:hidden;
  color:#f4f7fb;
  font-size:12px;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.studio-session-copy small {
  color:#6f859e;
  font:9px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.studio-workspace-actions { display:flex; align-items:center; gap:7px; }
.studio-workspace-action {
  min-height:31px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 9px;
  border:1px solid rgba(135,165,198,.18);
  border-radius:7px;
  background:rgba(255,255,255,.025);
  color:#aebfd1;
  cursor:pointer;
  font:10px var(--sans);
}
.studio-workspace-action:hover,.studio-workspace-action:focus-visible {
  border-color:rgba(86,228,208,.52);
  background:rgba(86,228,208,.08);
  color:#eef6ff;
  outline:none;
}
.studio-workspace-action kbd,.composer-command-bar kbd {
  padding:2px 5px;
  border:1px solid rgba(140,180,230,.17);
  border-bottom-color:rgba(140,180,230,.28);
  border-radius:4px;
  background:#09121d;
  color:#8097af;
  font:9px ui-monospace,SFMono-Regular,Menlo,monospace;
  box-shadow:inset 0 -1px rgba(0,0,0,.35);
}
.studio-workspace-model {
  max-width:190px;
  overflow:hidden;
  color:#56e4d0;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.composer { position:relative; }
.composer-command-bar {
  max-width:1010px;
  min-height:32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:6px auto 0;
  padding:0 5px;
  color:#667d96;
  font:10px ui-monospace,SFMono-Regular,Menlo,monospace;
}
.composer-command-controls,.composer-command-help { display:flex; align-items:center; gap:6px; }
.composer-mode-button {
  min-height:27px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 8px;
  border:1px solid transparent;
  border-radius:6px;
  background:transparent;
  color:#8399b0;
  cursor:pointer;
  font:10px ui-monospace,SFMono-Regular,Menlo,monospace;
}
.composer-mode-button:hover,.composer-mode-button:focus-visible {
  border-color:rgba(86,228,208,.34);
  background:rgba(86,228,208,.07);
  color:#cae1f8;
  outline:none;
}
.composer-mode-button .mode-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--cyan);
}
.slash-command-menu {
  position:absolute;
  z-index:35;
  left:50%;
  bottom:92px;
  width:min(560px,calc(100% - 40px));
  max-height:min(380px,52vh);
  translate:-50% 0;
  overflow:auto;
  padding:7px;
  border:1px solid rgba(86,228,208,.3);
  border-radius:12px;
  background:rgba(7,14,24,.98);
  box-shadow:0 24px 80px rgba(0,0,0,.48);
}
.slash-command-menu[hidden] { display:none; }
.slash-command-head {
  padding:7px 9px 8px;
  color:#647c95;
  font:9px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.slash-command-option {
  width:100%;
  display:grid;
  grid-template-columns:88px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#d8e4f0;
  cursor:pointer;
  text-align:left;
  font:11px var(--sans);
}
.slash-command-option:hover,.slash-command-option.active,.slash-command-option:focus-visible {
  border-color:rgba(86,228,208,.3);
  background:rgba(86,228,208,.09);
  outline:none;
}
.slash-command-option code { color:#56e4d0; font:10px ui-monospace,SFMono-Regular,Menlo,monospace; }
.slash-command-option span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.slash-command-option small { color:#61778f; font-size:9px; }

.command-palette {
  position:fixed;
  z-index:1500;
  inset:0;
  display:grid;
  place-items:start center;
  padding:clamp(70px,12vh,130px) 18px 18px;
  background:rgba(1,5,10,.64);
  backdrop-filter:blur(9px);
}
.command-palette[hidden] { display:none; }
.command-dialog {
  width:min(650px,100%);
  overflow:hidden;
  border:1px solid rgba(86,228,208,.34);
  border-radius:14px;
  background:#08111d;
  box-shadow:0 34px 110px rgba(0,0,0,.64),inset 0 1px rgba(255,255,255,.035);
}
.command-search-shell {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
}
.command-search-shell > span { color:#56e4d0; font:13px ui-monospace,SFMono-Regular,Menlo,monospace; }
.command-search {
  min-width:0;
  flex:1;
  border:0;
  outline:0;
  background:transparent;
  color:#f2f7fc;
  font:14px var(--sans);
}
.command-search::placeholder { color:#60758d; }
.command-results { max-height:min(460px,62vh); overflow:auto; padding:8px; }
.command-group-label {
  padding:8px 10px 5px;
  color:#536a82;
  font:9px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.command-result {
  width:100%;
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#d7e3ef;
  cursor:pointer;
  text-align:left;
  font:12px var(--sans);
}
.command-result:hover,.command-result.active,.command-result:focus-visible {
  border-color:rgba(45,212,191,.26);
  background:rgba(45,212,191,.07);
  outline:none;
}
.command-result-icon {
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border:1px solid rgba(140,180,230,.14);
  border-radius:7px;
  background:rgba(255,255,255,.025);
  color:#56e4d0;
  font:11px ui-monospace,SFMono-Regular,Menlo,monospace;
}
.command-result-copy { min-width:0; display:grid; gap:2px; }
.command-result-copy strong { overflow:hidden; font-size:12px; font-weight:550; text-overflow:ellipsis; white-space:nowrap; }
.command-result-copy small { color:#637991; font-size:10px; }
.command-result kbd { color:#657b92; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
.command-empty { padding:28px 14px; color:#6c8197; text-align:center; font-size:12px; }
.command-footer {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:8px 13px;
  border-top:1px solid var(--line);
  color:#536a82;
  font:9px ui-monospace,SFMono-Regular,Menlo,monospace;
}

/* Make the first viewport a working surface instead of a large marketing hero. */
body.elegant-view .welcome {
  max-width:960px;
  margin-top:clamp(24px,5vh,56px);
  padding-top:24px;
}
body.elegant-view .welcome h1 { max-width:760px; font-size:clamp(31px,4vw,52px); }
body.elegant-view .studio-entry-grid { margin-top:18px; }

@media (max-width:1600px) and (min-width:621px) {
  nav { padding-inline:18px; }
  .nav-links { min-width:0; }
  .nav-links .referral-nav,
  .nav-links .workspace-entry,
  .nav-links .model-price-link,
  .nav-links #about-link,
  .nav-links #customer-console-link,
  .nav-links #new { display:none; }
}
@media (max-width:900px) {
  .studio-workspace-bar { padding-inline:12px; }
  .studio-workspace-model { display:none; }
  .studio-session-copy strong { max-width:42vw; }
  .composer-command-help span { display:none; }
}
@media (max-width:620px) {
  nav .knowledge-mode-control { min-width:0; flex:1 1 auto; }
  nav .knowledge-mode-control > span { display:none; }
  nav .knowledge-mode-control select { width:100%; min-width:0; max-width:180px; }
  nav .model-engine { width:36px; max-width:36px; flex:0 0 36px; padding:5px 6px; }
  nav .model-engine .engine-copy,nav .model-engine .engine-chevron { display:none; }
  .studio-workspace-bar { min-height:42px; padding:5px 10px; }
  .studio-session-copy strong { max-width:44vw; font-size:11px; }
  .studio-session-copy small { font-size:8px; }
  .studio-workspace-action { min-height:30px; padding-inline:8px; }
  .studio-workspace-action .action-label { display:none; }
  .composer-command-bar { padding-inline:1px; }
  .composer-command-help { display:none; }
  .composer-mode-button { padding-inline:6px; }
  .slash-command-menu { bottom:102px; width:calc(100% - 24px); }
  .slash-command-option { grid-template-columns:76px minmax(0,1fr); }
  .slash-command-option small { display:none; }
  .command-palette { padding:52px 10px 10px; }
  .command-results { max-height:65vh; }
  body.elegant-view .welcome { margin-top:16px; }
}
@media (prefers-reduced-motion:reduce) {
  body[data-studio-session-state="working"] .studio-session-indicator { animation:none; }
}

/* HarbourMind water-tap: a working control deck, not a landing-page hero. */
.water-tap-workbench {
  --tap-bg:#07111d;
  --tap-panel:#0b1624;
  --tap-panel-2:#101c2b;
  --tap-line:rgba(129,161,194,.16);
  --tap-muted:#71869e;
  --tap-text:#dce8f5;
  --tap-cyan:#2dd4bf;
  --tap-blue:#56e4d0;
  --tap-gold:#e8b84a;
  background:var(--tap-bg);
}
.water-tap-workbench .scene { opacity:.07; filter:saturate(.6) contrast(1.2); }
.water-tap-workbench nav {
  min-height:54px;
  height:54px;
  padding:0 14px;
  border-bottom:1px solid var(--tap-line);
  background:#050c14;
}
.water-tap-workbench nav .logo { font-size:13px; }
.water-tap-workbench nav .mark { width:31px; height:31px; }
.water-tap-workbench .stage { background:rgba(4,10,17,.88); }
.water-tap-workbench .conversation-rail {
  width:236px;
  flex-basis:236px;
  padding:10px 8px 9px;
  background:linear-gradient(180deg,#08131f,#070f19);
  box-shadow:none;
}
.water-tap-workbench .rail-new {
  min-height:36px;
  border-radius:6px;
  border-color:rgba(45,212,191,.25);
  background:rgba(45,212,191,.055);
}
.water-tap-workbench .rail-search { border-radius:6px; background:#0d1824; }
.water-tap-workbench .chat { min-width:420px; background:rgba(5,13,22,.54); }
.water-tap-workbench .studio-workspace-bar {
  min-height:45px;
  padding:5px 11px;
  background:#08131f;
  box-shadow:none;
}
.water-tap-workbench .studio-workspace-action { border-radius:5px; }
.water-tap-workbench .msgs { scrollbar-color:#25384c transparent; }
.water-tap-workbench.elegant-view .welcome {
  width:min(820px,calc(100% - 40px));
  max-width:820px;
  min-height:0;
  margin:clamp(34px,7vh,76px) auto 18px;
  padding:0;
  text-align:left;
}
.water-tap-workbench.elegant-view .welcome::before {
  content:"HM / AGENT WORKSPACE";
  display:block;
  margin-bottom:18px;
  color:var(--tap-cyan);
  font:600 10px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.16em;
}
.water-tap-workbench.elegant-view .elegant-story-kicker { display:none; }
.water-tap-workbench.elegant-view .welcome h1 {
  max-width:640px;
  margin:0;
  color:#edf5fc;
  font-size:clamp(30px,3.4vw,48px);
  line-height:1.04;
  letter-spacing:-.045em;
  text-shadow:none;
}
.water-tap-workbench.elegant-view .welcome h1 .hm-changing:last-child { color:var(--tap-cyan); }
.water-tap-workbench.elegant-view .welcome > p {
  max-width:650px;
  margin:14px 0 22px;
  color:#8499af;
  font-size:13px;
  line-height:1.65;
}
.water-tap-workbench.elegant-view .studio-entry-grid {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:0;
}
.water-tap-workbench.elegant-view .studio-entry {
  min-height:90px;
  padding:13px 14px;
  border:1px solid var(--tap-line);
  border-radius:6px;
  background:rgba(10,24,38,.88);
  text-align:left;
  box-shadow:none;
}
.water-tap-workbench.elegant-view .studio-entry:hover {
  border-color:rgba(86,228,208,.45);
  background:#0d1c2c;
  transform:translateY(-1px);
}
.water-tap-workbench.elegant-view .studio-entry small {
  color:var(--tap-muted);
  font:600 9px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.1em;
}
.water-tap-workbench.elegant-view .studio-entry strong { color:#dfeaf4; font-size:12px; }
.water-tap-workbench.elegant-view .studio-entry > span { color:#73889f; font-size:10px; }
.water-tap-workbench.elegant-view .elegant-possibilities { display:none; }
.water-tap-workbench.elegant-view #ws-banner { display:none !important; }
.water-tap-workbench.elegant-view .chips { margin-top:14px; }
.water-tap-workbench .composer {
  padding:0 18px 9px;
  border-top:0;
  background:linear-gradient(180deg,rgba(7,17,29,0),#07111d 22%);
}
.water-tap-workbench .box {
  max-width:920px;
  border:1px solid rgba(86,228,208,.35);
  border-radius:7px;
  background:#0a1623;
  box-shadow:0 18px 50px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.025);
}
.water-tap-workbench .send { border-radius:5px; background:#56e4d0; color:#04231f; box-shadow:none; }
.water-tap-workbench .composer-command-bar { max-width:920px; }
.water-tap-workbench .composer-meta { max-width:920px; color:#536a82; }

/* Focused browser chat keeps the workbench controls available when users switch modes. */
.water-tap-workbench.elegant-view .studio-context-dock { display:none; }
.water-tap-workbench.elegant-view .msgs { padding-inline:clamp(16px,5vw,72px); }
.water-tap-workbench.elegant-view .row { max-width:860px; }
.water-tap-workbench.elegant-view .row.assistant .bubble:has(.hm-quick-run) { width:min(100%,860px); max-width:100%; padding:4px 0; border:0; background:transparent; }
.water-tap-workbench.elegant-view .hm-quick-run { min-width:0; gap:8px; }
.water-tap-workbench.elegant-view .hm-quick-run .xl-rail,
.water-tap-workbench.elegant-view .hm-quick-result > strong { display:none; }
.water-tap-workbench.elegant-view .hm-quick-result { padding:3px 0; border:0; background:transparent; box-shadow:none; }
.water-tap-workbench.elegant-view .hm-quick-answer { overflow-wrap:anywhere; font-size:15px; }
.water-tap-workbench .hm-chat-code { display:grid; gap:8px; max-width:100%; margin:12px 0; padding:13px 16px; overflow-x:auto; border:1px solid rgba(113,154,192,.25); border-radius:10px; background:#08111b; white-space:pre; }
.water-tap-workbench .hm-chat-code > span { color:#8da8c2; font:11px ui-monospace,SFMono-Regular,Menlo,monospace; }
.water-tap-workbench .hm-chat-code code { color:#e1edf8; font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; }
.water-tap-workbench.elegant-view .hm-quick-next { margin-top:3px; }
.water-tap-workbench.elegant-view .hm-quick-next button { min-height:31px; padding:5px 9px; border-radius:8px; }
.water-tap-workbench.elegant-view .box { border-radius:16px; }
.water-tap-workbench.elegant-view .send { border-radius:10px; }
.water-tap-workbench .rail-thread-row .rail-delete { opacity:.35; }
.water-tap-workbench .rail-thread-row:hover .rail-delete,
.water-tap-workbench .rail-thread-row:focus-within .rail-delete { opacity:1; }

.studio-context-dock {
  width:278px;
  flex:0 0 278px;
  display:flex;
  flex-direction:column;
  min-height:0;
  border-left:1px solid var(--tap-line);
  background:linear-gradient(180deg,#091522,#07111c);
  color:var(--tap-text);
}
.context-dock-head {
  min-height:59px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 13px;
  border-bottom:1px solid var(--tap-line);
}
.context-dock-head > div { display:grid; gap:3px; }
.context-dock-head small,.terminal-entry small {
  color:#5f7690;
  font:600 8px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.13em;
}
.context-dock-head strong { font-size:12px; font-weight:650; }
.context-live { color:var(--tap-cyan); font:600 8px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.1em; }
.context-live i { width:6px; height:6px; display:inline-block; margin-right:4px; border-radius:50%; background:var(--tap-cyan); box-shadow:0 0 10px rgba(45,212,191,.8); }
.route-line { display:flex; align-items:center; padding:15px 12px 13px; border-bottom:1px solid var(--tap-line); }
.route-line > b { height:1px; flex:1; margin:0 3px; background:#26394c; }
.route-node { display:grid; justify-items:center; gap:4px; color:#536a82; }
.route-node i { width:20px; height:20px; display:grid; place-items:center; border:1px solid #30455a; border-radius:50%; font:7px ui-monospace,SFMono-Regular,Menlo,monospace; font-style:normal; }
.route-node span { font:7px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.06em; }
.route-node.ready { color:var(--tap-cyan); }
.route-node.ready i { border-color:rgba(45,212,191,.45); background:rgba(45,212,191,.08); }
.route-node.running { color:var(--tap-gold); }
.route-node.running i { border-color:var(--tap-gold); box-shadow:0 0 13px rgba(232,184,74,.22); }
.context-tabs { display:flex; border-bottom:1px solid var(--tap-line); }
.context-tabs button { flex:1; height:36px; border:0; border-bottom:1px solid transparent; background:none; color:#61768d; cursor:pointer; font:600 9px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.1em; }
.context-tabs button.active { border-color:var(--tap-blue); color:#b7e9df; background:rgba(86,228,208,.04); }
.context-tabs span { margin-left:4px; color:#4e657e; }
.context-panel { flex:1; min-height:0; overflow:auto; padding:9px; }
.context-panel:not(.active) { display:none; }
.context-open-workspace { width:100%; display:flex; justify-content:space-between; padding:9px 10px; border:1px solid var(--tap-line); border-radius:5px; background:#0c1927; color:#9fb4c9; cursor:pointer; font:10px var(--sans); }
.context-open-workspace:hover { border-color:rgba(86,228,208,.45); color:#e4f0fb; }
.context-file-list { margin-top:8px; }
.context-file-list p { margin:14px 4px; color:#536a82; font:9px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }
.context-file { width:100%; display:grid; grid-template-columns:18px minmax(0,1fr); gap:7px; align-items:center; padding:7px 6px; border:0; border-radius:4px; background:none; color:#8399ae; cursor:pointer; text-align:left; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
.context-file:hover { background:rgba(86,228,208,.065); color:#cce3f8; }
.context-file i { color:#4f7499; font-style:normal; text-align:center; }
.context-file span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.run-summary { display:flex; align-items:center; justify-content:space-between; padding:10px; border:1px solid var(--tap-line); border-radius:5px; color:#5f7690; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
.run-summary strong { color:var(--tap-cyan); letter-spacing:.1em; }
.run-timeline { display:grid; gap:0; margin:13px 4px; padding:0; list-style:none; }
.run-timeline li { position:relative; display:grid; grid-template-columns:14px 1fr; gap:8px; min-height:49px; color:#61768d; }
.run-timeline li:not(:last-child)::before { content:""; position:absolute; left:4px; top:9px; bottom:-1px; width:1px; background:#24384b; }
.run-timeline i { position:relative; z-index:1; width:9px; height:9px; margin-top:3px; border:2px solid #334b62; border-radius:50%; background:#091522; }
.run-timeline span { font-size:10px; }
.run-timeline small { display:block; margin-top:3px; color:#4f6379; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
.run-timeline li.done i { border-color:var(--tap-cyan); }
.run-timeline li.running { color:#e3edf7; }
.run-timeline li.running i { border-color:var(--tap-gold); box-shadow:0 0 9px rgba(232,184,74,.35); }
.terminal-entry { margin:9px; padding:11px; border:1px solid rgba(45,212,191,.19); border-radius:6px; background:linear-gradient(135deg,rgba(45,212,191,.055),rgba(86,228,208,.035)); }
.terminal-entry > div { display:grid; gap:3px; margin-bottom:9px; }
.terminal-entry strong { color:#c9d9e8; font-size:11px; }
.terminal-entry button { width:100%; display:flex; align-items:center; justify-content:space-between; padding:7px 8px; border:1px solid rgba(45,212,191,.25); border-radius:4px; background:#08131f; color:var(--tap-cyan); cursor:pointer; font:9px ui-monospace,SFMono-Regular,Menlo,monospace; }
.terminal-entry kbd { color:#61798f; font:7px ui-monospace,SFMono-Regular,Menlo,monospace; }
.studio-context-dock > footer { display:flex; justify-content:space-between; padding:7px 9px; border-top:1px solid var(--tap-line); color:#40556c; font:7px ui-monospace,SFMono-Regular,Menlo,monospace; }

.terminal-setup { position:fixed; z-index:1000; inset:0; display:grid; place-items:center; padding:20px; background:rgba(2,7,12,.82); backdrop-filter:blur(10px); }
.terminal-setup[hidden] { display:none; }
.terminal-setup-dialog { width:min(660px,100%); min-width:0; max-width:100%; max-height:calc(100dvh - 40px); overflow-y:auto; padding:20px; border:1px solid rgba(86,228,208,.3); border-radius:9px; background:#08131f; box-shadow:0 30px 100px rgba(0,0,0,.52); color:#dce8f5; }
.terminal-setup-dialog > header { display:flex; align-items:flex-start; justify-content:space-between; }
.terminal-setup-dialog header small { color:var(--tap-cyan); font:600 9px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.14em; }
.terminal-setup-dialog h2 { margin:6px 0 0; font-size:24px; letter-spacing:-.03em; }
.terminal-setup-dialog header button { width:32px; height:32px; border:1px solid var(--tap-line); border-radius:5px; background:none; color:#8399ae; cursor:pointer; }
.terminal-setup-dialog > p { color:#8297ad; font-size:12px; line-height:1.65; }
.terminal-setup-dialog code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.terminal-code { margin-top:9px; border:1px solid var(--tap-line); border-radius:5px; overflow:hidden; background:#050d16; }
.terminal-code > div { display:flex; justify-content:space-between; padding:6px 9px; border-bottom:1px solid var(--tap-line); color:#536a82; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
.terminal-code button { border:0; background:none; color:#7daee4; cursor:pointer; font:9px var(--sans); }
.terminal-code > code { display:block; padding:12px; color:#a9bfd4; font-size:11px; line-height:1.7; overflow:auto; }
.terminal-code.accent { border-color:rgba(45,212,191,.3); }
.terminal-code.accent > code { color:var(--tap-cyan); font-size:15px; }
.terminal-setup-dialog > footer { display:flex; justify-content:space-between; gap:12px; margin-top:14px; color:#587087; font:8px ui-monospace,SFMono-Regular,Menlo,monospace; }
.terminal-setup-dialog footer a { color:#56e4d0; text-decoration:none; }
.terminal-import { display:grid; gap:10px; margin-top:16px; padding-top:16px; border-top:1px solid var(--tap-line); min-width:0; }
.terminal-import > label { color:#a9bfd4; font-size:12px; font-weight:600; }
.terminal-import p { margin:0; color:#8297ad; font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.terminal-import input { min-width:0; width:100%; color:#a9bfd4; font-size:12px; }
.terminal-import summary { cursor:pointer; color:#a9bfd4; font-size:12px; }
.terminal-import textarea { box-sizing:border-box; width:100%; margin-top:8px; padding:10px; background:#050d16; color:#dce8f5; border:1px solid var(--tap-line); border-radius:5px; resize:vertical; font:16px ui-monospace,monospace; }
.studio-local-setup { margin-top:22px; padding-top:18px; border-top:1px solid var(--tap-line); }
.studio-local-setup h3 { margin:0 0 8px; color:#e3edf7; font-size:17px; }
.studio-execution-choice { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; color:#b6cbd6; font:13px var(--sans); }
.studio-execution-choice select,.studio-execution-choice button { min-height:40px; border:1px solid #405b73; border-radius:6px; background:#08131f; color:#e3edf7; padding:6px 10px; font:inherit; }
.studio-execution-choice :focus-visible { outline:2px solid var(--tap-cyan); outline-offset:3px; }
.studio-local-install { margin:18px 0; padding-bottom:18px; border-bottom:1px solid var(--tap-line); }
.studio-local-install h4 { margin:0 0 8px; color:#e3edf7; font:600 15px var(--sans); }
.studio-local-install .studio-install-option { display:flex; align-items:center; gap:10px; margin:12px 0; cursor:pointer; }
.studio-local-setup p,.studio-local-manual > p { color:#a6b8ca; font:13px/1.65 var(--sans); overflow-wrap:anywhere; }
.studio-local-setup label { display:grid; gap:7px; color:#d1deeb; font:13px/1.5 var(--sans); min-width:0; }
.studio-local-setup input:not([type=checkbox]),.studio-local-setup select { box-sizing:border-box; width:100%; min-width:0; min-height:44px; padding:9px 10px; border:1px solid #405b73; border-radius:6px; background:#050d16; color:#e3edf7; font:14px var(--sans); }
.studio-local-setup input::placeholder { color:#95aabe; }
.studio-local-setup :is(button,input,select):focus-visible,.studio-local-banner button:focus-visible,.studio-local-run :is(button,pre):focus-visible { outline:2px solid var(--tap-cyan); outline-offset:3px; }
.studio-local-setup button,.studio-local-run button,.studio-local-banner button { min-height:44px; cursor:pointer; }
.studio-local-setup button:disabled,.studio-local-run button:disabled { cursor:wait; opacity:.55; }
.studio-local-pair-row { display:flex; gap:10px; align-items:end; }
.studio-local-pair-row label { flex:1; }
.studio-local-pair-row button { flex-shrink:0; }
#studio-local-command { white-space:pre-wrap; overflow-wrap:anywhere; }
#studio-local-pair-expiry { margin:0; padding:0 12px 12px; font-size:12px; }
.studio-local-list-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:20px; font-size:13px; }
.studio-local-connections { margin:4px 0 18px; }
.studio-local-connection { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--tap-line); }
.studio-local-connection > div { min-width:0; }
.studio-local-connection strong { color:#d1deeb; font-size:13px; }
.studio-local-connection p { margin:5px 0 0; font-size:12px; white-space:pre-line; }
.studio-local-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.studio-local-preview-label { margin-top:15px; }
.studio-local-setup small { color:#a6b8ca; font-size:12px; line-height:1.6; }
.studio-local-setup .studio-local-enable { display:flex; align-items:center; gap:10px; margin-top:18px; padding:12px 0; border-block:1px solid var(--tap-line); cursor:pointer; }
.studio-local-enable input { width:20px; height:20px; flex-shrink:0; accent-color:var(--tap-cyan); }
.studio-local-enable small { display:block; margin-top:3px; }
#studio-local-status[data-error=true],.studio-local-run [data-local-error],.studio-local-run [data-local-download-status][data-error=true] { color:#ffc0be; }
.studio-local-manual { margin-top:20px; padding-top:16px; border-top:1px solid var(--tap-line); }
.studio-local-manual summary { color:#b6c9dc; font-size:13px; cursor:pointer; padding:8px 0; }
.studio-local-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; color:#b6e4dd; font-size:12px; line-height:1.6; }
.studio-local-banner[hidden] { display:none; }
.studio-local-banner button { flex-shrink:0; padding:4px 9px; border:1px solid #405b73; border-radius:6px; background:#08131f; color:#d1deeb; font:12px var(--sans); }
.studio-local-run { display:grid; gap:12px; min-width:0; color:#d1deeb; font:14px/1.65 var(--sans); }
.studio-local-run header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.studio-local-run header span { color:var(--tap-cyan); font-size:12px; }
.studio-local-run p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.studio-local-run pre { box-sizing:border-box; max-width:100%; max-height:360px; margin:0; padding:12px; overflow:auto; border:1px solid var(--tap-line); border-radius:6px; background:#050d16; color:#bdcddd; white-space:pre-wrap; overflow-wrap:anywhere; font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace; tab-size:2; }
.studio-local-run pre[hidden] { display:none; }
.studio-local-run-actions { display:flex; flex-wrap:wrap; gap:8px; }
.studio-local-run small { color:#a6b8ca; font:12px/1.65 var(--sans); }
.artifact > header { min-width:0; flex-wrap:wrap; }
#art-title { flex:1 1 160px; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.artifact-toolbar { flex:0 1 auto; flex-wrap:wrap; max-width:100%; }
body:has(.artifact.open) .studio-context-dock { display:none; }

@media (max-width:1180px) {
  .studio-context-dock { display:none; }
}
@media (max-width:720px) {
  .water-tap-workbench .chat { min-width:0; }
  .water-tap-workbench.elegant-view .welcome { width:calc(100% - 24px); margin-top:22px; }
  body.water-tap-workbench.elegant-view .studio-entry-grid { display:grid !important; grid-template-columns:1fr !important; overflow:visible !important; padding:0 !important; }
  body.water-tap-workbench.elegant-view .studio-entry { min-height:70px; width:100%; flex:auto; }
  .water-tap-workbench .composer { padding-inline:10px; }
  .terminal-setup-dialog { padding:15px; }
  .terminal-setup-dialog > footer { flex-direction:column; }
  .studio-local-pair-row { align-items:stretch; flex-direction:column; }
  .studio-local-fields { grid-template-columns:1fr; }
  #art-title { flex:none; width:100%; }
}

/* Calm reading surface: keep the full workbench, but give its primary actions room. */
body.water-tap-workbench.elegant-view nav {
  min-height:62px;
  height:62px;
  padding-inline:clamp(16px,2vw,30px);
}
body.water-tap-workbench.elegant-view .conversation-rail {
  width:264px;
  flex-basis:264px;
  padding:18px 13px 14px;
}
body.water-tap-workbench.elegant-view .rail-new {
  min-height:46px;
  padding-inline:15px;
  border-radius:11px;
  font-size:14px;
}
body.water-tap-workbench.elegant-view .rail-search {
  height:44px;
  margin-block:14px 12px;
  padding-inline:13px;
  border-radius:10px;
  font-size:13px;
}
body.water-tap-workbench.elegant-view .rail-group { margin-block:17px 8px; font-size:11px; }
body.water-tap-workbench.elegant-view .rail-thread { gap:5px; margin-block:4px; padding:12px 13px 12px 16px; border-radius:11px; font-size:14px; }
body.water-tap-workbench.elegant-view .rail-thread small { font-size:11px; }
body.water-tap-workbench.elegant-view .rail-foot { min-height:48px; font-size:11px; }
body.water-tap-workbench.elegant-view .rail-foot button { font-size:12px; }
body.water-tap-workbench.elegant-view .studio-workspace-bar {
  min-height:60px;
  gap:18px;
  padding:9px clamp(16px,2vw,28px);
  background:rgba(8,19,31,.94);
}
body.water-tap-workbench.elegant-view .studio-session-tab { gap:13px; }
body.water-tap-workbench.elegant-view .studio-session-copy { gap:4px; }
body.water-tap-workbench.elegant-view .studio-session-copy strong { font-size:15px; }
body.water-tap-workbench.elegant-view .studio-session-copy small { color:#91a9c1; font-size:11px; }
body.water-tap-workbench.elegant-view .studio-workspace-actions { gap:8px; }
body.water-tap-workbench.elegant-view .studio-workspace-action {
  min-height:40px;
  gap:8px;
  padding-inline:12px;
  border-radius:10px;
  color:#bbcee0;
  font-size:12px;
  white-space:nowrap;
}
body.water-tap-workbench.elegant-view .studio-workspace-model { color:#99eee1; }
body.water-tap-workbench.elegant-view .msgs { padding:32px clamp(20px,4vw,64px) 24px; }
body.water-tap-workbench.elegant-view .row { max-width:860px; margin-bottom:30px; }
body.water-tap-workbench.elegant-view .row.user .bubble {
  max-width:min(72%,680px);
  padding:14px 19px;
  border-radius:17px;
  font-size:16px;
  line-height:1.65;
}
body.water-tap-workbench.elegant-view .row.assistant .bubble:has(.hm-quick-run) { padding:10px 0 4px; }
body.water-tap-workbench.elegant-view .hm-quick-run { gap:15px; }
body.water-tap-workbench.elegant-view .hm-quick-result { padding:3px 0 8px; }
body.water-tap-workbench.elegant-view .hm-quick-status { color:#9ab2ca; font-size:12px; letter-spacing:.04em; }
body.water-tap-workbench.elegant-view .hm-quick-answer { color:#e2edf7; font-size:17px; line-height:1.8; }
body.water-tap-workbench.elegant-view .hm-quick-answer p { margin-bottom:16px; }
body.water-tap-workbench.elegant-view .hm-quick-next { gap:10px; margin-top:14px; }
body.water-tap-workbench.elegant-view .hm-quick-next button { min-height:40px; padding:8px 14px; border-radius:10px; font-size:13px; }
body.water-tap-workbench.elegant-view .welcome { width:min(860px,100%); max-width:860px; margin:clamp(22px,3vh,42px) auto 28px; }
body.water-tap-workbench.elegant-view .welcome::before { position:static; z-index:auto; inset:auto; width:auto; height:auto; margin-bottom:22px; background:none; filter:none; opacity:1; font-size:11px; }
body.water-tap-workbench.elegant-view .welcome h1 { max-width:760px; font-size:clamp(38px,3.7vw,54px); line-height:1.12; white-space:normal; animation:none; }
body.water-tap-workbench.elegant-view .welcome > p { max-width:700px; margin:18px 0 28px; color:#a2b6c9; font-size:16px; line-height:1.7; animation:none; }
body.water-tap-workbench.elegant-view .studio-entry-grid { gap:12px; }
body.water-tap-workbench.elegant-view .studio-entry { min-height:118px; gap:7px; padding:18px; border-radius:13px; }
body.water-tap-workbench.elegant-view .studio-entry small { font-size:11px; }
body.water-tap-workbench.elegant-view .studio-entry strong { font-size:16px; }
body.water-tap-workbench.elegant-view .studio-entry > span { color:#99aec1; font-size:13px; line-height:1.4; white-space:normal; }
body.water-tap-workbench.elegant-view .chips { margin-top:23px; }
body.water-tap-workbench.elegant-view .composer {
  padding:18px clamp(16px,3vw,42px) 19px;
  border-top:1px solid rgba(129,161,194,.1);
  background:linear-gradient(180deg,rgba(7,17,29,.93),#07111d 32%);
}
body.water-tap-workbench.elegant-view .box {
  max-width:960px;
  min-height:114px;
  gap:12px;
  padding:44px 15px 14px 17px;
  border-color:rgba(112,163,206,.36);
  border-radius:18px;
  background:#0d1b2a;
}
body.water-tap-workbench.elegant-view .box textarea { min-height:56px; padding:11px 8px; font-size:17px; }
body.water-tap-workbench.elegant-view .composer-tool { width:48px; height:48px; flex-basis:48px; border-radius:11px; }
body.water-tap-workbench.elegant-view .send { width:94px; height:50px; flex-basis:94px; border-radius:11px; font-size:15px; }
body.water-tap-workbench.elegant-view .answer-language,
body.water-tap-workbench.elegant-view .quick-delivery-format { top:10px; min-height:30px; padding:4px 10px; font-size:12px; }
body.water-tap-workbench.elegant-view .quick-delivery-format { left:280px; }
body.water-tap-workbench.elegant-view .answer-language select,
body.water-tap-workbench.elegant-view .quick-delivery-format select { font-size:12px; }
body.water-tap-workbench.elegant-view .composer-command-bar { max-width:960px; min-height:39px; margin-top:7px; font-size:11px; }
body.water-tap-workbench.elegant-view .composer-mode-button { min-height:34px; padding-inline:10px; border-radius:8px; font-size:12px; }
body.water-tap-workbench.elegant-view .composer-meta { max-width:960px; }
body.water-tap-workbench.elegant-view .hint { margin-top:3px; color:#8198ae; font-size:11px; }
body.water-tap-workbench.elegant-view .slash-command-option { min-height:44px; font-size:13px; }
body.water-tap-workbench.elegant-view .command-result { min-height:48px; font-size:14px; }
body.water-tap-workbench.elegant-view .command-result-copy strong { font-size:14px; }
body.water-tap-workbench.elegant-view .command-result-copy small { font-size:11px; }

@media (min-width:621px) {
  body.water-tap-workbench.elegant-view .answer-language { width:250px; justify-content:space-between; }
  body.water-tap-workbench.elegant-view .answer-language > span,
  body.water-tap-workbench.elegant-view .answer-language select { flex:0 0 auto; white-space:nowrap; }
}

@media (max-width:1100px) and (min-width:901px) {
  body.water-tap-workbench.elegant-view nav .logo { min-width:0; }
  body.water-tap-workbench.elegant-view nav .logo > span { display:block; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body.water-tap-workbench.elegant-view nav .nav-links { gap:5px; }
  body.water-tap-workbench.elegant-view nav .model-engine { width:180px; flex-basis:180px; padding-right:20px; }
  body.water-tap-workbench.elegant-view nav .engine-provider { overflow:hidden; font-size:11px; text-overflow:ellipsis; }
  body.water-tap-workbench.elegant-view nav .engine-model { max-width:120px; }
  body.water-tap-workbench.elegant-view .conversation-rail { width:236px; flex-basis:236px; }
  body.water-tap-workbench.elegant-view .studio-workspace-bar { gap:8px; padding-inline:14px; }
  body.water-tap-workbench.elegant-view .studio-workspace-actions { gap:5px; }
  body.water-tap-workbench.elegant-view .studio-workspace-action { padding-inline:9px; font-size:11px; }
  body.water-tap-workbench.elegant-view .studio-workspace-model { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
}
@media (max-width:960px) and (min-width:901px) {
  body.water-tap-workbench.elegant-view nav .logo > span { max-width:145px; }
  body.water-tap-workbench.elegant-view nav .model-engine { width:165px; flex-basis:165px; }
}
@media (max-width:900px) and (min-width:761px) {
  body.water-tap-workbench.elegant-view nav { min-height:64px; height:64px; padding-inline:12px; }
}
@media (max-width:760px) {
  body.water-tap-workbench.elegant-view nav { min-height:64px; height:64px; padding-inline:12px; }
  body.water-tap-workbench.elegant-view .studio-workspace-bar { min-height:56px; gap:8px; padding:7px 12px; }
  body.water-tap-workbench.elegant-view .studio-session-copy strong { max-width:24vw; font-size:13px; }
  body.water-tap-workbench.elegant-view .studio-session-copy small { font-size:10px; }
  body.water-tap-workbench.elegant-view .studio-workspace-actions { gap:5px; }
  body.water-tap-workbench.elegant-view .studio-workspace-action { min-width:38px; min-height:40px; justify-content:center; padding-inline:8px; }
  body.water-tap-workbench.elegant-view .studio-workspace-action .action-label,
  body.water-tap-workbench.elegant-view .studio-workspace-model { position:absolute; display:block; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  body.water-tap-workbench.elegant-view .studio-workspace-action kbd { display:none; }
  body.water-tap-workbench.elegant-view #command-palette-trigger::before { content:"⌘"; color:#bbcee0; font-size:17px; }
  body.water-tap-workbench.elegant-view .msgs { padding:23px 18px 18px; }
  body.water-tap-workbench.elegant-view .welcome { margin-top:26px; }
  body.water-tap-workbench.elegant-view .studio-entry { min-height:92px; }
}
@media (max-width:620px) {
  body.water-tap-workbench.elegant-view .studio-session-copy strong { max-width:20vw; }
  body.water-tap-workbench.elegant-view .studio-workspace-action { min-width:36px; min-height:38px; padding-inline:7px; }
  body.water-tap-workbench.elegant-view .msgs { padding:16px 16px 18px; }
  body.water-tap-workbench.elegant-view .row { margin-bottom:24px; }
  body.water-tap-workbench.elegant-view .row.user .bubble { max-width:88%; font-size:15px; }
  body.water-tap-workbench.elegant-view .hm-quick-answer { font-size:16px; line-height:1.7; }
  body.water-tap-workbench.elegant-view .welcome { width:100%; margin-top:22px; }
  body.water-tap-workbench.elegant-view .welcome h1 { font-size:clamp(32px,8vw,40px); }
  body.water-tap-workbench.elegant-view .welcome > p { margin:16px 0 22px; font-size:14px; }
  body.water-tap-workbench.elegant-view .studio-entry-grid { gap:9px; }
  body.water-tap-workbench.elegant-view .studio-entry { min-height:78px; padding:13px 15px; }
  body.water-tap-workbench.elegant-view .studio-entry strong { font-size:15px; }
  body.water-tap-workbench.elegant-view .studio-entry > span { font-size:12px; }
  body.water-tap-workbench.elegant-view .composer { padding:12px 11px calc(12px + env(safe-area-inset-bottom)); }
  body.water-tap-workbench.elegant-view .box { min-height:140px; grid-template-columns:44px 44px minmax(0,1fr) 80px; grid-template-rows:minmax(50px,auto) 44px; gap:8px; padding:43px 11px 11px; }
  body.water-tap-workbench.elegant-view .box textarea { min-height:50px; max-height:100px; padding:5px 3px; font-size:16px; }
  body.water-tap-workbench.elegant-view .composer-tool { width:44px; height:44px; }
  body.water-tap-workbench.elegant-view .send { width:80px; height:44px; }
  body.water-tap-workbench.elegant-view .answer-language { top:8px; left:11px; }
  body.water-tap-workbench.elegant-view .quick-delivery-format { top:8px; right:11px; left:auto; }
  body.water-tap-workbench.elegant-view .composer-command-bar { min-height:39px; }
  body.water-tap-workbench.elegant-view .composer-mode-button { min-height:34px; }
}
@media (max-width:370px) {
  body.water-tap-workbench.elegant-view .studio-session-indicator,
  body.water-tap-workbench.elegant-view .studio-session-copy small { display:none; }
  body.water-tap-workbench.elegant-view .studio-session-copy strong { max-width:17vw; }
  body.water-tap-workbench.elegant-view .studio-workspace-actions { gap:3px; }
  body.water-tap-workbench.elegant-view .studio-workspace-action { min-width:34px; min-height:38px; padding-inline:5px; }
  body.water-tap-workbench.elegant-view .composer-command-controls { width:100%; justify-content:space-between; gap:3px; }
  body.water-tap-workbench.elegant-view .composer-mode-button { padding-inline:5px; font-size:11px; white-space:nowrap; }
}
