:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #64707d;
  --line: #d9e2e7;
  --paper: #f7f8f3;
  --white: #ffffff;
  --primary: #6d3bd1;
  --primary-dark: #48218f;
  --primary-soft: #f0eaff;
  --teal: #2f9c95;
  --coral: #ee7b45;
  --berry: #b85aa2;
  --blue: #496ddb;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: rgba(247, 248, 243, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
.topbar nav,
.hero-actions,
.profile-top,
.card-actions,
.me,
.messages form {
  align-items: center;
  display: flex;
  gap: 14px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
}

.brand-mark {
  background: var(--ink);
  border-radius: 8px;
  color: var(--white);
  display: grid;
  height: 36px;
  place-items: center;
  width: 36px;
}

.topbar nav {
  color: var(--muted);
  flex-wrap: wrap;
  font-weight: 700;
}

.button {
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  padding: 12px 16px;
}

.button.large {
  padding: 15px 22px;
}

.button.secondary {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.hero {
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  min-height: calc(100vh - 72px);
  padding: 8vh 5vw 10vh;
}

.hero-copy {
  align-self: center;
  max-width: 760px;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

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

.hero h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 0.9;
  margin-bottom: 24px;
}

.lede {
  color: #394552;
  font-size: 1.35rem;
  line-height: 1.55;
  max-width: 650px;
}

.hero-panel {
  align-content: center;
  display: grid;
  gap: 18px;
}

.mini-card,
.panel,
.profile-card,
.notice,
.feature-grid article,
.safety {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.mini-card {
  align-items: center;
  display: flex;
  gap: 16px;
  padding: 22px;
}

.mini-card:nth-child(2) {
  margin-left: 44px;
}

.mini-card span,
.me span,
.section-head span,
.profile-card p,
.notice span,
.feature-grid span,
footer {
  color: var(--muted);
}

.avatar {
  background: var(--avatar, var(--blue));
  border-radius: 50%;
  color: var(--white);
  display: grid;
  flex: 0 0 auto;
  font-weight: 900;
  height: 54px;
  place-items: center;
  width: 54px;
}

.avatar.big {
  height: 72px;
  width: 72px;
}

.avatar.small {
  height: 34px;
  width: 34px;
}

.band,
.safety {
  margin: 0 auto 72px;
  max-width: 1180px;
  padding: 36px 5vw;
}

.band {
  display: grid;
  gap: 30px;
  grid-template-columns: 0.8fr 1.2fr;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.feature-grid article {
  box-shadow: none;
  display: grid;
  gap: 10px;
  padding: 20px;
}

.auth {
  display: grid;
  min-height: calc(100vh - 140px);
  padding: 48px 5vw;
  place-items: center;
}

.auth.wide .panel {
  max-width: 760px;
}

.panel {
  max-width: 520px;
  padding: 32px;
  width: 100%;
}

label {
  color: #33404d;
  display: grid;
  font-weight: 800;
  gap: 8px;
  margin-bottom: 16px;
}

input,
select,
textarea {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 13px 14px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.split {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.alert {
  background: #fff2ea;
  border: 1px solid #ffc6a6;
  border-radius: 8px;
  color: #8f3d16;
  padding: 12px;
}

.hint {
  color: var(--muted);
}

.dashboard {
  display: grid;
  gap: 26px;
  grid-template-columns: 300px minmax(0, 1fr);
  padding: 34px 5vw 70px;
}

.sidebar {
  align-self: start;
  display: grid;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.filters,
.notice {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.notice {
  box-shadow: none;
  display: grid;
  gap: 8px;
}

.section-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h1 {
  margin: 0;
}

.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.profile-card {
  box-shadow: none;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.profile-card h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.verified {
  background: #e6f5f2;
  border-radius: 999px;
  color: #18766f;
  font-size: 0.78rem;
  font-weight: 900;
  margin-left: auto;
  padding: 7px 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 7px 10px;
}

.empty {
  color: var(--muted);
  padding: 24px;
}

.messages {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 140px);
  padding: 34px 5vw 70px;
}

.contacts {
  border-right: 1px solid var(--line);
  padding-right: 18px;
}

.contacts a {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-weight: 800;
  gap: 10px;
  padding: 10px;
}

.contacts a.active {
  background: var(--white);
  border: 1px solid var(--line);
}

.thread {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-left: 24px;
}

.bubble-list {
  align-content: start;
  display: grid;
  gap: 10px;
  padding: 12px 0;
}

.bubble {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 680px;
  padding: 12px 14px;
}

.bubble.mine {
  background: #eaf4ff;
  justify-self: end;
}

.bubble span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
}

footer {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 24px 5vw;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .hero,
  .band,
  .dashboard,
  .messages {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .mini-card:nth-child(2) {
    margin-left: 0;
  }

  .feature-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .contacts {
    border-right: 0;
    padding-right: 0;
  }

  .thread {
    padding-left: 0;
  }

  footer {
    flex-direction: column;
  }
}
