:root {
  color-scheme: dark;
  --bg: #070d18;
  --rail: #091221;
  --surface: #0c1728;
  --surface-2: #111e31;
  --surface-3: #15243a;
  --line: rgba(153, 174, 204, .14);
  --line-strong: rgba(153, 174, 204, .24);
  --text: #f3f7fb;
  --muted: #8d9bb0;
  --faint: #58677d;
  --blue: #4c8dff;
  --blue-soft: rgba(76, 141, 255, .12);
  --green: #42d49b;
  --green-soft: rgba(66, 212, 155, .12);
  --gold: #d4b778;
  --danger: #ff6b7a;
  --font: "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  --display: "Manrope", "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, textarea, input { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(520px, 1fr) 292px;
  background:
    radial-gradient(circle at 55% -20%, rgba(48, 105, 190, .14), transparent 32%),
    var(--bg);
}

.connections-rail,
.intelligence-rail {
  height: 100vh;
  background: rgba(9, 18, 33, .96);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 4;
}
.connections-rail {
  border-right: 1px solid var(--line);
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.intelligence-rail {
  border-left: 1px solid var(--line);
  padding: 27px 22px 22px;
  overflow-y: auto;
}

.rail-brand {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 20px;
  border-bottom: 1px solid var(--line);
}
.rail-brand img { width: 126px; height: 44px; object-fit: contain; object-position: left center; }
.product-name { padding-left: 12px; border-left: 1px solid var(--line-strong); line-height: 1.05; }
.product-name span { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.product-name strong { font-family: var(--display); font-size: 20px; }

.section-kicker,
.hero-kicker {
  color: var(--blue);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.rail-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 28px 4px 13px; }
.rail-heading h2, .intel-head h2 { font-family: var(--display); font-size: 23px; letter-spacing: -.02em; margin: 6px 0 0; }
.connection-count,
.capability-title b,
.pending-details summary b {
  min-width: 25px;
  height: 22px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.connection-list { display: flex; flex-direction: column; gap: 8px; }
.connection-card {
  width: 100%;
  min-height: 76px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.connection-card:hover { background: rgba(255,255,255,.035); transform: translateX(2px); }
.connection-card.active {
  background: var(--blue-soft);
  border-color: rgba(76, 141, 255, .25);
}
.connection-logo,
.active-logo-shell {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #142238;
  border: 1px solid var(--line);
}
.connection-logo { width: 54px; height: 50px; border-radius: 11px; padding: 8px; }
.connection-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.connection-logo.logo-viabus { background: #f5fbff; padding: 5px; }
.connection-logo.logo-moglich { padding: 7px; background: #17253c; }
.connection-logo.logo-moglich img { width: 132%; height: 132%; max-width: none; max-height: none; }
.connection-logo.logo-integrarem { background: #e7ebef; padding: 6px; }
.connection-logo.logo-wisdom { background: #152235; }
.connection-logo.logo-dabi, .connection-logo.logo-soulspring, .connection-logo.logo-similcuero { background: #f3f5f8; padding: 5px; }
.connection-logo.logo-novis { background: #1b2a4a; padding: 5px; }
.connection-copy { min-width: 0; }
.connection-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; font-weight: 700; }
.connection-status { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 14px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px rgba(88,103,125,.08); }
.status-dot.configured { background: #e0a84f; }
.status-dot.connected { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-dot.error { background: var(--danger); }
.connection-arrow { width: 16px; height: 16px; color: var(--faint); }
.connection-arrow svg { width: 16px; height: 16px; }
.connection-card.active .connection-arrow { color: var(--blue); }

.rail-security {
  margin-top: auto;
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 10px;
  align-items: center;
  padding: 16px 5px 2px;
  border-top: 1px solid var(--line);
}
.rail-security svg { width: 26px; height: 26px; color: var(--green); }
.rail-security strong { display: block; font-size: 14px; }
.rail-security span { display: block; margin-top: 2px; color: var(--faint); font-size: 13px; }

.workspace { height: 100vh; min-width: 0; display: flex; flex-direction: column; }
.workspace-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 27px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 13, 24, .72);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 3;
}
.account-context { display: flex; align-items: center; gap: 12px; min-width: 0; }
.active-logo-shell { width: 48px; height: 48px; border-radius: 12px; padding: 7px; flex: 0 0 auto; }
.active-logo-shell img { max-width: 100%; max-height: 100%; object-fit: contain; }
.active-logo-shell.multi { position: relative; overflow: visible; }
.active-logo-shell.multi b { position: absolute; right: -7px; bottom: -7px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center; background: var(--blue); border: 2px solid var(--bg); color: white; font-size: 13px; }
.active-logo-shell.logo-viabus { background: #f5fbff; padding: 4px; }
.active-logo-shell.logo-integrarem { background: #e7ebef; }
.active-logo-shell.logo-moglich { background: #17253c; padding: 6px; }
.active-logo-shell.logo-moglich img { width: 132%; height: 132%; max-width: none; max-height: none; }
.active-logo-shell.logo-wisdom { background: #152235; }
.active-logo-shell.logo-dabi, .active-logo-shell.logo-soulspring, .active-logo-shell.logo-similcuero { background: #f3f5f8; padding: 4px; }
.active-logo-shell.logo-novis { background: #1b2a4a; padding: 4px; }
.account-context h1 { margin: 4px 0 0; font-family: var(--display); font-size: 22px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.readonly-badge {
  height: 31px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.readonly-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.icon-button,
.mobile-menu {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-button:hover, .mobile-menu:hover { border-color: var(--line-strong); background: var(--surface-2); }
.icon-button svg, .mobile-menu svg { width: 17px; height: 17px; color: var(--muted); }
.mobile-menu { display: none; }

.specialist-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 18, 33, .5);
  overflow: hidden;
}
.specialist-copy { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; flex: 0 0 auto; }
.specialist-copy svg { width: 14px; height: 14px; color: var(--blue); }
.specialist-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.specialist-tabs::-webkit-scrollbar { display: none; }
.specialist-tab {
  height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.specialist-tab:hover { color: var(--text); background: rgba(255,255,255,.035); }
.specialist-tab.active { color: #dce9ff; background: var(--blue-soft); border-color: rgba(76,141,255,.22); }

.chat-stage { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 32px max(24px, calc((100% - 790px) / 2)) 20px; scroll-behavior: smooth; }
.empty-state { max-width: 700px; margin: 5vh auto 20px; text-align: center; }
.copilot-mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  position: relative;
}
.copilot-mark::before {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 23px;
  background: linear-gradient(145deg, #2c6fd7, #4b8fff);
  box-shadow: 0 16px 46px rgba(51, 119, 226, .28), inset 0 1px rgba(255,255,255,.25);
  transform: rotate(45deg);
}
.copilot-mark svg { position: relative; width: 37px; height: 37px; color: #fff; z-index: 2; stroke-width: 1.35; }
.mark-ring { position: absolute; border: 1px solid rgba(76,141,255,.2); border-radius: 50%; }
.ring-a { inset: 3px; }
.ring-b { inset: 11px; border-color: rgba(76,141,255,.12); }
.empty-state h2 { margin: 10px 0 11px; font-family: var(--display); font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -.045em; line-height: 1.16; }
.empty-state h2 span { color: #a9c7ff; }
.empty-state > p { max-width: 570px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.65; }
.suggestion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 29px; }
.suggestion {
  min-width: 0;
  width: 100%;
  min-height: 66px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 24, 41, .58);
  display: grid;
  grid-template-columns: 27px 1fr 15px;
  gap: 9px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.suggestion:hover { border-color: rgba(76,141,255,.3); background: rgba(17,31,52,.8); transform: translateY(-1px); }
.suggestion .suggestion-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.suggestion .suggestion-icon svg { width: 14px; height: 14px; }
.suggestion strong { min-width: 0; font-size: 15px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.suggestion > svg { width: 14px; height: 14px; color: var(--faint); }

.messages { max-width: 790px; margin: 0 auto; }
.message { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 13px; padding: 12px 0 23px; }
.message + .message { border-top: 1px solid rgba(153,174,204,.08); padding-top: 23px; }
.assistant-avatar,
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.assistant-avatar { background: linear-gradient(145deg, #2865c5, #4c8dff); box-shadow: 0 8px 22px rgba(42,100,193,.18); }
.assistant-avatar svg { width: 19px; height: 19px; color: #fff; }
.user-avatar { background: var(--surface-3); color: #b8c3d2; font-family: var(--display); font-size: 14px; font-weight: 800; }
.message-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.message-head strong { font-family: var(--display); font-size: 16px; }
.message-head span { color: var(--faint); font-size: 13px; }
.message-body { color: #d9e2ef; font-size: 17px; line-height: 1.72; overflow-wrap: anywhere; }
.message.user .message-body { color: #f0f4fa; }
.message-body p { margin: 0 0 11px; }
.message-body p:last-child { margin-bottom: 0; }
.message-body h2, .message-body h3, .message-body h4 { font-family: var(--display); color: var(--text); margin: 20px 0 8px; line-height: 1.3; }
.message-body h2 { font-size: 22px; }.message-body h3 { font-size: 20px; }.message-body h4 { font-size: 17px; }
.message-body ul, .message-body ol { padding-left: 20px; margin: 9px 0 13px; }
.message-body li { margin: 4px 0; }
.message-body strong { color: #fff; font-weight: 700; }
.message-body code { background: rgba(255,255,255,.055); color: #b7d0ff; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: .9em; }
.message-body pre { overflow-x: auto; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #07101c; }
.message-body pre code { background: none; border: 0; padding: 0; color: #c3d2e5; }
.message-table-wrap { overflow-x: auto; margin: 13px 0; border: 1px solid var(--line); border-radius: 10px; }
.message-body table { width: 100%; border-collapse: collapse; min-width: 520px; }
.message-body th, .message-body td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 9px 11px; font-size: 15px; }
.message-body th { color: #fff; background: rgba(255,255,255,.035); }
.evidence-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.evidence-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid rgba(66,212,155,.18); border-radius: 7px; background: rgba(66,212,155,.055); color: #8ee6c4; font-size: 13px; }
.evidence-chip svg { width: 11px; height: 11px; }

.thinking { max-width: 790px; margin: 0 auto; display: grid; grid-template-columns: 36px 1fr; gap: 13px; padding: 22px 0; border-top: 1px solid rgba(153,174,204,.08); }
.thinking[hidden] { display: none; }
.assistant-avatar.mini { width: 36px; height: 36px; }
.thinking-copy { align-self: center; display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 14px; }
.thinking-dots { display: flex; gap: 4px; }
.thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); animation: pulse 1.2s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }.thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%,70%,100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }

.composer-zone { padding: 10px max(24px, calc((100% - 790px) / 2)) 15px; background: linear-gradient(180deg, rgba(7,13,24,0), var(--bg) 17%); }
.composer {
  max-width: 790px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(14, 25, 43, .94);
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.composer:focus-within { border-color: rgba(76,141,255,.45); box-shadow: 0 18px 50px rgba(0,0,0,.25), 0 0 0 3px rgba(76,141,255,.06); }
.composer textarea { width: 100%; max-height: 150px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); padding: 15px 17px 6px; font-size: 17px; line-height: 1.55; }
.composer textarea::placeholder { color: #66758a; }
.composer-footer { min-height: 45px; padding: 6px 8px 8px 15px; display: flex; align-items: center; justify-content: space-between; }
.composer-hint { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; }
.composer-hint svg { width: 13px; height: 13px; color: var(--green); }
.send-button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--blue); color: white; display: grid; place-items: center; cursor: pointer; transition: background .18s, transform .18s; }
.send-button:hover { background: #64a0ff; transform: translateY(-1px); }
.send-button:disabled { opacity: .42; cursor: wait; transform: none; }
.send-button svg { width: 16px; height: 16px; }
.legal-line { max-width: 790px; margin: 7px auto 0; color: #4e5c70; text-align: center; font-size: 13px; }

.intel-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.intel-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.capability-section { padding: 21px 0 5px; }
.capability-title { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .11em; font-weight: 800; margin-bottom: 8px; }
.capability-list { display: flex; flex-direction: column; }
.capability-item { display: grid; grid-template-columns: 27px 1fr 14px; gap: 9px; align-items: center; padding: 10px 3px; border-top: 1px solid rgba(153,174,204,.09); }
.capability-icon { width: 27px; height: 27px; border-radius: 8px; background: var(--blue-soft); display: grid; place-items: center; color: var(--blue); }
.capability-icon svg { width: 13px; height: 13px; }
.capability-item strong { display: block; font-size: 14px; }
.capability-item span { display: block; color: var(--faint); margin-top: 2px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.capability-check { width: 13px; height: 13px; color: var(--green); }
.transversal-section { padding-top: 18px; }
.transversal-list { display: flex; flex-direction: column; gap: 7px; }
.transversal-item { display: flex; align-items: center; gap: 8px; min-height: 31px; color: #b6c2d2; font-size: 13px; }
.transversal-item i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.pending-details { margin-top: 20px; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pending-details summary { min-height: 48px; list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 24px 16px; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.pending-details summary::-webkit-details-marker { display: none; }
.pending-details summary svg { width: 15px; height: 15px; color: var(--faint); transition: transform .18s; }
.pending-details[open] summary svg { transform: rotate(180deg); }
.pending-list { padding: 0 0 10px 2px; display: flex; flex-direction: column; gap: 7px; color: var(--faint); font-size: 13px; }
.pending-list span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); vertical-align: 2px; margin-right: 8px; }
.intel-note { margin-top: 22px; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.note-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(212,183,120,.09); color: var(--gold); }
.note-icon svg { width: 15px; height: 15px; }
.intel-note strong { display: block; font-size: 13px; }
.intel-note p { margin: 4px 0 0; color: var(--faint); font-size: 13px; line-height: 1.45; }

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(48,105,190,.22), transparent 35%),
    rgba(5, 10, 19, .97);
  backdrop-filter: blur(18px);
  transition: opacity .25s, visibility .25s;
}
.access-gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-card { width: min(410px, 100%); padding: 32px 34px 25px; border: 1px solid var(--line-strong); border-radius: 19px; background: rgba(12,23,40,.96); box-shadow: 0 28px 90px rgba(0,0,0,.42); text-align: center; }
.gate-logo { width: 156px; height: 60px; object-fit: contain; margin-bottom: 22px; }
.gate-mark { width: 54px; height: 54px; margin: 0 auto 17px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, #2c6fd7, #4b8fff); box-shadow: 0 12px 35px rgba(51,119,226,.25); }
.gate-mark svg { width: 25px; height: 25px; }
.gate-card h2 { margin: 7px 0 7px; font-family: var(--display); font-size: 31px; letter-spacing: -.035em; }
.gate-card > p { margin: 0 auto 23px; max-width: 300px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.gate-card form { text-align: left; }
.gate-card label { color: #bcc7d6; font-size: 13px; font-weight: 700; }
.pin-wrap { height: 48px; margin-top: 7px; display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 11px; background: #0a1424; overflow: hidden; }
.pin-wrap:focus-within { border-color: rgba(76,141,255,.5); box-shadow: 0 0 0 3px rgba(76,141,255,.06); }
.pin-wrap input { min-width: 0; flex: 1; height: 100%; padding: 0 14px; border: 0; outline: 0; background: transparent; color: white; letter-spacing: .24em; }
.pin-wrap button { width: 46px; height: 100%; border: 0; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.pin-wrap button svg { width: 17px; height: 17px; }
.gate-error { min-height: 17px; margin: 5px 0 0; color: var(--danger); font-size: 13px; }
.gate-submit { width: 100%; height: 45px; margin-top: 4px; border: 0; border-radius: 11px; background: var(--blue); color: white; font-weight: 700; font-size: 15px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 9px; }
.gate-submit:hover { background: #64a0ff; }.gate-submit:disabled { opacity: .55; cursor: wait; }
.gate-submit svg { width: 15px; height: 15px; }
.gate-card > small { display: block; margin-top: 19px; color: var(--faint); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 16px); opacity: 0; visibility: hidden; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: #121f32; color: #d9e3f0; box-shadow: 0 12px 35px rgba(0,0,0,.32); font-size: 14px; transition: .2s; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.rail-scrim { display: none; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 266px minmax(500px, 1fr); }
  .intelligence-rail { display: none; }
}

@media (max-width: 820px) {
  html, body, .app-shell, .workspace, .chat-stage, .chat-scroll, .composer-zone { width: 100%; max-width: 100%; min-width: 0; }
  body { overflow: hidden; }
  .app-shell { display: block; }
  .workspace { height: 100vh; }
  .connections-rail { position: fixed; left: 0; top: 0; bottom: 0; width: min(310px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 18px 0 45px rgba(0,0,0,.35); }
  .app-shell.rail-open .connections-rail { transform: translateX(0); }
  .rail-scrim { position: fixed; inset: 0; z-index: 3; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
  .rail-scrim:not([hidden]) { display: block; }
  .mobile-menu { display: grid; }
  .workspace-header { min-height: 72px; padding: 10px 16px; }
  .active-logo-shell { width: 42px; height: 42px; }
  .readonly-badge { display: none; }
  .specialist-bar { width: 100%; max-width: 100vw; padding: 0 16px; }
  .specialist-tabs { min-width: 0; }
  .specialist-copy span { display: none; }
  .chat-scroll { padding: 25px 17px 15px; }
  .composer-zone { padding: 8px 14px 11px; }
  .composer { width: 100%; max-width: 100%; }
  .empty-state { width: 100%; max-width: 100%; margin-top: 2vh; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .message { grid-template-columns: 32px minmax(0,1fr); gap: 10px; }
  .assistant-avatar, .user-avatar { width: 32px; height: 32px; }
}

@media (max-width: 520px) {
  .workspace-header { gap: 9px; }
  .account-context { gap: 9px; }
  .account-context h1 { max-width: 155px; font-size: 18px; }
  .active-logo-shell { width: 39px; height: 39px; border-radius: 10px; }
  .empty-state h2 { font-size: 31px; }
  .empty-state > p { font-size: 16px; }
  .copilot-mark { width: 78px; height: 78px; margin-bottom: 19px; }
  .suggestion-grid { margin-top: 22px; }
  .composer-hint { display: none; }
  .composer-footer { justify-content: flex-end; }
  .gate-card { padding: 27px 23px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
