:root {
  --brand: #00675f;
  font-family: system-ui, sans-serif;
  color: #20332e;
  background: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

button,
select,
input {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.demo-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  background: #edf2f4;
  padding: 12px 4%;
  color: #364a50;
  font-size: 12px;
}

.demo-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-bar select {
  border: 1px solid #a6b9bd;
  border-radius: 6px;
  background: white;
  padding: 5px;
}

.demo-bar > .demo-note {
  margin-left: auto;
}

.site-header {
  max-width: 1240px;
  margin: auto;
  padding: 28px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  color: var(--brand);
  font-size: 24px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.8px;
}

nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

.hero {
  max-width: 1120px;
  min-height: 440px;
  padding: 60px 36px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 20px;
}

h1 {
  white-space: pre-line;
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -2px;
  font-weight: 650;
  margin: 0 0 24px;
}

.hero p {
  font-size: 17px;
  line-height: 1.7;
  max-width: 360px;
  color: #52635d;
}

.hero button {
  padding: 13px 20px;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  color: white;
  background: var(--brand);
}

.house {
  position: relative;
  height: 330px;
  width: 100%;
  max-width: 440px;
  background: #e6f1ee;
  border-radius: 50% 50% 10px 10px;
  overflow: hidden;
}

.roof {
  position: absolute;
  width: 180px;
  height: 180px;
  background: var(--brand);
  transform: rotate(45deg);
  left: calc(50% - 90px);
  top: 94px;
  border-radius: 7px;
}

.wall {
  position: absolute;
  width: 218px;
  height: 130px;
  background: #fff;
  left: calc(50% - 109px);
  top: 192px;
}

.window {
  width: 46px;
  height: 46px;
  border: 7px solid #bacfc7;
  background: #daebe5;
  position: absolute;
  left: 30px;
  top: 24px;
}

.door {
  width: 48px;
  height: 85px;
  background: #abc4b9;
  position: absolute;
  right: 33px;
  bottom: 0;
  border-radius: 20px 20px 0 0;
}

.sun {
  width: 52px;
  height: 52px;
  position: absolute;
  right: 56px;
  top: 44px;
  background: #edcc72;
  border-radius: 50%;
}

.ground {
  height: 16px;
  background: #92b5a6;
  position: absolute;
  inset: auto 0 0;
}

.services {
  padding: 48px max(5%, calc((100vw - 1048px) / 2));
  background: #f4f7f5;
}

h2 {
  font-size: 26px;
  letter-spacing: -0.6px;
  font-weight: 620;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding-block: 12px;
}

h3 {
  font-size: 16px;
}

.service-list p,
.technical-note p {
  font-size: 14px;
  line-height: 1.8;
  color: #52635d;
  max-width: 700px;
}

.technical-note {
  max-width: 1120px;
  padding: 40px 36px;
  margin: auto;
}

.site-footer {
  padding: 30px 5%;
  border-top: 1px solid #d8e4de;
  color: #52635d;
  font-size: 12px;
}

.hostile button {
  font-size: 28px !important;
  border: 10px dashed magenta !important;
  background: yellow !important;
}

.hostile iframe {
  height: 30px !important;
  width: 30px !important;
}

.hostile * {
  font-family: monospace !important;
  letter-spacing: 2px !important;
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }

  .house {
    height: 260px;
  }

  .site-header nav {
    display: none;
  }

  .service-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .demo-bar > .demo-note {
    margin-left: 0;
  }
}

.site-chat {
  margin-left: 24px;
  padding: 10px 18px;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: var(--brand, #00675f);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.own-only,
.chat-trigger {
  display: none;
}

body[data-demo='own-button'] .own-only {
  display: block;
}

/* The Analytics demo's event log; hidden in every other demo. */
.analytics-only {
  display: none;
}

body[data-demo='analytics'] .analytics-only {
  display: flex;
}

.analytics-panel {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  max-height: min(60vh, 520px);
  padding: 14px 16px;
  border: 1px solid #d7dde6;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgb(15 27 51 / 0.15);
  color: #13213a;
  font-size: 13px;
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-header h2 {
  margin: 0;
  font-size: 14px;
}

.analytics-hint {
  margin: 0;
  color: #5b6b85;
}

.analytics-commands {
  display: flex;
  gap: 8px;
}

.analytics-panel button {
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f3f6fb;
  padding: 4px 10px;
  font:
    12px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  cursor: pointer;
}

.analytics-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.analytics-log li {
  padding: 6px 8px;
  border-radius: 8px;
  background: #f3f6fb;
}

.analytics-log .event-name {
  font:
    600 12.5px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: var(--brand);
}

.analytics-log .event-time {
  float: right;
  color: #5b6b85;
  font-size: 11.5px;
}

.analytics-log pre {
  margin: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font:
    11.5px/1.45 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: #34445f;
}

html[data-epilot-chat='ready'] body[data-demo='own-button'] .chat-trigger {
  display: inline-flex;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero .hero-chat {
  border: 2px solid var(--brand);
  background: transparent;
  color: var(--brand);
}

.integration {
  max-width: 1120px;
  padding: 40px 36px 0;
  margin: auto;
}

.integration > p {
  font-size: 14px;
  line-height: 1.8;
  color: #52635d;
  max-width: 700px;
}

.integration-hint {
  border-left: 3px solid var(--brand);
  padding-left: 12px;
}

.integration-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
  list-style: none;
}

.integration-steps li {
  border: 1px solid #d8e4de;
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}

.integration-steps h3 {
  margin-top: 0;
}

.integration-steps p {
  font-size: 14px;
  line-height: 1.6;
  color: #52635d;
}

.integration pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: 6px;
  background: #20332e;
  color: #e6f1ee;
  font-size: 12px;
  line-height: 1.6;
}

.integration-steps .chat-trigger {
  padding: 9px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.integration-live {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.integration-live dt {
  font-weight: 600;
}

.integration-live dd {
  margin: 0;
  color: #52635d;
}

.chat-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-events li {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6f1ee;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.chat-events:not(:empty) + span {
  display: none;
}

@media (max-width: 700px) {
  .integration {
    padding: 32px 24px 0;
  }

  .integration-steps {
    grid-template-columns: 1fr;
  }
}
