:root {
  color-scheme: light;
  --ink: #171a21;
  --muted: #667085;
  --line: #e3e6eb;
  --soft: #f5f6f8;
  --paper: #ffffff;
  --blue: #315cf3;
  --blue-dark: #2348d4;
  --blue-soft: #eef2ff;
  --green: #16845b;
  --red: #c33c49;
  --navy: #151b2c;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
select {
  font: inherit;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

code {
  padding: 0.08em 0.28em;
  border-radius: 0.3em;
  color: #244bd5;
  background: var(--blue-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  font-weight: 650;
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.site-nav {
  display: flex;
  height: 78px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 5px 12px rgb(49 92 243 / 22%);
}

.brand.compact {
  font-size: 0.98rem;
}

.brand.compact .brand-mark {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  font-size: 1rem;
}

.nav-note {
  color: var(--muted);
  font-size: 0.87rem;
}

.home-hero {
  display: grid;
  min-height: 650px;
  padding-block: 70px 105px;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
}

.hero-copy h1 {
  max-width: 680px;
  margin: 1.2rem 0 1.45rem;
  font-size: clamp(3.4rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.headline-accent {
  color: var(--blue);
}

.eyebrow,
.connected-badge {
  display: inline-flex;
  padding: 0.42rem 0.72rem;
  border: 1px solid #dce3ff;
  border-radius: 999px;
  align-items: center;
  gap: 0.5rem;
  color: #35405e;
  background: #f7f9ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #23a474;
  box-shadow: 0 0 0 4px rgb(35 164 116 / 11%);
}

.lede {
  max-width: 570px;
  margin: 0;
  color: #535d70;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  margin-top: 2.1rem;
  align-items: center;
  gap: 1.35rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.72rem 1.05rem;
  border: 0;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #fff;
  background: #687183;
  font-weight: 720;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(49 92 243 / 28%);
  outline-offset: 3px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button.primary {
  background: var(--blue);
  box-shadow: 0 9px 24px rgb(49 92 243 / 22%);
}

.button.primary:hover:not(:disabled) {
  background: var(--blue-dark);
  box-shadow: 0 12px 28px rgb(49 92 243 / 27%);
}

.button.large {
  min-height: 52px;
  padding-inline: 1.3rem;
}

.button.full-width {
  width: 100%;
}

.button.danger {
  min-height: 38px;
  padding: 0.48rem 0.78rem;
  color: var(--red);
  background: #fff1f2;
  font-size: 0.8rem;
  box-shadow: none;
}

.text-link {
  color: #424b5d;
  font-size: 0.91rem;
  font-weight: 650;
}

.trust-line {
  margin: 1.2rem 0 0;
  color: #778094;
  font-size: 0.82rem;
}

.checkmark {
  margin-right: 0.28rem;
  color: var(--green);
}

.chat-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid #dfe3ea;
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 28px 70px rgb(27 39 71 / 14%),
    0 3px 10px rgb(27 39 71 / 7%);
  transform: rotate(1deg);
}

.chat-preview::before {
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  right: -35px;
  bottom: -45px;
  border-radius: 50%;
  background: var(--blue-soft);
  content: "";
}

.chat-chrome {
  display: grid;
  min-height: 66px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #2b3040;
  background: #fbfbfc;
  font-size: 0.82rem;
  font-weight: 720;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cdd2da;
}

.member-count {
  justify-self: end;
  color: #9299a8;
  font-size: 0.68rem;
  font-weight: 550;
}

.chat-body {
  min-height: 395px;
  padding: 2rem 1.6rem 1.6rem;
  background: #f6f7f9;
}

.chat-time {
  margin-bottom: 1.7rem;
  color: #99a0ad;
  font-size: 0.66rem;
  text-align: center;
}

.message-row {
  display: flex;
  margin-bottom: 1.4rem;
  align-items: flex-end;
  gap: 0.65rem;
}

.message-row.mine {
  align-items: flex-end;
  flex-direction: column;
}

.sender {
  display: block;
  margin: 0 0 0.28rem 0.2rem;
  color: #8a92a2;
  font-size: 0.65rem;
  font-weight: 620;
}

.mine .sender {
  margin-right: 0.2rem;
}

.bubble {
  padding: 0.78rem 0.95rem;
  border-radius: 15px;
  font-size: 0.84rem;
}

.bubble.command {
  border-bottom-right-radius: 4px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 5px 12px rgb(49 92 243 / 17%);
}

.bubble.command code {
  padding: 0;
  color: inherit;
  background: none;
}

.bot-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 2px;
  flex: 0 0 auto;
  border-radius: 9px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  font-size: 0.85rem;
  font-weight: 800;
}

.bot-reply {
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(35 43 67 / 5%);
}

.bot-reply strong,
.reply-detail {
  display: block;
}

.reply-detail {
  margin-top: 0.18rem;
  color: #7c8493;
  font-size: 0.7rem;
}

.delivery-pill {
  width: max-content;
  margin: 2.3rem auto 0;
  padding: 0.43rem 0.72rem;
  border: 1px solid #d8e8e1;
  border-radius: 999px;
  color: #33735b;
  background: #f4fbf8;
  font-size: 0.67rem;
  font-weight: 670;
}

.delivery-check {
  margin-right: 0.25rem;
}

.how {
  padding-block: 95px 110px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  margin-bottom: 2.4rem;
  align-items: end;
  justify-content: space-between;
}

.kicker {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 790;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.step-card {
  min-height: 210px;
  padding: 1.55rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.step-number {
  color: #a1a8b5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
}

.step-card h3 {
  margin: 2.5rem 0 0.55rem;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  padding-block: 2.4rem;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0.7rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Dashboard */
.app-page {
  background: #f7f8fa;
}

.app-page .site-nav {
  width: 100%;
  padding-inline: max(20px, calc((100% - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 90%);
}

.connected-badge {
  color: #376953;
  border-color: #d9eae2;
  background: #f5fbf8;
}

.app-main {
  min-height: calc(100vh - 160px);
  padding-block: 62px 80px;
}

.page-heading {
  margin-bottom: 2rem;
}

.page-heading > p:last-child {
  max-width: 590px;
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1.25rem;
  align-items: start;
}

.panel {
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 24px rgb(25 36 61 / 5%);
}

.panel-heading {
  display: flex;
  margin-bottom: 1.55rem;
  align-items: center;
  gap: 0.85rem;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.panel-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 1.25rem;
  font-weight: 700;
}

.panel-icon.dark {
  color: #fff;
  background: var(--navy);
}

.loading-state {
  display: flex;
  min-height: 150px;
  border: 1px dashed #d8dce4;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--muted);
  background: #fafbfc;
  font-size: 0.85rem;
}

.loading-state[hidden] {
  display: none;
}

.loading-state a {
  color: var(--blue);
  font-weight: 650;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d7dceb;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.account-strip {
  display: flex;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  align-items: center;
  gap: 0.7rem;
  background: #fafbfc;
}

.account-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

.account-strip strong,
#user-email {
  display: block;
}

.account-strip strong {
  font-size: 0.82rem;
}

#user-email {
  color: var(--muted);
  font-size: 0.7rem;
}

.account-strip .verified-label {
  margin-left: auto;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  color: #34705a;
  background: #eaf7f1;
  font-size: 0.64rem;
  font-weight: 720;
}

label:not(.terms) {
  display: block;
  margin: 1.3rem 0 0.42rem;
  color: #343a47;
  font-size: 0.76rem;
  font-weight: 720;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  color: #8991a1;
  content: "⌄";
  pointer-events: none;
  transform: translateY(-58%);
}

select {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem;
  border: 1px solid #ccd1da;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  appearance: none;
}

.terms {
  display: flex;
  margin: 1.25rem 0;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.55;
}

.terms input {
  width: 16px;
  height: 16px;
  margin: 0.16rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.terms a {
  color: #4257a7;
  font-weight: 620;
}

.form-note {
  margin: 0.7rem 0 0;
  color: #9299a7;
  font-size: 0.68rem;
  text-align: center;
}

.empty-state {
  display: grid;
  min-height: 260px;
  padding: 2rem;
  border: 1px dashed #d9dde4;
  border-radius: 12px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  background: #fafbfc;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-mark {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 0.8rem;
  border-radius: 14px;
  place-items: center;
  color: #8c95a6;
  background: #edf0f4;
  font-size: 1.2rem;
  font-weight: 800;
}

.empty-state strong {
  color: #474e5c;
  font-size: 0.86rem;
}

.empty-state p {
  margin: 0.28rem 0 0;
  font-size: 0.75rem;
}

.group-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0.65rem;
}

.group-list li {
  display: flex;
  min-height: 65px;
  padding: 0.75rem 0.8rem 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  font-weight: 690;
}

.site-footer.slim {
  padding-block: 1.8rem;
}

@media (max-width: 850px) {
  .home-hero {
    padding-block: 50px 80px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .lede {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .chat-preview {
    width: min(520px, 100%);
    margin-inline: auto;
    transform: none;
  }

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

  .step-card {
    min-height: 170px;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(100% - 28px, 1160px);
  }

  .site-nav {
    height: 68px;
  }

  .home-hero {
    min-height: auto;
    padding-top: 45px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

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

  .hero-actions .button {
    width: 100%;
  }

  .chat-body {
    min-height: 360px;
  }

  .how {
    padding-block: 70px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.6rem;
  }

  .connected-badge {
    padding: 0.35rem 0.55rem;
    font-size: 0.66rem;
  }

  .app-main {
    padding-block: 42px 60px;
  }

  .panel {
    padding: 1.25rem;
  }

  .account-strip .verified-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .spinner {
    animation: none;
  }
}
