:root {
  --navy: #122970;
  --navy-dark: #071638;
  --blue: #2447a8;
  --gold: #ecbe63;
  --gold-dark: #c98d22;
  --ink: #1f2633;
  --muted: #687384;
  --line: #dfe5ee;
  --paper: #f5f7fb;
  --white: #ffffff;
  --green: #2ea66f;
  --red: #cc4b4b;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 16%, rgba(236, 190, 99, 0.14), transparent 24rem),
    linear-gradient(135deg, #f7f9fd 0%, #eef3fa 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto 18px;
  padding: 14px 18px;
  border: 1px solid rgba(18, 41, 112, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 38px rgba(24, 40, 72, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--navy);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.status-dot,
.mini-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(46, 166, 111, 0.14);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
}

.control-panel,
.demo-stage {
  min-width: 0;
}

.control-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.section-heading,
.business-card,
.knowledge-panel,
.lead-panel,
.browser-frame,
.product-strip {
  border: 1px solid rgba(18, 41, 112, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(24, 40, 72, 0.08);
}

.section-heading {
  padding: 18px;
}

.section-heading h2,
.stage-copy h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.sector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sector-tab {
  min-height: 42px;
  border: 1px solid rgba(18, 41, 112, 0.15);
  border-radius: 8px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.sector-tab:hover,
.sector-tab:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(236, 190, 99, 0.8);
  outline: none;
}

.sector-tab.active {
  color: var(--white);
  border-color: var(--navy);
  background: var(--navy);
}

.business-card,
.knowledge-panel,
.lead-panel {
  padding: 18px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.card-title-row.compact {
  align-items: center;
}

.card-title-row h3 {
  margin-bottom: 0;
  font-size: 1.16rem;
  line-height: 1.15;
}

#businessBadge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: rgba(236, 190, 99, 0.23);
  font-size: 0.78rem;
  font-weight: 900;
}

.summary-text {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.45;
}

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

.fact-grid div {
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.fact-grid span,
.product-strip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact-grid strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
}

.knowledge-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.knowledge-panel li {
  display: flex;
  gap: 9px;
  color: var(--muted);
  line-height: 1.35;
}

.knowledge-panel li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--gold);
}

.ghost-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--white);
  font-weight: 800;
}

.lead-list {
  display: grid;
  gap: 9px;
  min-height: 92px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed rgba(18, 41, 112, 0.22);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.lead-item {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.lead-item strong {
  display: block;
  margin-bottom: 4px;
}

.lead-item span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.demo-stage {
  display: grid;
  gap: 14px;
}

.stage-copy {
  padding: 24px;
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(18, 41, 112, 0.97), rgba(7, 22, 56, 0.97)),
    radial-gradient(circle at 90% 10%, rgba(236, 190, 99, 0.22), transparent 18rem);
  box-shadow: 0 16px 42px rgba(18, 41, 112, 0.22);
}

.stage-copy .eyebrow {
  color: var(--gold);
}

.stage-copy p:last-child {
  max-width: 740px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.browser-frame {
  overflow: hidden;
  min-height: 590px;
}

.browser-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #f0f4fa;
}

.browser-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cfd7e4;
}

.browser-top strong {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-preview {
  position: relative;
  min-height: 546px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 247, 251, 0.94)),
    radial-gradient(circle at 14% 22%, rgba(236, 190, 99, 0.22), transparent 17rem);
}

.preview-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 36px;
}

.preview-nav strong {
  color: var(--navy);
  font-size: 1.04rem;
}

.preview-nav button,
.chat-input button {
  border: 0;
  border-radius: 7px;
  color: var(--navy-dark);
  background: var(--gold);
  font-weight: 900;
}

.preview-nav button {
  min-height: 40px;
  padding: 0 16px;
}

.preview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 20px;
  max-width: 660px;
}

.preview-hero span {
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-hero h3 {
  max-width: 520px;
  margin: 10px 0 12px;
  color: var(--navy-dark);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.preview-hero p {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.preview-metric {
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 1px solid rgba(18, 41, 112, 0.12);
  border-radius: 8px;
  color: var(--white);
  text-align: center;
  background: var(--navy);
  box-shadow: 0 18px 42px rgba(18, 41, 112, 0.22);
}

.preview-metric span {
  color: var(--gold);
  font-size: 2.5rem;
}

.chat-widget {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto auto;
  width: min(390px, calc(100% - 48px));
  min-height: 485px;
  border: 1px solid rgba(18, 41, 112, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(18, 41, 112, 0.24);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--white);
  background: var(--navy);
}

.chat-header div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-header button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
}

.messages {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  background: #f7f9fd;
}

.message {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.4;
  font-size: 0.92rem;
}

.message.bot {
  justify-self: start;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.message.user {
  justify-self: end;
  color: var(--white);
  background: var(--blue);
}

.quick-replies {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
  overflow-x: auto;
  background: #f7f9fd;
}

.quick-replies button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(18, 41, 112, 0.16);
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.chat-input input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}

.chat-input input:focus {
  border-color: rgba(36, 71, 168, 0.75);
  box-shadow: 0 0 0 3px rgba(36, 71, 168, 0.12);
}

.product-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.product-strip div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.product-strip strong {
  display: block;
  line-height: 1.25;
}

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

  .control-panel {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading,
  .sector-tabs {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .topbar,
  .preview-nav,
  .card-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }

  .sector-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-grid,
  .product-strip,
  .preview-hero {
    grid-template-columns: 1fr;
  }

  .preview-metric {
    min-height: 120px;
  }

  .site-preview {
    min-height: 760px;
    padding: 18px;
  }

  .chat-widget {
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
  }
}
