.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(11, 201, 220, 0.11), transparent 28rem),
    var(--surface-soft);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 76px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(18px);
}

.topbar__context,
.topbar__tools,
.brand,
.nav-link,
.cube-pill,
.user-chip,
.phase-track,
.phase,
.composer__tools,
.file-chip,
.canvas-toolbar,
.stat-card__label,
.insight-card__title,
.owner-heading,
.policy-row,
.status-dot-wrap {
  display: flex;
  align-items: center;
}

.topbar__context {
  min-width: 0;
  gap: 12px;
}

.topbar__eyebrow,
.eyebrow {
  margin: 0 0 3px;
  color: var(--ink-500);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.topbar__title {
  overflow: hidden;
  margin: 0;
  color: var(--ink-900);
  font-size: 0.96rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__tools {
  gap: 10px;
}

.cube-pill {
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--teal-500) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-tint) 80%, transparent);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.cube-pill__gem {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--cyan-500), var(--teal-500));
  box-shadow: 0 0 0 4px rgba(11, 201, 220, 0.12);
  transform: rotate(45deg);
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-700);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--ink-900);
  transform: translateY(-1px);
}

.user-chip {
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--blue-600));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 18px 11px;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
  box-shadow: 8px 0 30px rgba(2, 21, 53, 0.14);
}

.brand {
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: var(--navy-950) url("/assets/brand/fluss-symbol.png") center / cover no-repeat;
}

.brand__mark {
  display: none;
}

.sidebar__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.nav-link {
  position: relative;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.router-link-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-link.router-link-active::before {
  position: absolute;
  left: -11px;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--cyan-500);
  content: "";
}

.nav-link__icon {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.main {
  min-height: 100vh;
  margin-left: 76px;
  padding-top: 68px;
}

.workspace {
  height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(510px, 1.62fr);
  gap: 1px;
  background: var(--line);
}

.chat-panel,
.canvas-panel {
  min-width: 0;
  background: var(--surface);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.chat-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.artifact-switcher,
.artifact-heading,
.phase-actions,
.phase-confirmation > div {
  display: flex;
  align-items: center;
}

.artifact-switcher {
  gap: 8px;
  margin-bottom: 15px;
}

.artifact-picker {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.artifact-picker > span {
  color: var(--ink-500);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.artifact-picker select {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink-800);
  font-size: 0.72rem;
}

.new-artifact-button,
.artifact-state-button,
.phase-advance-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-700);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.new-artifact-button {
  height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.artifact-heading {
  justify-content: space-between;
  gap: 12px;
}

.artifact-state-button {
  padding: 7px 9px;
}

.activity-card {
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--blue-600) 18%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--blue-600) 5%, var(--surface));
}

.activity-card.is-paused {
  border-color: var(--line);
  background: var(--surface-soft);
}

.activity-card span,
.activity-card strong {
  display: block;
}

.activity-card span {
  margin-bottom: 3px;
  color: var(--blue-600);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.activity-card strong {
  color: var(--ink-800);
  font-size: 0.76rem;
  line-height: 1.4;
}

.flux-title {
  margin: 0;
  font-size: 1.22rem;
}

.flux-title span {
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.flux-subtitle {
  margin: 7px 0 0;
  color: var(--ink-500);
  font-size: 0.82rem;
  line-height: 1.5;
}

.phase-track {
  gap: 5px;
  margin-top: 16px;
}

.phase {
  justify-content: center;
  width: 26px;
  height: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--line);
  color: transparent;
  font-size: 0;
}

.phase.is-active {
  width: 42px;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
}

.phase.is-complete {
  background: color-mix(in srgb, var(--blue-600) 52%, var(--line));
}

.phase-actions {
  justify-content: space-between;
  min-height: 28px;
  margin-top: 8px;
  color: var(--ink-500);
  font-size: 0.67rem;
}

.phase-advance-button {
  padding: 6px 9px;
  border-color: color-mix(in srgb, var(--blue-600) 28%, var(--line));
  color: var(--blue-600);
}

.phase-confirmation {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--cyan-500) 38%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--cyan-500) 7%, var(--surface));
}

.phase-confirmation p {
  margin: 0 0 9px;
  color: var(--ink-700);
  font-size: 0.72rem;
  line-height: 1.45;
}

.phase-confirmation > div {
  gap: 8px;
}

.phase-confirmation .primary-button {
  padding: 7px 9px;
  font-size: 0.68rem;
}

.workspace-inline-error {
  margin: 8px 0 0;
  color: #b83443;
  font-size: 0.7rem;
  line-height: 1.4;
}

.messages {
  overflow: auto;
  padding: 26px 24px 18px;
  scroll-behavior: smooth;
}

.message {
  max-width: 92%;
  margin-bottom: 20px;
}

.message--user {
  margin-left: auto;
}

.message__meta {
  margin: 0 0 7px;
  color: var(--ink-500);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message__bubble {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 6px 17px 17px 17px;
  background: var(--surface-soft);
  color: var(--ink-700);
  font-size: 0.88rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message--flux .message__bubble {
  white-space: normal;
}

.message-content {
  display: grid;
  gap: 0.72rem;
}

.message-content p,
.message-content ul,
.message-content ol {
  margin: 0;
}

.message-content ul,
.message-content ol {
  display: grid;
  gap: 0.42rem;
  padding-left: 1.18rem;
}

.message-content li {
  padding-left: 0.12rem;
}

.message-content__label,
.message-content strong {
  color: var(--ink-900);
  font-weight: 800;
}

.message-content__label {
  padding-top: 0.08rem;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
}

.message-content code {
  padding: 0.12rem 0.32rem;
  border-radius: 5px;
  background: color-mix(in srgb, var(--blue-600) 8%, var(--surface));
  color: var(--ink-900);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
}

.message--user .message__bubble {
  border-color: transparent;
  border-radius: 17px 6px 17px 17px;
  background: var(--navy-800);
  color: #fff;
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 58px;
}

.typing-bubble i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-500);
  animation: typing-pulse 1.1s ease-in-out infinite;
}

.typing-bubble i:nth-child(2) { animation-delay: 0.14s; }
.typing-bubble i:nth-child(3) { animation-delay: 0.28s; }

@keyframes typing-pulse {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.ai-connections__heading,
.provider-card__heading,
.provider-actions {
  display: flex;
  align-items: center;
}

.ai-connections {
  grid-column: 1 / -1;
}

.ai-connections__heading {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.ai-connections__heading h2 { margin: 4px 0 8px; }
.ai-connections__heading p:last-child { margin: 0; color: var(--ink-500); line-height: 1.55; }

.measurement-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--cyan-500) 34%, var(--line));
  border-radius: 999px;
  color: var(--ink-700);
  font-size: 0.72rem;
  font-weight: 700;
}

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

.provider-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.provider-card__heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.provider-card__name { margin: 0; color: var(--ink-900); font-weight: 800; }
.provider-card__model,
.provider-checked { margin: 3px 0 0; color: var(--ink-500); font-size: 0.72rem; }

.provider-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-500);
  font-size: 0.68rem;
  font-weight: 800;
}

.provider-status--active { background: color-mix(in srgb, var(--teal-500) 13%, var(--surface)); color: var(--success); }
.provider-status--error { background: color-mix(in srgb, #e05b67 12%, var(--surface)); color: #b83443; }

.provider-field { display: grid; gap: 6px; margin-top: 11px; }
.provider-field span,
.provider-default { color: var(--ink-700); font-size: 0.74rem; font-weight: 700; }
.provider-field input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-900);
}

.provider-routes {
  display: grid;
  gap: 7px;
  margin-top: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.provider-routes__title {
  margin: 0 0 2px;
  color: var(--ink-500);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.provider-route {
  display: grid;
  grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.3fr);
  gap: 10px;
  color: var(--ink-500);
  font-size: 0.72rem;
}

.provider-route strong {
  overflow: hidden;
  color: var(--ink-800);
  font-size: 0.7rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-default { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.provider-actions { flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.provider-actions .primary-button,
.provider-actions .secondary-button { padding: 9px 11px; font-size: 0.72rem; }
.text-button { border: 0; background: transparent; color: var(--ink-500); cursor: pointer; }
.text-button--danger { color: #b83443; }
.provider-feedback { margin: 10px 0 0; font-size: 0.74rem; line-height: 1.45; }
.provider-feedback--success { color: var(--success); }
.provider-feedback--error { color: #b83443; }
.provider-loading { color: var(--ink-500); }

.owner-recent-work > span {
  display: grid;
  gap: 3px;
}

.owner-recent-work small {
  color: var(--ink-500);
  font-size: 0.68rem;
  font-weight: 500;
}

@media (max-width: 900px) {
  .provider-grid { grid-template-columns: 1fr; }
  .ai-connections__heading { align-items: flex-start; flex-direction: column; }
}

.suggestion {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink-700);
  text-align: left;
  cursor: pointer;
}

.suggestion:hover {
  border-color: color-mix(in srgb, var(--cyan-500) 55%, var(--line));
  color: var(--ink-900);
  transform: translateY(-1px);
}

.composer-wrap {
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.file-chip {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-tint);
  color: var(--ink-700);
  font-size: 0.74rem;
}

.source-tray {
  display: grid;
  max-height: 176px;
  gap: 7px;
  margin-bottom: 9px;
  overflow: auto;
}

.source-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.source-chip--needs_attention,
.source-chip--failed { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.source-chip--queued,
.source-chip--processing { border-color: color-mix(in srgb, var(--cyan-500) 42%, var(--line)); }
.source-chip.is-selected {
  border-color: color-mix(in srgb, var(--teal-500) 62%, var(--line));
  background: color-mix(in srgb, var(--teal-500) 7%, var(--surface));
}

.source-chip__main {
  display: grid;
  flex: 1 1 180px;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 7px;
}

.source-chip__type {
  align-self: center;
  grid-row: 1 / span 2;
  padding: 5px 6px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--cyan-500) 12%, var(--surface));
  color: var(--blue-600);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.source-chip__main strong {
  overflow: hidden;
  color: var(--ink-800);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-chip__main small {
  color: var(--ink-500);
  font-size: 0.63rem;
}

.source-chip__action {
  flex: 0 0 auto;
  max-width: 132px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-700);
  font-size: 0.63rem;
  font-weight: 800;
  cursor: pointer;
}

.source-chip__action--active {
  border-color: color-mix(in srgb, var(--teal-500) 38%, var(--line));
  color: var(--success);
}

.source-chip__action:disabled { cursor: not-allowed; opacity: 0.5; }
.source-chip__select { margin-left: auto; }

.source-warning,
.source-uploading {
  margin: 6px 3px 8px;
  font-size: 0.68rem;
  line-height: 1.45;
}

.source-warning { color: var(--danger); }
.source-uploading { color: var(--blue-600); font-weight: 700; }

.composer {
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-soft);
  box-shadow: 0 9px 22px rgba(11, 36, 80, 0.05);
}

.composer:focus-within {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(11, 201, 220, 0.11);
}

.composer input[type="text"] {
  width: 100%;
  padding: 8px 9px 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-900);
}

.composer__tools {
  justify-content: space-between;
  gap: 8px;
}

.composer__source-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.attach-button,
.record-button,
.send-button,
.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
}

.attach-button {
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-700);
  font-size: 0.76rem;
  font-weight: 700;
}

.attach-button:hover {
  background: var(--surface);
}

.record-button {
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-700);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.record-button:hover { background: var(--surface); }
.record-button.is-recording { background: rgba(211, 51, 76, 0.1); color: var(--danger); }
.record-button:disabled { cursor: not-allowed; opacity: 0.45; }

.message-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.message-citations > span {
  width: 100%;
  color: var(--ink-500);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.message-citations a {
  max-width: 100%;
  overflow: hidden;
  color: var(--blue-600);
  font-size: 0.68rem;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card b {
  margin-left: auto;
  color: var(--blue-600);
  font-size: 0.78rem;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid color-mix(in srgb, var(--blue-600) 15%, var(--line));
}

.decision-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-700);
  font-size: 0.69rem;
  font-weight: 800;
  cursor: pointer;
}

.decision-button--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue-600), #0a9ed9);
  color: #fff;
}

.decision-button--text { border-color: transparent; background: transparent; color: var(--ink-500); }
.decision-button:disabled { cursor: not-allowed; opacity: 0.48; }
.decision-resolved { align-self: center; color: var(--success); font-size: 0.67rem; font-weight: 800; }

.construction-center {
  min-height: calc(100% - 72px);
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(11, 36, 80, 0.08);
}

.construction-center__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.construction-center__header h2 { margin: 4px 0 8px; font-size: clamp(1.35rem, 2.6vw, 2rem); }
.construction-center__header p:last-child { margin: 0; color: var(--ink-500); }
.construction-center__header > strong { color: var(--blue-600); font-size: 2rem; }

.construction-progress {
  height: 8px;
  margin: 28px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.construction-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-500), var(--teal-500));
  transition: width 420ms ease;
}

.construction-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.construction-steps li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.construction-steps i {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.construction-steps div { display: flex; justify-content: space-between; gap: 18px; }
.construction-steps strong { color: var(--ink-800); font-size: 0.8rem; }
.construction-steps span { color: var(--ink-500); font-size: 0.7rem; }
.construction-steps .is-succeeded i { border-color: var(--teal-500); background: var(--teal-500); }
.construction-steps .is-running { border-color: color-mix(in srgb, var(--cyan-500) 50%, var(--line)); }
.construction-steps .is-running i { border-color: var(--cyan-500); box-shadow: 0 0 0 5px color-mix(in srgb, var(--cyan-500) 12%, transparent); }
.construction-steps .is-failed i { border-color: var(--danger); background: var(--danger); }
.construction-note { margin: 18px 0 0; color: var(--ink-500); font-size: 0.72rem; line-height: 1.5; }

.artifact-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  color: #10213f;
  box-shadow: 0 24px 70px rgba(11, 36, 80, 0.12);
}

.preview-section { padding: clamp(34px, 7vw, 86px); }
.preview-section--hero { background: radial-gradient(circle at 85% 5%, rgba(11, 201, 220, 0.18), transparent 28rem), #f7fbff; }
.preview-section--hero h2 { max-width: 760px; margin: 8px 0 15px; font-size: clamp(2rem, 5vw, 4.6rem); line-height: 0.98; letter-spacing: -0.055em; }
.preview-section--hero > p:not(.preview-eyebrow) { max-width: 660px; color: #4a5d78; font-size: 1.05rem; line-height: 1.65; }
.preview-eyebrow { margin: 0; color: #087fab; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.preview-section button { margin-top: 18px; padding: 12px 17px; border: 0; border-radius: 10px; background: #0b8fd0; color: #fff; font-weight: 800; }
.preview-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.preview-features article { padding: 24px; border: 1px solid #dce7f2; border-radius: 15px; background: #fff; }
.preview-features span { color: #0b8fd0; font-size: 0.7rem; font-weight: 900; }
.preview-features h3 { margin: 24px 0 8px; }
.preview-features p,
.preview-section--proof p,
.preview-section--cta p { color: #60718b; line-height: 1.65; }
.preview-section--proof { background: #10213f; color: #fff; }
.preview-section--proof p:not(.preview-eyebrow) { max-width: 680px; color: #c7d4e7; }
.preview-section--proof h3,
.preview-section--cta h3 { margin: 8px 0; font-size: clamp(1.5rem, 3vw, 2.5rem); }
.preview-section--cta { text-align: center; }
.preview-review-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-top: 1px solid #dce7f2; background: #f7fbff; }
.preview-review-bar div { display: grid; gap: 3px; }
.preview-review-bar strong { font-size: 0.78rem; }
.preview-review-bar span { color: #087fab; font-size: 0.7rem; font-weight: 800; }

@media (max-width: 760px) {
  .construction-center__header,
  .construction-steps div,
  .preview-review-bar { align-items: flex-start; flex-direction: column; }
  .preview-features { grid-template-columns: 1fr; }
  .preview-section { padding: 30px 22px; }
}

.send-button {
  min-width: 38px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-600), #0a9ed9);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.send-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.privacy-note {
  margin: 8px 4px 0;
  color: var(--ink-500);
  font-size: 0.67rem;
  text-align: center;
}

.canvas-panel {
  overflow: auto;
  padding: 26px;
}

.canvas-toolbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.canvas-title {
  margin: 0;
  font-size: 1.15rem;
}

.canvas-subtitle {
  margin: 6px 0 0;
  color: var(--ink-500);
  font-size: 0.78rem;
}

.local-badge {
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--teal-500) 35%, var(--line));
  border-radius: 999px;
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.empty-canvas {
  min-height: calc(100% - 72px);
  display: grid;
  place-items: center;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(var(--surface) 0 0) padding-box,
    radial-gradient(circle at 50% 15%, rgba(11, 201, 220, 0.1), transparent 16rem);
  text-align: center;
}

.empty-canvas__orb {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  border: 1px solid rgba(11, 201, 220, 0.25);
  border-radius: 31px;
  background:
    radial-gradient(circle at 32% 28%, rgba(121, 230, 189, 0.9), transparent 18%),
    linear-gradient(145deg, var(--blue-600), var(--cyan-500) 62%, var(--teal-500));
  box-shadow: 0 20px 50px rgba(18, 143, 208, 0.25);
  transform: rotate(12deg);
}

.empty-canvas h2 {
  margin: 0;
  font-size: 1.4rem;
}

.empty-canvas p {
  max-width: 460px;
  margin: 11px auto 0;
  color: var(--ink-500);
  line-height: 1.65;
}

.saved-draft-card {
  width: min(100%, 570px);
  padding: 8px;
}

.saved-draft-card .eyebrow {
  margin-bottom: 7px;
  color: var(--blue-600);
}

.draft-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 22px 0 0;
  text-align: left;
}

.draft-facts div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.draft-facts dt {
  margin-bottom: 5px;
  color: var(--ink-500);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.draft-facts dd {
  margin: 0;
  color: var(--ink-800);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
}

.analysis-loading,
.analysis-error {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  text-align: center;
}

.analysis-error {
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line));
}

.analysis-error h2 {
  color: var(--danger);
}

.dashboard {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  padding: 25px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-950), var(--navy-700));
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.dashboard-hero::after {
  position: absolute;
  top: -70px;
  right: -40px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 201, 220, 0.34), transparent 64%);
  content: "";
}

.dashboard-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 4px 0 8px;
  font-size: clamp(1.22rem, 2vw, 1.72rem);
}

.dashboard-hero p {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}

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

.stat-card,
.chart-card,
.insight-card,
.owner-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  padding: 17px;
  border-radius: var(--radius-md);
}

.stat-card__label {
  justify-content: space-between;
  color: var(--ink-500);
  font-size: 0.7rem;
  font-weight: 700;
}

.stat-card__value {
  margin: 11px 0 3px;
  font-size: 1.35rem;
  font-weight: 800;
}

.stat-card__hint {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.67rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 18px;
}

.chart-card,
.insight-card {
  padding: 20px;
  border-radius: var(--radius-md);
}

.card-kicker {
  margin: 0 0 5px;
  color: var(--ink-500);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.card-title {
  margin: 0;
  font-size: 0.97rem;
}

.chart-wrap {
  min-height: 230px;
  display: grid;
  align-items: end;
  margin-top: 18px;
}

.bar-chart {
  width: 100%;
  height: 220px;
  overflow: visible;
}

.bar-chart text {
  fill: var(--ink-500);
  font-family: var(--font-sans);
  font-size: 10px;
}

.bar-chart .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.bar-chart .bar {
  fill: url(#barGradient);
  transform-origin: bottom;
}

.insight-card__title {
  justify-content: space-between;
  gap: 12px;
}

.quality-ring {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--teal-500) calc(var(--score) * 1%), var(--line) 0);
}

.quality-ring::after {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-900);
  content: attr(data-score);
  font-size: 0.68rem;
  font-weight: 800;
}

.insight-list {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.insight-list li {
  position: relative;
  padding-left: 17px;
  color: var(--ink-700);
  font-size: 0.78rem;
  line-height: 1.5;
}

.insight-list li::before {
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-500);
  content: "";
}

.recommendations {
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--cyan-500) 26%, var(--line));
  border-radius: var(--radius-md);
  background: var(--surface-tint);
}

.recommendations h3 {
  margin: 0 0 12px;
  font-size: 0.94rem;
}

.recommendations ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-700);
  font-size: 0.78rem;
  line-height: 1.55;
}

.dashboard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--blue-600), #0a9ed9);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-700);
}

.owner-page {
  min-height: calc(100vh - 68px);
  padding: clamp(24px, 4vw, 50px);
}

.owner-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.owner-heading h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.owner-heading p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-500);
  line-height: 1.6;
}

.owner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.owner-card {
  padding: 21px;
  border-radius: var(--radius-md);
}

.owner-card--wide {
  grid-column: span 2;
}

.owner-card h2 {
  margin: 0 0 5px;
  font-size: 0.94rem;
}

.owner-card__metric {
  margin: 16px 0 4px;
  font-size: 1.65rem;
  font-weight: 800;
}

.owner-card__hint {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.72rem;
  line-height: 1.5;
}

.policy-list {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.policy-row {
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
  font-size: 0.78rem;
}

.policy-row:last-child {
  padding-bottom: 0;
  border: 0;
}

.policy-row strong {
  color: var(--ink-900);
}

.status-dot-wrap {
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(33, 211, 176, 0.12);
}

.login-shell,
.login-page {
  min-height: 100vh;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(440px, 1.08fr) minmax(390px, 0.92fr);
  background: var(--surface);
}

.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 72px);
  background:
    linear-gradient(145deg, rgba(3, 18, 53, 0.94), rgba(6, 27, 70, 0.97)),
    url("/assets/brand/fluss-symbol.png") center / min(70vw, 720px) no-repeat;
  color: #fff;
  isolation: isolate;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  content: "";
}

.login-visual__glow {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(16px);
  opacity: .35;
  animation: login-float 9s var(--ease-out) infinite alternate;
}

.login-visual__glow--one {
  top: -180px;
  right: -100px;
  background: radial-gradient(circle, var(--cyan-500), transparent 68%);
}

.login-visual__glow--two {
  bottom: -220px;
  left: 8%;
  background: radial-gradient(circle, var(--blue-600), transparent 68%);
  animation-delay: -4s;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.login-brand__symbol {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 15px;
  background: var(--navy-950) url("/assets/brand/fluss-symbol.png") center / cover;
  box-shadow: 0 12px 36px rgba(0,0,0,.24);
}

.login-promise {
  max-width: 660px;
  margin: auto 0 3vh;
}

.login-promise .eyebrow {
  color: var(--mint-400);
}

.login-promise h1 {
  max-width: 620px;
  margin: 14px 0 18px;
  font-size: clamp(2.35rem, 4.7vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.login-promise > p:last-child {
  max-width: 570px;
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 1rem;
  line-height: 1.7;
}

.login-access {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 42px;
  background:
    radial-gradient(circle at 100% 0%, rgba(11, 201, 220, .11), transparent 28rem),
    var(--surface);
}

.login-card {
  width: min(100%, 430px);
  display: grid;
  gap: 12px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  margin: 8px 0 8px;
  font-size: 1.72rem;
  letter-spacing: -.035em;
}

.login-card__lead,
.login-security {
  margin: 0;
  color: var(--ink-500);
  line-height: 1.55;
}

.login-card__lead {
  margin-bottom: 13px;
  font-size: .87rem;
}

.field-label {
  margin-top: 4px;
  color: var(--ink-700);
  font-size: .75rem;
  font-weight: 700;
}

.login-input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink-900);
}

.login-input:focus {
  border-color: var(--cyan-500);
}

.login-error,
.owner-error {
  margin: 3px 0 0;
  color: var(--danger);
  font-size: .78rem;
  line-height: 1.45;
}

.login-submit {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 8px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(100deg, var(--blue-600), var(--cyan-500));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(23, 105, 224, .24);
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(23, 105, 224, .3);
}

.login-submit:disabled {
  cursor: wait;
  opacity: .7;
}

.login-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .7s linear infinite;
}

.login-security {
  margin-top: 5px;
  text-align: center;
  font-size: .67rem;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

@keyframes login-float {
  to { transform: translate3d(28px, 20px, 0) scale(1.08); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(290px, 0.85fr) minmax(430px, 1.15fr);
  }

  .stats-grid,
  .owner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 310px;
    padding: 28px 25px;
  }

  .login-promise {
    margin: 70px 0 0;
  }

  .login-promise h1 {
    max-width: 540px;
    font-size: clamp(2rem, 10vw, 3.4rem);
  }

  .login-promise > p:last-child {
    display: none;
  }

  .login-access {
    min-height: auto;
    padding: 28px 18px 48px;
  }

  .login-card {
    padding: 27px 23px;
  }

  .sidebar {
    inset: auto 0 0;
    width: auto;
    height: 62px;
    flex-direction: row;
    justify-content: center;
    padding: 8px 12px;
  }

  .brand {
    display: none;
  }

  .sidebar__nav {
    flex: initial;
    flex-direction: row;
  }

  .nav-link.router-link-active::before {
    inset: auto auto -8px;
    width: 22px;
    height: 3px;
    border-radius: 4px 4px 0 0;
  }

  .topbar {
    left: 0;
    height: 62px;
    padding: 0 16px;
  }

  .topbar__eyebrow,
  .user-chip {
    display: none;
  }

  .cube-pill {
    height: 34px;
  }

  .main {
    margin-left: 0;
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .workspace {
    height: auto;
    min-height: calc(100vh - 124px);
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: 620px;
  }

  .canvas-panel {
    min-height: 620px;
    padding: 20px 16px;
  }

  .owner-page {
    min-height: calc(100vh - 124px);
    padding: 26px 16px;
  }
}

@media (max-width: 540px) {
  .topbar__title {
    max-width: 150px;
  }

  .cube-pill {
    font-size: 0.69rem;
  }

  .chat-header,
  .messages {
    padding-right: 17px;
    padding-left: 17px;
  }

  .artifact-switcher {
    align-items: end;
  }

  .new-artifact-button {
    padding: 0 8px;
  }

  .draft-facts {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .owner-grid {
    grid-template-columns: 1fr 1fr;
  }

  .owner-card--wide {
    grid-column: span 2;
  }

  .canvas-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
