:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #6e7b91;
  --panel: #ffffff;
  --soft: #f6f9fc;
  --line: #dce4ee;
  --field: #ffffff;
  --brand: #1487f2;
  --brand-strong: #1487f2;
  --brand-soft: #eaf5ff;
  --success: #19a974;
  --shadow: 0 16px 46px rgba(31, 52, 79, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

section[id],
footer[id] {
  scroll-margin-top: 72px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
a {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  width: min(1180px, calc(100vw - 28px));
  height: 100%;
  margin: 0 auto;
}

.logo-frame {
  position: relative;
  flex: 0 0 auto;
  width: 142px;
  height: 48px;
  overflow: hidden;
}

.brand-logo {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 142px;
  height: 48px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.86) brightness(1.04);
  transform: translateY(-50%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav-links a,
.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 650;
}

.nav-links a:hover,
.site-footer a:hover,
.site-footer button:hover {
  color: var(--brand);
}

.nav-cta {
  margin-left: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 11px 18px;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.topbar-button,
.close-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
}

.topbar-button {
  flex: 0 0 auto;
  margin-left: 10px;
  text-decoration: none;
}

.topbar-button svg,
.close-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.topbar-button:hover,
.close-button:hover {
  border-color: #bfd3e7;
  background: var(--soft);
  color: var(--brand-strong);
}

.account-close,
.settings-dialog .close-button {
  border: 0;
  box-shadow: none;
}

.account-close:hover,
.settings-dialog .close-button:hover {
  border: 0;
}

.account-close:focus,
.account-close:focus-visible,
.settings-dialog .close-button:focus,
.settings-dialog .close-button:focus-visible {
  outline: 0;
  background: var(--soft);
  color: var(--brand-strong);
}

.conversation-section {
  padding: 76px 0 64px;
  background: #eef8ff;
  border-top: 1px solid #d9ecfb;
  border-bottom: 1px solid #d9ecfb;
}

.conversation-heading {
  width: min(900px, calc(100vw - 32px));
  margin: 0 auto 34px;
  text-align: center;
}

.conversation-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.45rem);
  letter-spacing: 0;
  line-height: 1.08;
}

.conversation-heading p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  width: min(1180px, calc(100vw - 28px));
  height: min(800px, calc(100vh - 100px));
  margin: 0 auto;
}

.sidebar,
.chat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.sidebar-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 4px;
}

svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.12rem;
}

.sidebar-heading h2 {
  margin: 0;
  font-size: 1.12rem;
}

.sidebar-heading p,
.chat-header p,
label,
.status-list,
.fingerprint {
  color: var(--muted);
  font-size: 0.88rem;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 135, 242, 0.14);
}

input::placeholder {
  color: #a1acbb;
}

.room-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
}

.icon-button,
.send {
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button {
  border: 1px solid #cfe3f6;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.icon-button:hover {
  background: #dcefff;
}

.primary {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 13px 16px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(20, 135, 242, 0.2);
}

.primary:hover,
.send:hover {
  background: var(--brand-strong);
}

.status-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.status-list div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #aab4c3;
}

.dot.online,
.dot.lock {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(25, 169, 116, 0.1);
}

.peer-panel {
  min-height: 0;
  flex: 1;
  padding-top: 4px;
}

.peer-panel h2 {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

#peerList {
  display: grid;
  gap: 8px;
  max-height: 260px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

#peerList li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 0.9rem;
}

.peer-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  object-fit: cover;
  font-size: 0.78rem;
  font-weight: 800;
}

.peer-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.peer-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.peer-identity strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peer-details {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-account-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 19px;
  background: linear-gradient(var(--success), var(--success)) center bottom / 15px 11px no-repeat;
  color: #ffffff;
}

.verified-account-mark::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 9px;
  border: 2px solid var(--success);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  content: "";
  transform: translateX(-50%);
}

.verified-account-mark::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  color: #ffffff;
  content: "✓";
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 11px;
  text-align: center;
}

.local-peer {
  grid-template-columns: 34px minmax(0, 1fr) !important;
}

.peer-verify {
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  padding: 3px 0;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.peer-verify.verified {
  color: var(--success);
}

.peer-verify.blocked {
  color: #c43d4f;
}

.pending-actions {
  display: flex;
  gap: 4px;
}

.pending-actions button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--brand-strong);
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.pending-actions .reject {
  color: #b33b4d;
}

.peer-chip {
  color: var(--muted);
  font-size: 0.75rem;
}

.chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.chat-header h2 {
  margin-top: 3px;
  font-size: 1.28rem;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fingerprint {
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow-wrap: anywhere;
}

.leave-room {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid #cfe3f6;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  padding: 8px 11px;
  font-size: 0.8rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.leave-room[hidden] {
  display: none;
}

.leave-room svg {
  width: 17px;
  height: 17px;
}

.leave-room:hover {
  background: #dcefff;
}

.leave-room.danger,
.secondary-button.danger {
  border-color: #c83f52;
  background: #c83f52;
  color: #ffffff;
}

.leave-room.danger:hover,
.secondary-button.danger:hover {
  background: #ae3043;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 22px;
  overflow-y: auto;
  background: #fbfcfe;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  height: 100%;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 74px;
  height: 74px;
  color: var(--brand);
}

.empty-state p {
  max-width: 390px;
  line-height: 1.5;
}

.message {
  width: fit-content;
  max-width: min(620px, 82%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(31, 52, 79, 0.05);
}

.message.me {
  align-self: flex-end;
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.message.notice {
  align-self: center;
  border-color: #cfe3f6;
  background: var(--brand-soft);
  color: #38627f;
  font-size: 0.86rem;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
}

.message.me .message-meta {
  color: rgba(255, 255, 255, 0.78);
}

.message-text {
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.composer {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) 48px;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.send,
.attach {
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.send {
  min-width: 48px;
  min-height: 46px;
  border: 0;
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 135, 242, 0.2);
}

.attach {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 126px;
  min-height: 46px;
  border: 0;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(20, 135, 242, 0.18);
}

.attach:hover {
  background: var(--brand-strong);
}

.attach svg {
  width: 18px;
  height: 18px;
}

.attachment-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.attachment-preview[hidden] {
  display: none;
}

.attachment-preview img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}

.attachment-preview span {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.message-image {
  display: block;
  width: min(360px, 100%);
  max-height: 360px;
  margin-top: 8px;
  border-radius: 6px;
  object-fit: contain;
}

.send:disabled,
.attach:disabled,
.primary:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.settings-dialog,
.verify-dialog,
.leave-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(780px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(31, 52, 79, 0.24);
}

.settings-dialog::backdrop,
.verify-dialog::backdrop,
.leave-dialog::backdrop {
  background: rgba(20, 31, 48, 0.4);
  backdrop-filter: blur(3px);
}

.leave-dialog {
  width: min(440px, calc(100vw - 28px));
}

.leave-dialog-shell {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 20px;
}

.leave-dialog-shell header,
.leave-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.leave-dialog-shell h2 {
  margin: 0;
  font-size: 1.12rem;
}

.leave-dialog-shell p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.leave-dialog-actions {
  justify-content: flex-end;
}

.settings-shell,
.verify-shell {
  margin: 0;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.settings-header p {
  margin-bottom: 3px;
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.settings-header h2 {
  font-size: 1.18rem;
}

.settings-content {
  display: grid;
  gap: 0;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}

.settings-section {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.settings-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

.section-heading p,
.verify-content p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.setting-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #cfe3f6;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 750;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segmented button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 9px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.segmented button.active {
  background: #ffffff;
  color: var(--brand-strong);
  box-shadow: 0 2px 8px rgba(31, 52, 79, 0.1);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recovery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.secondary-button,
.text-button {
  border-radius: 8px;
  padding: 10px 13px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.text-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--brand-strong);
}

.secondary-button:disabled,
.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.device-fingerprint {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.account-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.level-description {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.account-status.verified {
  color: var(--success);
  font-weight: 700;
}

.settings-toggles {
  gap: 0;
  padding-top: 4px;
  padding-bottom: 4px;
}

.toggle-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f5;
  color: var(--ink);
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row span {
  display: grid;
  gap: 3px;
}

.toggle-row strong {
  font-size: 0.87rem;
}

.toggle-row small {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 450;
  line-height: 1.35;
}

.toggle-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.verify-content {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.safety-number {
  display: block;
  padding: 18px;
  border: 1px solid #cfe3f6;
  border-radius: 8px;
  background: var(--brand-soft);
  color: #154c75;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(0.92rem, 3vw, 1.14rem);
  font-weight: 750;
  line-height: 1.7;
  overflow-wrap: anywhere;
  text-align: center;
}

.hero {
  position: relative;
  min-height: 650px;
  background-color: #ffffff;
  background-image: url("./kyte-hero.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 32px));
  margin: 0 auto;
  padding-top: 76px;
  text-align: center;
}

.hero-content h1 {
  font-size: 3.25rem;
  letter-spacing: 0;
  line-height: 1.08;
}

.hero-content p {
  margin-top: 20px;
  color: #4e5d70;
  font-size: 1.16rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.hero-primary,
.hero-secondary {
  min-height: 48px;
  border-radius: 8px;
  padding: 13px 22px;
  font-weight: 750;
  text-decoration: none;
}

.hero-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 9px 22px rgba(20, 135, 242, 0.22);
}

.hero-secondary {
  border: 1px solid var(--brand);
  background: #ffffff;
  color: var(--brand);
}

.hero-primary:hover,
.nav-cta:hover {
  background: #0879df;
}

.hero-secondary:hover {
  background: var(--brand-soft);
}

.hero-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  color: #46576b;
  font-size: 0.84rem;
  font-weight: 650;
}

.hero-proof span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success);
  color: #ffffff;
  font-size: 0.72rem;
}

.mobile-hero-preview {
  display: none;
}

.mobile-preview-header,
.mobile-preview-body,
.mobile-preview-people,
.mobile-preview-chat,
.preview-message,
.mobile-preview-composer {
  box-sizing: border-box;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 46px 0;
}

.step {
  display: grid;
  grid-template-columns: 28px 54px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 0 28px;
  border-right: 1px solid var(--line);
}

.step:first-child {
  padding-left: 0;
}

.step:last-child {
  padding-right: 0;
  border-right: 0;
}

.step-number {
  display: grid;
  place-items: center;
  align-self: start;
  width: 25px;
  height: 25px;
  margin-top: 8px;
  border-radius: 50%;
  background: #9fd0f6;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.step-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #b8d9f5;
  border-radius: 8px;
  color: var(--brand);
  font-size: 1.55rem;
}

.step h2 {
  margin: 3px 0 8px;
  font-size: 1rem;
}

.step p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.security-section {
  border-top: 1px solid #d7e9f7;
  background: #f3f9fd;
}

.security-inner {
  width: min(1120px, calc(100vw - 32px));
  padding: 80px 0;
  margin: 0 auto;
}

.security-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 72px;
  align-items: end;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.security-heading h2 {
  margin: 0;
  font-size: 2.6rem;
  letter-spacing: 0;
}

.security-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.security-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 54px;
  border-top: 1px solid #cddfeb;
  border-left: 1px solid #cddfeb;
}

.security-features article {
  min-width: 0;
  padding: 30px 28px 34px;
  border-right: 1px solid #cddfeb;
  border-bottom: 1px solid #cddfeb;
  background: rgba(255, 255, 255, 0.54);
}

.security-features span {
  display: block;
  margin-bottom: 34px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 850;
}

.security-features h3,
.security-disclosure h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

.security-features h3 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.security-features p {
  margin: 10px 0 0;
  color: #596b7f;
  font-size: 0.86rem;
  line-height: 1.65;
}

.security-features strong {
  color: var(--ink);
}

.security-disclosure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 60px;
  align-items: end;
  margin-top: 46px;
  padding-top: 38px;
  border-top: 1px solid #cddfeb;
}

.security-disclosure > div:first-child {
  max-width: 720px;
}

.security-disclosure h3 {
  font-size: 1.35rem;
  line-height: 1.35;
}

.security-disclosure p:last-child {
  margin: 12px 0 0;
  color: #596b7f;
  font-size: 0.9rem;
  line-height: 1.65;
}

.security-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.security-actions button,
.security-actions a {
  min-height: 44px;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.security-actions button {
  border: 0;
  background: var(--brand);
  color: #ffffff;
}

.security-actions button:hover {
  background: #0879df;
}

.security-actions a {
  border: 1px solid var(--brand);
  background: #ffffff;
  color: var(--brand);
}

.security-actions a:hover {
  background: var(--brand-soft);
}

.site-footer {
  background: #dff2ff;
  border-top: 1px solid #c6e4f8;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 52px 0 42px;
}

.footer-brand img {
  display: block;
  width: 150px;
  height: 52px;
  object-fit: cover;
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 360px;
  color: #4d6578;
  line-height: 1.55;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 160px);
  gap: 36px;
}

.footer-links div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-links h2 {
  margin: 0 0 4px;
  font-size: 0.85rem;
}

.footer-links a,
.footer-links span,
.footer-links button {
  color: #536b7e;
  font-size: 0.82rem;
}

.footer-links button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid #bddff5;
  color: #60788b;
  font-size: 0.76rem;
}

.desktop-account-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(31, 52, 79, 0.24);
}

.desktop-account-dialog::backdrop {
  background: rgba(20, 31, 48, 0.55);
  backdrop-filter: blur(5px);
}

.desktop-account-shell {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.desktop-account-shell header {
  position: relative;
  text-align: center;
}

.account-close {
  position: absolute;
  top: -8px;
  right: -8px;
}

.desktop-account-shell header img {
  width: 140px;
  height: 46px;
  object-fit: cover;
}

.desktop-account-shell header p {
  margin-top: 10px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.desktop-account-shell header h2 {
  margin: 5px 0 8px;
  font-size: 1.7rem;
}

.desktop-account-shell header span,
.desktop-avatar-row p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.desktop-avatar-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.desktop-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #b8d9f5;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.6rem;
  cursor: pointer;
}

.desktop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desktop-avatar-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.desktop-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.username-field {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  overflow: hidden;
}

.username-field > span {
  padding-left: 12px;
  color: var(--muted);
  transform: translateY(1px);
}

.username-field input {
  min-width: 0;
  margin: 0;
  padding-left: 3px;
  border: 0;
  outline: 0;
}

.username-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 135, 242, 0.14);
}

.username-field input:focus {
  box-shadow: none;
}

.field-count {
  float: right;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.account-status-field {
  grid-column: 1 / -1;
}

.private-field-note {
  float: right;
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 750;
}

.required-mark {
  color: #c83f52;
  font-weight: 800;
}

.passkey-explainer {
  padding-left: 12px;
  border-left: 3px solid var(--brand);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.passkey-explainer strong {
  color: var(--ink);
}

.passkey-device-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.passkey-device-options > span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.passkey-device-options strong {
  display: block;
  margin-bottom: 2px;
}

.account-verification,
.account-badge-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.account-verification strong,
.account-badge-preview strong {
  font-size: 0.86rem;
}

.account-verification p,
.account-badge-preview p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.verification-code-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 8px;
}

.verification-code-row input {
  min-width: 0;
}

.account-badge-preview {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.account-badge-preview .verified-account-mark {
  width: 26px;
  height: 26px;
  background-size: 20px 15px;
}

.account-badge-preview .verified-account-mark::before {
  width: 11px;
  height: 12px;
  border-width: 3px;
}

.account-badge-preview .verified-account-mark::after {
  font-size: 0.7rem;
  line-height: 15px;
}

.setting-badge.verified {
  border-color: #bfe9d8;
  background: #e8f8f1;
  color: #117a55;
}

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

.desktop-account-actions #desktopContinue,
.desktop-account-actions .account-phone-option,
.desktop-account-actions .account-logout {
  grid-column: 1 / -1;
}

.desktop-account-actions .account-logout {
  color: #b33b4d;
}

@media (max-width: 760px) {
  section[id],
  footer[id] {
    scroll-margin-top: 64px;
  }

  .site-header {
    height: 64px;
  }

  .site-nav {
    width: calc(100vw - 24px);
  }

  .logo-frame,
  .brand-logo {
    width: 118px;
  }

  .logo-frame,
  .brand-logo {
    height: 44px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    margin-left: auto;
    padding: 9px 12px;
  }

  .topbar-button {
    margin-left: 7px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 36px;
    background: #f3f9fd;
  }

  .hero-content {
    padding-top: 56px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-content p br {
    display: none;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: min(330px, 100%);
    margin-right: auto;
    margin-left: auto;
  }

  .mobile-hero-preview {
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 28px auto 0;
    border: 1px solid #cfe1ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(31, 52, 79, 0.12);
    overflow: hidden;
    color: #1a2738;
    font-size: 0.58rem;
    text-align: left;
  }

  .mobile-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 8px 12px;
    border-bottom: 1px solid #e2ebf2;
  }

  .mobile-preview-header img {
    width: 52px;
    height: auto;
  }

  .mobile-preview-header span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4e5d70;
    font-weight: 700;
  }

  .mobile-preview-header i,
  .mobile-preview-people i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
  }

  .mobile-preview-body {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 206px;
  }

  .mobile-preview-people {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 13px 9px;
    border-right: 1px solid #e2ebf2;
    background: #f9fcff;
  }

  .mobile-preview-people span {
    display: grid;
    grid-template-columns: 19px 1fr 6px;
    align-items: center;
    gap: 4px;
    font-weight: 700;
  }

  .mobile-preview-people b {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--brand);
    color: #ffffff;
    font-size: 0.55rem;
  }

  .mobile-preview-chat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 11px;
    min-width: 0;
    padding: 14px 11px 42px;
  }

  .preview-message {
    width: fit-content;
    max-width: 78%;
    padding: 8px 9px 6px;
    border-radius: 7px;
    line-height: 1.35;
  }

  .preview-message time {
    display: block;
    margin-top: 4px;
    color: #7d8b9c;
    font-size: 0.48rem;
  }

  .preview-message-in {
    background: #eef2f6;
  }

  .preview-message-out {
    align-self: flex-end;
    background: var(--brand);
    color: #ffffff;
  }

  .preview-message-out time {
    color: #e7f3ff;
    text-align: right;
  }

  .mobile-preview-composer {
    position: absolute;
    right: 9px;
    bottom: 9px;
    left: 9px;
    display: grid;
    grid-template-columns: 12px 1fr 18px;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid #d6e1ea;
    border-radius: 5px;
    color: #8290a0;
  }

  .mobile-preview-composer span {
    width: 8px;
    height: 8px;
    margin-left: 1px;
    border: 1.5px solid #64778b;
    border-radius: 2px;
  }

  .mobile-preview-composer b {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: var(--brand);
    color: #ffffff;
  }

  .mobile-preview-composer b::before {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid #ffffff;
    content: "";
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }

  .step,
  .step:first-child,
  .step:last-child {
    padding: 0;
    border-right: 0;
  }

  .conversation-section {
    padding: 54px 0 34px;
  }

  .shell {
    grid-template-columns: 1fr;
    width: min(100vw - 20px, 620px);
    height: auto;
    min-height: calc(100vh - 84px);
    margin: 10px auto;
  }

  .sidebar {
    padding: 18px;
  }

  .chat {
    min-height: 560px;
  }

  .chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .fingerprint,
  .message {
    max-width: 100%;
  }

  .settings-dialog,
  .verify-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .recovery-row {
    grid-template-columns: 1fr;
  }

  .settings-content {
    max-height: calc(100vh - 88px);
  }

  .composer {
    grid-template-columns: 112px minmax(0, 1fr) 48px;
  }

  .attach {
    min-width: 112px;
  }

  .security-inner {
    width: min(100vw - 28px, 620px);
    padding: 58px 0;
  }

  .security-heading {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
  }

  .security-heading h2 {
    font-size: 2rem;
  }

  .security-features {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

  .security-features article {
    padding: 26px 22px 28px;
  }

  .security-features span {
    margin-bottom: 20px;
  }

  .security-disclosure {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-top: 36px;
    padding-top: 30px;
  }

  .security-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .security-actions button,
  .security-actions a {
    text-align: center;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 42px 0 34px;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-profile-fields,
  .desktop-account-actions {
    grid-template-columns: 1fr;
  }

  .desktop-account-actions #desktopContinue,
  .desktop-account-actions .account-phone-option,
  .desktop-account-actions .account-logout {
    grid-column: auto;
  }

  .verification-code-row {
    grid-template-columns: 1fr;
  }

  .passkey-device-options {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}
