:root {
  color-scheme: light;
  --page: #fbfcff;
  --ink: #101525;
  --muted: #667085;
  --line: #dfe6f3;
  --soft: #f6f8ff;
  --blue: #2458ff;
  --blue-dark: #143db8;
  --red: #ff3046;
  --red-dark: #c71125;
  --surface: rgba(255, 255, 255, 0.88);
  --shadow: rgba(25, 39, 85, 0.14);
  --shadow-strong: rgba(18, 31, 72, 0.22);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(118deg, rgba(36, 88, 255, 0.12), transparent 32%),
    linear-gradient(242deg, rgba(255, 48, 70, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--page) 58%, #ffffff 100%);
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(16, 21, 37, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 21, 37, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 0 28%, rgba(36, 88, 255, 0.08) 28% 29%, transparent 29% 100%),
    linear-gradient(35deg, transparent 0 58%, rgba(255, 48, 70, 0.08) 58% 59%, transparent 59% 100%);
}

button,
textarea,
input {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(36, 88, 255, 0.14));
}

.brand span {
  font-size: 1.05rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  color: var(--blue-dark);
  border: 1px solid rgba(36, 88, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 34px rgba(36, 88, 255, 0.08);
  font-size: 0.88rem;
  font-weight: 800;
}

.hero {
  max-width: 800px;
  padding: clamp(32px, 5.5vh, 54px) 0 18px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(2.55rem, 6.4vw, 5.45rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.chat-window {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(36, 88, 255, 0.16);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 90px var(--shadow), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(18px);
}

.chat-window::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--blue), var(--red));
}

.chat-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(223, 230, 243, 0.9);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.window-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--line);
}

.window-dots span:nth-child(1) {
  background: var(--red);
}

.window-dots span:nth-child(2) {
  background: #ffbf3d;
}

.window-dots span:nth-child(3) {
  background: var(--blue);
}

.signal {
  color: var(--blue-dark);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 190px;
  max-height: min(42vh, 460px);
  overflow-y: auto;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(36, 88, 255, 0.055), transparent 42%),
    linear-gradient(220deg, rgba(255, 48, 70, 0.055), transparent 34%),
    rgba(255, 255, 255, 0.7);
  scroll-behavior: smooth;
}

.message {
  display: grid;
  gap: 7px;
  width: min(720px, 84%);
  max-width: 84%;
  min-width: 0;
  animation: messageIn 220ms ease-out both;
}

.message .role {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message .bubble {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 35px rgba(18, 31, 72, 0.08);
}

.message.assistant {
  align-self: flex-start;
}

.message.assistant .bubble {
  border-color: rgba(36, 88, 255, 0.2);
  box-shadow: inset 3px 0 0 var(--blue), 0 14px 35px rgba(18, 31, 72, 0.08);
}

.message.user {
  align-self: flex-end;
}

.message.user .role {
  text-align: right;
}

.message.user .bubble {
  color: #ffffff;
  border-color: rgba(36, 88, 255, 0.9);
  background: linear-gradient(135deg, var(--blue), #1948dc);
  box-shadow: 0 18px 45px rgba(36, 88, 255, 0.2);
}

.message.system {
  max-width: 100%;
  align-self: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.message.system .role {
  display: none;
}

.message.system .bubble {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.message.typing .bubble::after {
  display: inline-block;
  width: 0.62em;
  margin-left: 2px;
  color: var(--blue);
  content: "|";
  animation: cursorBlink 820ms steps(2, start) infinite;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border-top: 1px solid rgba(223, 230, 243, 0.92);
  background: rgba(255, 255, 255, 0.96);
}

.chat-form textarea {
  min-height: 54px;
  max-height: 170px;
  width: 100%;
  resize: vertical;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 15px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(18, 31, 72, 0.05) inset;
}

.chat-form textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(36, 88, 255, 0.14);
}

.chat-form textarea:disabled {
  color: var(--muted);
  background: #f8faff;
  cursor: wait;
}

.chat-form button {
  min-width: 94px;
  min-height: 54px;
  color: #ffffff;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #1748e8);
  box-shadow: 0 18px 38px rgba(36, 88, 255, 0.2);
  cursor: pointer;
}

.chat-form button:hover,
.chat-form button:focus-visible {
  border-color: var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  outline: 3px solid rgba(255, 48, 70, 0.16);
  outline-offset: 2px;
}

.chat-form button:disabled {
  opacity: 0.64;
  cursor: wait;
}

.capture-status {
  min-height: 22px;
  margin: 0;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.capture-status.success {
  color: var(--blue-dark);
}

.capture-status.error {
  color: var(--red);
}

.site-footer {
  margin-top: clamp(58px, 9vh, 92px);
  padding: 34px 0 20px;
  border-top: 1px solid rgba(223, 230, 243, 0.9);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(140px, 0.65fr));
  gap: 28px;
  padding-bottom: 26px;
}

.footer-brand p {
  max-width: 310px;
  margin: 12px 0 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer nav,
.footer-contact {
  display: grid;
  align-content: start;
  gap: 9px;
}

.site-footer a {
  width: fit-content;
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--blue);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(223, 230, 243, 0.9);
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 22px, 980px);
    padding-top: 18px;
  }

  .site-header {
    align-items: flex-start;
  }

  .live-pill {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .hero {
    padding: 36px 0 18px;
  }

  .eyebrow {
    font-size: 0.78rem;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 4.15rem);
  }

  .chat-topbar {
    padding: 14px 14px 9px;
  }

  .messages {
    min-height: 210px;
    max-height: 42vh;
    padding: 16px 14px;
  }

  .message {
    width: 70%;
    max-width: 70%;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form button {
    width: 100%;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 24px 18px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .site-header {
    flex-direction: column;
    gap: 12px;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }
}
