:root {
  --bg: #070813;
  --bg-2: #0d1020;
  --panel: rgba(18, 14, 31, 0.78);
  --panel-2: rgba(13, 15, 27, 0.92);
  --line: rgba(179, 164, 226, 0.18);
  --line-strong: rgba(179, 164, 226, 0.34);
  --text: #f7f5ff;
  --muted: #aaa3b8;
  --soft: #756d82;
  --violet: #a985ff;
  --cyan: #55dce9;
  --teal: #3eb9c8;
  --white: #f3f1f7;
  --shadow: 0 36px 120px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(117, 63, 170, 0.28), transparent 30%),
    radial-gradient(circle at 94% 22%, rgba(47, 114, 140, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(19, 10, 31, 0.96), rgba(4, 8, 16, 0.96)),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.052) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.42));
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(85, 220, 233, 0.78);
  outline-offset: 3px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 88px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 19, 0.72);
  backdrop-filter: blur(18px);
}

.brand-link,
.site-nav button,
.demo-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  font-size: 25px;
  font-weight: 760;
}

.brand-glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, var(--violet), var(--cyan)) border-box;
  border: 2px solid transparent;
  position: relative;
}

.brand-glyph::before,
.brand-glyph::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 21px;
  border: 3px solid transparent;
  border-bottom-color: var(--cyan);
  border-left-color: var(--violet);
  border-radius: 0 0 10px 10px;
}

.brand-glyph::before {
  left: 8px;
}

.brand-glyph::after {
  right: 8px;
  transform: rotate(180deg);
  border-left-color: var(--cyan);
  border-bottom-color: var(--violet);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 54px);
  color: var(--muted);
  font-size: 21px;
  white-space: nowrap;
}

.site-nav button {
  color: var(--muted);
  padding: 10px 0;
}

.site-nav button:hover {
  color: var(--text);
}

.demo-button {
  justify-self: end;
  color: #161520;
  background: var(--white);
  border-radius: 999px;
  padding: 16px 28px;
  font-size: 20px;
  font-weight: 650;
}

.view {
  animation: viewIn 180ms ease-out;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section {
  min-height: calc(100vh - 88px);
  position: relative;
  overflow: hidden;
  padding: clamp(58px, 7vw, 112px) clamp(28px, 5vw, 72px) clamp(56px, 7vw, 100px);
}

.network-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(108, 74, 180, 0.08), transparent 46%),
    linear-gradient(300deg, rgba(70, 179, 199, 0.1), transparent 42%);
}

.network-field::before {
  content: "";
  position: absolute;
  inset: 16% 12% 8% 18%;
  opacity: 0.35;
  background:
    linear-gradient(28deg, transparent 0 46%, rgba(85, 220, 233, 0.24) 46.2% 46.5%, transparent 46.7%),
    linear-gradient(145deg, transparent 0 52%, rgba(169, 133, 255, 0.2) 52.2% 52.5%, transparent 52.7%),
    linear-gradient(92deg, transparent 0 60%, rgba(85, 220, 233, 0.18) 60.2% 60.5%, transparent 60.7%);
}

.node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 18px rgba(85, 220, 233, 0.48);
  opacity: 0.78;
}

.n1 { top: 18%; left: 39%; }
.n2 { top: 28%; left: 50%; }
.n3 { top: 36%; left: 74%; width: 10px; height: 10px; }
.n4 { top: 52%; left: 68%; }
.n5 { top: 63%; left: 90%; width: 10px; height: 10px; }
.n6 { top: 78%; left: 52%; }
.n7 { top: 83%; left: 74%; }
.n8 { top: 42%; left: 94%; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.announce-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 10px 18px;
  font-size: 19px;
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.03);
}

.announce-pill span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--violet);
  box-shadow: 0 0 16px rgba(169, 133, 255, 0.8);
}

.hero-content h1 {
  margin: 58px 0 0;
  max-width: 1000px;
  color: var(--text);
  font-size: clamp(72px, 8.2vw, 122px);
  line-height: 0.98;
  font-weight: 520;
  letter-spacing: 0;
}

.hero-content h1 span {
  color: transparent;
  background: linear-gradient(92deg, var(--violet), #8fb9ff 46%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: 700;
}

.hero-content p {
  max-width: 960px;
  margin: 42px 0 0;
  color: var(--muted);
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 52px;
}

.light-button,
.dark-button {
  min-height: 58px;
  border-radius: 999px;
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
}

.light-button {
  border: 1px solid transparent;
  color: #15131f;
  background: var(--white);
}

.dark-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.light-button.small,
.dark-button.small {
  min-height: 46px;
  padding: 0 22px;
  font-size: 16px;
}

.light-button.wide {
  width: 100%;
}

.light-button:disabled {
  cursor: not-allowed;
  color: #dbd7e5;
  background: rgba(255, 255, 255, 0.12);
}

.surface-section {
  min-height: 100vh;
  padding: 104px clamp(28px, 5vw, 72px) 82px;
  position: relative;
}

.surface-kicker {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 64px;
  color: var(--soft);
  font-size: 19px;
  letter-spacing: 0.08em;
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px;
}

.surface-card {
  min-height: 690px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(13, 9, 23, 0.86);
  padding: clamp(32px, 4vw, 66px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.sdlc-card {
  border-color: rgba(169, 133, 255, 0.64);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(85, 220, 233, 0.2);
}

.insights-card {
  border-color: rgba(255, 255, 255, 0.1);
}

.card-arrow {
  position: absolute;
  right: 52px;
  top: 56px;
  color: var(--soft);
  font-size: 32px;
}

.card-index {
  margin: 0 0 42px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-index.violet {
  color: var(--violet);
}

.card-index.cyan {
  color: var(--cyan);
}

.surface-card h2 {
  margin: 0;
  max-width: 760px;
  color: var(--text);
  font-size: clamp(48px, 5vw, 78px);
  line-height: 1.04;
  font-weight: 500;
}

.surface-card > p:not(.card-index) {
  max-width: 780px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(22px, 2vw, 31px);
  line-height: 1.45;
}

.role-stack {
  position: relative;
  width: min(560px, 100%);
  height: 250px;
  margin-top: 54px;
}

.role-stack span,
.role-stack strong,
.role-stack em {
  position: absolute;
  min-width: 170px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 13px 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
  font-size: 19px;
  font-style: normal;
}

.role-stack span:nth-child(1) { top: 0; left: 52px; }
.role-stack span:nth-child(2) { top: 62px; left: 52px; }
.role-stack span:nth-child(3) { top: 124px; left: 52px; }
.role-stack span:nth-child(4) { top: 186px; left: 52px; }
.role-stack strong {
  right: 0;
  top: 92px;
  color: var(--text);
  border-color: rgba(169, 133, 255, 0.7);
}
.role-stack strong::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 14px;
  border-radius: 99px;
  background: var(--teal);
}
.role-stack em {
  right: 0;
  top: 174px;
}

.floating-stack {
  position: relative;
  height: 250px;
  margin-top: 90px;
}

.floating-stack span {
  position: absolute;
  left: 16%;
  right: 8%;
  height: 74px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  transform: rotate(-7deg);
  font-size: 21px;
  font-weight: 720;
}

.floating-stack span:nth-child(1) {
  top: 14px;
  background: rgba(159, 100, 40, 0.33);
}

.floating-stack span:nth-child(2) {
  top: 60px;
  border-color: rgba(85, 220, 233, 0.45);
  background: rgba(54, 96, 95, 0.42);
}

.floating-stack span:nth-child(3) {
  top: 106px;
  border-color: rgba(169, 133, 255, 0.62);
  background: rgba(70, 48, 116, 0.62);
}

.surface-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}


.tag-row {
  position: absolute;
  left: clamp(32px, 4vw, 66px);
  right: clamp(32px, 4vw, 66px);
  bottom: 20px;

  display: flex;
  flex-wrap: nowrap;      
  justify-content: center; 
  align-items: center;
  gap: 12px;

  z-index: 2;
  overflow-x: auto;     
}
.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  padding: 10px 18px;
  font-size: 16px;
}

.workflow-shell {
  padding: 42px clamp(28px, 5vw, 72px) 80px;
}

.workflow-header,
.coming-panel,
.launch-panel,
.status-panel,
.pipeline-panel,
.log-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workflow-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 850;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-header h1,
.coming-panel h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(36px, 5vw, 78px);
  line-height: 1;
  font-weight: 520;
}

.model-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.model-strip span,
.pill,
.status-badge {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge {
  color: var(--cyan);
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
  gap: 22px;
  align-items: stretch;
}

.launch-panel,
.status-panel,
.pipeline-panel,
.log-panel {
  padding: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span,
.toggle span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(4, 5, 14, 0.78);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
}

.field input::placeholder {
  color: #766f82;
}

.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(85, 220, 233, 0.12);
}

.upload-zone {
  position: relative;
  margin-bottom: 14px;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-zone label {
  min-height: 168px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 24px;
  border: 1px dashed rgba(85, 220, 233, 0.48);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(169, 133, 255, 0.12), rgba(85, 220, 233, 0.07)),
    rgba(4, 5, 14, 0.62);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-zone label:hover,
.upload-zone.dragging label {
  border-color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(169, 133, 255, 0.18), rgba(85, 220, 233, 0.13)),
    rgba(4, 5, 14, 0.72);
  transform: translateY(-1px);
}

.upload-zone input:focus-visible + label {
  outline: 2px solid rgba(85, 220, 233, 0.78);
  outline-offset: 3px;
}

.upload-zone strong {
  font-size: 19px;
}

.upload-zone em {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 220, 233, 0.45);
  border-radius: 16px;
  color: var(--cyan);
  background: rgba(85, 220, 233, 0.08);
}

.selected-files {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
  padding: 11px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  line-height: 1.35;
}

.selected-files strong {
  color: var(--text);
}

.field.compact {
  max-width: 160px;
  margin-bottom: 0;
}

.control-row {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #4f4861;
  position: relative;
  transition: background 160ms ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #edeaf4;
  transition: transform 160ms ease;
}

.toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.form-note {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-shell {
  width: 100%;
  height: 11px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  overflow: hidden;
}

.progress-value {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  border-radius: 999px;
  transition: width 260ms ease;
}

.stage-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 18px;
  color: var(--muted);
}

.stage-line strong {
  color: var(--text);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.metric strong {
  color: var(--text);
  font-size: 20px;
}

.download-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.sap-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.sap-option-card {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.sap-option-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.02;
  font-weight: 520;
}

.sap-option-card p:not(.card-index) {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.42;
}

.pipeline-panel,
.log-panel {
  margin-top: 22px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.pipeline-step {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  background: rgba(255, 255, 255, 0.035);
  position: relative;
  overflow: hidden;
}

.pipeline-step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

.pipeline-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pipeline-step strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.pipeline-step.done,
.pipeline-step.active {
  border-color: rgba(85, 220, 233, 0.52);
  background: rgba(85, 220, 233, 0.08);
}

.log-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
}

.log-item,
.empty-log {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px 14px;
}

.log-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.log-message {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.log-item.error {
  border-color: rgba(255, 111, 90, 0.5);
  background: rgba(255, 111, 90, 0.1);
}

.log-item.warning {
  border-color: rgba(255, 191, 96, 0.5);
  background: rgba(255, 191, 96, 0.1);
}

.log-item.success {
  border-color: rgba(85, 220, 233, 0.52);
  background: rgba(85, 220, 233, 0.08);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.coming-view {
  min-height: calc(100vh - 88px);
  padding: 42px clamp(28px, 5vw, 72px) 80px;
}

.coming-panel {
  min-height: 560px;
  display: grid;
  align-content: center;
  padding: clamp(32px, 6vw, 86px);
}

.coming-panel p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 28px;
  line-height: 1.45;
}

/* ===================== Chat view ===================== */

.chat-view {
  min-height: calc(100vh - 88px);
}

.chat-shell {
  padding: 32px clamp(24px, 4vw, 56px) 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 88px);
}

.chat-header {
  margin-bottom: 0;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--soft);
  box-shadow: 0 0 0 0 transparent;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.conn-pill[data-state="open"] .conn-dot {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(85, 220, 233, 0.65);
}

.conn-pill[data-state="connecting"] .conn-dot {
  background: var(--violet);
  animation: connPulse 1.2s ease-in-out infinite;
}

.conn-pill[data-state="error"] .conn-dot {
  background: #ff6f5a;
  box-shadow: 0 0 12px rgba(255, 111, 90, 0.6);
}

@keyframes connPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.chat-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  animation: viewIn 200ms ease-out;
}

.chat-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--violet);
  margin-top: 1px;
}

.chat-banner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text);
}

.chat-banner.error {
  border-color: rgba(255, 111, 90, 0.55);
  background: rgba(255, 111, 90, 0.10);
  color: #ffd6cf;
}

.chat-banner.error svg {
  color: #ff8a78;
}

.chat-banner.warn {
  border-color: rgba(255, 191, 96, 0.5);
  background: rgba(255, 191, 96, 0.08);
  color: #ffe2b5;
}

.chat-banner.warn svg {
  color: #ffbf60;
}

.chat-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 22px;
  min-height: 0;
}

.files-panel,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.files-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.files-intro {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-upload-zone label {
  min-height: 150px;
  padding: 20px;
  gap: 8px;
}

.chat-upload-zone label strong {
  font-size: 16px;
}

.chat-upload-zone label em {
  font-size: 12px;
  max-width: 260px;
}

.chat-choose-files {
  width: 100%;
  justify-content: center;
}

.uploaded-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1;
}

.uploaded-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.uploaded-head strong {
  color: var(--text);
  font-size: 12px;
}

.uploaded-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.empty-files {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  text-align: center;
}

.uploaded-file {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  animation: viewIn 220ms ease-out;
}

.uploaded-file__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(169, 133, 255, 0.22), rgba(85, 220, 233, 0.18));
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.uploaded-file__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.uploaded-file__name {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uploaded-file__sub {
  color: var(--muted);
  font-size: 11px;
}

.uploaded-file__actions {
  display: flex;
  gap: 6px;
}

.uploaded-file__action {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.uploaded-file__action:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.uploaded-file__action svg {
  width: 14px;
  height: 14px;
}

.uploaded-file.uploading {
  opacity: 0.78;
}

.uploaded-file__progress {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 2px;
}

.uploaded-file__progress span {
  display: block;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  animation: uploadBar 1.6s ease-in-out infinite;
}

@keyframes uploadBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

.uploaded-file.error {
  border-color: rgba(255, 111, 90, 0.45);
  background: rgba(255, 111, 90, 0.08);
}

.files-note {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.4;
}

/* ----- Chat panel ----- */

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px clamp(18px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 20px;
  scroll-behavior: smooth;
}

.messages::-webkit-scrollbar,
.uploaded-files::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb,
.uploaded-files::-webkit-scrollbar-thumb {
  background: rgba(179, 164, 226, 0.18);
  border-radius: 999px;
}

.chat-empty {
  margin: auto;
  max-width: 480px;
  text-align: center;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 40px 20px;
}

.chat-empty-glyph {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(169, 133, 255, 0.16), rgba(85, 220, 233, 0.12));
  color: var(--cyan);
}

.chat-empty-glyph svg {
  width: 26px;
  height: 26px;
}

.chat-empty h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
}

.chat-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: min(720px, 92%);
  animation: msgIn 220ms ease-out;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg__bubble {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg__meta {
  font-size: 11px;
  color: var(--soft);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-msg--user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg--user .chat-msg__bubble {
  border-color: rgba(169, 133, 255, 0.55);
  background:
    linear-gradient(135deg, rgba(169, 133, 255, 0.34), rgba(120, 86, 215, 0.42));
  color: var(--text);
  border-bottom-right-radius: 6px;
}

.chat-msg--assistant {
  align-self: flex-start;
}

.chat-msg--assistant .chat-msg__bubble {
  border-bottom-left-radius: 6px;
}

/* ----- Streaming turn container ----- */

.chat-turn {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(720px, 92%);
  animation: msgIn 220ms ease-out;
}

.chat-turn__ticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-turn__ticker .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(85, 220, 233, 0.7);
  animation: connPulse 1.1s ease-in-out infinite;
}

/* ----- Processing steps ----- */

.processing-steps {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: border-color 200ms ease, background 200ms ease;
}

.processing-steps__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.processing-steps__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.processing-steps__title::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(169, 133, 255, 0.22);
  border-top-color: var(--violet);
  box-shadow: none;
  background: transparent;
  flex-shrink: 0;
}

.processing-steps[data-state="streaming"] .processing-steps__title::before {
  animation: stepSpin 0.85s linear infinite;
}

.processing-steps[data-state="done"] .processing-steps__title::before {
  border-color: var(--cyan);
  animation: none;
}

.processing-steps__count {
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
}

/* Latest tool-call label shown next to the header while the agent runs
   (e.g. "Calling ToolSearch"). One-line ellipsis so the header height
   stays fixed. Hidden once the final answer renders. */
.processing-steps__latest {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.processing-steps__latest:empty {
  display: none;
}

.processing-steps__toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.processing-steps__toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.processing-steps__toggle .chev {
  display: inline-block;
  transition: transform 220ms ease;
}

.processing-steps[data-expanded="false"] .processing-steps__toggle .chev {
  transform: rotate(-90deg);
}

.processing-steps__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px 14px;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: max-height 360ms ease, opacity 220ms ease, padding 220ms ease;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 164, 226, 0.28) transparent;
}

/* Every step lives on its own row. With-text steps stretch full width;
   no-text steps render as compact chips that don't fill the row. */
.processing-step {
  width: 100%;
}

.processing-step--inline {
  width: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  grid-template-columns: unset;
  padding: 4px 10px 4px 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* Text-only step: no icon column, no header -- the text box fills the row.
   The first child has no top margin since there's nothing above it. */
.processing-step--text-only {
  display: block;
  grid-template-columns: unset;
  width: 100%;
}

.processing-step--text-only > .processing-step__commentary-body {
  margin-top: 0;
}

.processing-step--inline .processing-step__icon {
  width: 22px;
  height: 22px;
}

.processing-step--inline .processing-step__icon svg {
  width: 11px;
  height: 11px;
}

.processing-step--inline .processing-step__body {
  display: inline-flex;
  align-items: center;
}

.processing-step--inline .processing-step__title {
  margin: 0;
}

.processing-steps__list::-webkit-scrollbar {
  width: 8px;
}

.processing-steps__list::-webkit-scrollbar-thumb {
  background: rgba(179, 164, 226, 0.22);
  border-radius: 999px;
}

.processing-steps__list::-webkit-scrollbar-thumb:hover {
  background: rgba(179, 164, 226, 0.38);
}

.processing-steps[data-expanded="false"] .processing-steps__list {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.processing-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  animation: msgIn 200ms ease-out;
}

.processing-step__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(169, 133, 255, 0.16), rgba(85, 220, 233, 0.10));
  color: var(--violet);
  flex-shrink: 0;
  position: relative;
}

.processing-step__icon svg { width: 14px; height: 14px; }

/* Spinner ring -- revolves around the search icon while the tool is in
   flight. attachToolResult swaps --spinning for --done to freeze it. */
.processing-step__spinner {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: rgba(85, 220, 233, 0.35);
  pointer-events: none;
  display: none;
}

.processing-step__icon--spinning .processing-step__spinner {
  display: block;
  animation: stepSpin 0.85s linear infinite;
}

.processing-step__icon--done .processing-step__spinner {
  display: none;
}

@keyframes stepSpin {
  to { transform: rotate(360deg); }
}

.processing-step--result .processing-step__icon { color: var(--cyan); }
.processing-step--commentary .processing-step__icon {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.processing-step--error .processing-step__icon {
  border-color: rgba(255, 111, 90, 0.5);
  background: rgba(255, 111, 90, 0.12);
  color: #ff8a78;
}

.processing-step__body { min-width: 0; }

.processing-step__title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.processing-step__badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet);
  border: 1px solid rgba(169, 133, 255, 0.45);
  background: rgba(169, 133, 255, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
}

.processing-step--result .processing-step__badge {
  color: var(--cyan);
  border-color: rgba(85, 220, 233, 0.45);
  background: rgba(85, 220, 233, 0.10);
}

.processing-step--commentary .processing-step__badge {
  color: var(--muted);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.processing-step--error .processing-step__badge {
  color: #ff8a78;
  border-color: rgba(255, 111, 90, 0.5);
  background: rgba(255, 111, 90, 0.12);
}

.processing-step--tool .processing-step__badge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.processing-step__summary {
  color: var(--muted);
  font-weight: 500;
}

.processing-step__commentary-body {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);

  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  width: 500px;
}

.processing-step__commentary-body p {
  margin: 0 0 6px;
  
}

.processing-step__commentary-body p:last-child {
  margin-bottom: 0;
}

.processing-step__commentary-body pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  overflow-x: auto;
}

.processing-step__details {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.processing-step__details summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 10px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.processing-step__details summary::-webkit-details-marker { display: none; }

.processing-step__details pre {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  color: #cdd5e1;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow: auto;
}

/* ----- Final answer ----- */

.final-answer {
  border: 1px solid rgba(85, 220, 233, 0.42);
  border-radius: 18px;
  padding: 16px 18px;
  background:
    linear-gradient(160deg, rgba(85, 220, 233, 0.10), rgba(169, 133, 255, 0.08)),
    rgba(13, 9, 23, 0.75);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.final-answer__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.final-answer__label svg { width: 14px; height: 14px; }

.final-answer__body p { margin: 0 0 0.7em; }
.final-answer__body p:last-child { margin-bottom: 0; }
.final-answer__body pre {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.45;
}
.final-answer__body code {
  background: rgba(0, 0, 0, 0.42);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.8px;
  color: #e8d8a8;
}
.final-answer__body pre code { background: none; padding: 0; color: inherit; }
.final-answer__body table {
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 13px;
}
.final-answer__body th,
.final-answer__body td {
  border: 1px solid var(--line);
  padding: 6px 10px;
  text-align: left;
}
.final-answer__body th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.final-answer__body blockquote {
  border-left: 3px solid var(--violet);
  margin: 0 0 0.6em;
  padding-left: 12px;
  color: var(--muted);
}
.final-answer__body h1,
.final-answer__body h2,
.final-answer__body h3 {
  margin: 0.5em 0 0.3em;
  font-weight: 600;
  color: var(--text);
}
.final-answer__body ul,
.final-answer__body ol {
  margin: 0 0 0.6em;
  padding-left: 20px;
}

.chat-turn__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--soft);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-turn__error {
  border: 1px solid rgba(255, 111, 90, 0.5);
  background: rgba(255, 111, 90, 0.10);
  color: #ffc6bd;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
}

/* ----- Composer ----- */

.chat-composer {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 14px clamp(18px, 3vw, 24px);
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 19, 0.55);
}

.chat-composer textarea {
  flex: 1;
  resize: none;
  min-height: 48px;
  max-height: 180px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(4, 5, 14, 0.78);
  color: var(--text);
  padding: 14px 18px;
  outline: none;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  overflow-y: hidden;
}

.chat-composer textarea::placeholder { color: #766f82; }

.chat-composer textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(169, 133, 255, 0.14);
}

.chat-send-button {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #15131f;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: 0 12px 28px rgba(169, 133, 255, 0.32);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.chat-send-button svg {
  width: 20px;
  height: 20px;
  stroke: #15131f;
  fill: none;
}

.chat-send-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(169, 133, 255, 0.4);
}

.chat-send-button:disabled {
  filter: grayscale(0.4);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.composer-hint {
  margin: 0;
  padding: 0 clamp(18px, 3vw, 24px) 14px;
  color: var(--soft);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.composer-hint kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--muted);
}

.chat-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: rgba(13, 15, 27, 0.94);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 80;
}

.chat-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.chat-toast.error {
  border-color: rgba(255, 111, 90, 0.55);
  color: #ffd6cf;
}

@media (max-width: 1100px) {
  .chat-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: 60vh;
  }
}

@media (max-width: 720px) {
  .chat-shell {
    padding: 18px 14px 28px;
  }

  .chat-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-header-actions {
    width: 100%;
  }

  .messages {
    padding: 18px 14px;
  }

  .chat-composer {
    padding: 12px 14px;
  }

  .composer-hint { padding: 0 14px 14px; }

  .chat-msg,
  .chat-turn {
    max-width: 100%;
    width: 100%;
  }

  .files-panel {
    padding: 18px;
  }
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr;
    height: auto;
    gap: 16px;
    padding: 18px 24px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    gap: 28px;
    font-size: 18px;
  }

  .demo-button {
    justify-self: start;
    font-size: 17px;
    padding: 12px 20px;
  }

  .surface-grid,
  .work-grid,
  .sap-option-grid {
    grid-template-columns: 1fr;
  }

  .hero-footer,
  .surface-kicker {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .hero-section {
    min-height: auto;
    padding: 44px 20px 28px;
  }

  .announce-pill {
    font-size: 14px;
  }

  .hero-content h1 {
    margin-top: 42px;
    font-size: 56px;
  }

  .hero-content p {
    margin-top: 34px;
    font-size: 21px;
  }

  .hero-actions,
  .surface-actions {
    flex-direction: column;
  }

  .light-button,
  .dark-button {
    width: 100%;
  }

  .hero-footer {
    position: static;
    margin-top: 58px;
  }

  .surface-section {
    padding: 58px 20px;
  }

  .surface-card {
    min-height: 680px;
    padding: 28px;
    border-radius: 24px;
  }

  .surface-card h2 {
    font-size: 42px;
  }

  .surface-card > p:not(.card-index) {
    font-size: 20px;
  }

  .role-stack {
    transform: scale(0.82);
    transform-origin: left top;
  }

  .floating-stack span {
    left: 0;
    right: 0;
  }

  .tag-row {
    left: 28px;
    right: 28px;
  }

  .workflow-shell,
  .coming-view {
    padding: 24px 20px 56px;
  }

  .workflow-header {
    flex-direction: column;
  }

  .metrics,
  .pipeline {
    grid-template-columns: 1fr;
  }
}
