:root {
  --ink: #070718;
  --muted: #666473;
  --line: #ececf1;
  --pill-line: #e7e7ec;
  --purple: #5b4fe9;
  --bg: #f8f8fb;
  --white: #fff;
  --avatar: url("avatar.png");
  --banner: url("banner.png");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

.page {
  width: min(100%, 826px);
  margin: 0 auto;
  background: var(--white);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
}

.profile {
  border-bottom: 1px solid var(--line);
}

.cover {
  height: clamp(147px, 22vw, 269px);
  background-image: var(--banner);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.profile-body {
  position: relative;
  min-height: 321px;
  padding: 87px 22px 0;
}

.avatar {
  position: absolute;
  top: -60px;
  left: 22px;
  width: 118px;
  height: 118px;
  border: 7px solid var(--white);
  border-radius: 50%;
  background-image: var(--avatar);
  background-size: cover;
  background-position: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

.more {
  position: absolute;
  top: 22px;
  right: 21px;
  display: grid;
  place-items: center;
  width: 59px;
  height: 45px;
  border: 2px solid var(--pill-line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.ukraine-title {
  max-width: 640px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.35;
}

.identity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.08;
}

.handle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.22;
  font-weight: 300;
}

.verified,
.truth-plus {
  display: inline-block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.verified {
  background-image: url("verified.png");
}

.truth-plus {
  width: 21px;
  height: 21px;
  background-image: url("truth-plus.png");
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 21px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.4;
}

.link {
  color: #392ec4;
}

.stats {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.2;
}

.stats strong {
  color: var(--ink);
  font-weight: 600;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 67px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 20px;
  font-weight: 600;
}

.tab.active {
  color: var(--ink);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--purple);
}

.post {
  padding: 29px 21px 25px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.post-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  margin-bottom: 34px;
}

.post-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-image: var(--avatar);
  background-size: cover;
  background-position: center;
}

.post-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}

.post .verified,
.post .truth-plus {
  width: 18px;
  height: 18px;
}

.post-handle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 300;
}

.post-handle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.post-handle-row .post-handle {
  margin-top: 0;
}

.original-post-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4f5a5a;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 300;
  text-decoration: none;
  transition: color .15s ease;
}

.original-post-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.original-post-link:hover {
  color: #e03131;
}

.post-source-id {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 300;
}

.post-text {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.4;
  font-weight: 400;
  white-space: pre-line;
}

.post-text:empty {
  display: none;
}

.post-text a {
  color: #392ec4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.post-text a:hover {
  color: #e03131;
  text-decoration: underline;
}

.post-media {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.post-text:empty + .post-media {
  margin-top: 0;
}

.image-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-height: 560px;
  overflow: hidden;
  border: 1px solid var(--pill-line);
  border-radius: 8px;
  background: #f3f3f6;
}

.image-frame::before {
  content: "";
  position: absolute;
  inset: -24px;
  background-image: var(--media-bg);
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.08);
}

.image-frame img {
  position: relative;
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.post-media video {
  display: block;
  width: 100%;
  max-height: 560px;
  border: 1px solid var(--pill-line);
  border-radius: 8px;
  background: #f3f3f6;
  object-fit: contain;
}

.link-preview {
  display: grid;
  grid-template-columns: minmax(130px, 32%) minmax(0, 1fr);
  gap: 0;
  min-height: 134px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--pill-line);
  border-radius: 8px;
  background: #fbfbfd;
  color: var(--ink);
  text-decoration: none;
}

.link-preview:hover {
  border-color: #d8d8e1;
  background: #f8f8fb;
}

.link-preview.is-x-post {
  grid-template-columns: 1fr;
  border-color: #d7d7df;
  background: #fff;
}

.link-preview.is-loading {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 13px 15px;
  color: var(--muted);
  font-size: 16px;
}

.link-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 134px;
  object-fit: cover;
  background: #f3f3f6;
}

.link-preview-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 14px 16px;
}

.link-preview-site {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-preview strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.link-preview-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.link-preview.is-x-post .link-preview-site {
  color: #536471;
}

.link-preview.is-x-post .link-preview-description {
  color: var(--ink);
  -webkit-line-clamp: 4;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.2;
}

.post-time {
  font-weight: 400;
}

.post-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.original-toggle {
  align-self: start;
  min-width: 86px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.original-toggle:focus {
  outline: none;
}

.original-toggle:active,
.original-toggle.is-active {
  border-color: #1d9bf0;
  background: #1d9bf0;
  color: var(--white);
}

.actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 11px;
  margin-top: 24px;
}

.action {
  display: grid;
  place-items: center;
  height: 59px;
  border: 2px solid var(--pill-line);
  border-radius: 999px;
  background: var(--white);
  color: #73717f;
  font-size: 29px;
  line-height: 1;
  font-weight: 600;
}

.action svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px 16px 30px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
}

.page-button {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.page-button.active {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--white);
  font-weight: 600;
}

.page-button:disabled {
  cursor: default;
  opacity: .35;
}

.page-button:not(:disabled):hover {
  border-color: var(--pill-line);
  background: #f8f8fb;
}

.page-button.active:hover {
  border-color: var(--purple);
  background: var(--purple);
}

@media (max-width: 760px) {
  .page {
    border: 0;
  }

  .cover {
    height: 22vw;
    min-height: 109px;
    max-height: 182px;
  }

  .profile-body {
    min-height: 223px;
    padding: 60px 13px 0;
  }

  .avatar {
    top: -41px;
    left: 13px;
    width: 83px;
    height: 83px;
    border-width: 5px;
  }

  .more {
    top: 14px;
    right: 13px;
    width: 45px;
    height: 35px;
    border-width: 2px;
    font-size: 20px;
  }

  .identity {
    font-size: 22px;
  }

  .ukraine-title {
    margin-bottom: 9px;
    font-size: 14px;
  }

  .handle,
  .meta,
  .stats,
  .tab {
    font-size: 15px;
  }

  .meta {
    gap: 8px;
    margin-top: 17px;
  }

  .stats {
    gap: 13px;
    margin-top: 13px;
  }

  .tabs {
    height: 50px;
  }

  .post {
    padding: 20px 13px 18px;
  }

  .post-head {
    grid-template-columns: 41px minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 24px;
  }

  .post-avatar {
    width: 41px;
    height: 41px;
  }

  .post-name,
  .post-handle {
    font-size: 15px;
  }

  .post-handle-row {
    gap: 9px;
  }

  .original-post-link {
    font-size: 14px;
  }

  .post-source-id {
    font-size: 14px;
  }

  .original-post-link svg {
    width: 14px;
    height: 14px;
  }

  .post-text {
    font-size: 18px;
  }

  .link-preview {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 112px;
  }

  .link-preview-image {
    min-height: 112px;
  }

  .link-preview-body {
    gap: 5px;
    padding: 11px 12px;
  }

  .link-preview strong {
    font-size: 15px;
  }

  .link-preview-site,
  .link-preview-description,
  .link-preview.is-loading {
    font-size: 13px;
  }

  .original-toggle {
    min-width: 74px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .post-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    font-size: 14px;
  }

  .actions {
    gap: 6px;
    margin-top: 17px;
  }

  .action {
    height: 41px;
    border-width: 2px;
    font-size: 20px;
  }

  .action svg {
    width: 20px;
    height: 20px;
  }

  .pagination {
    padding: 18px 12px 24px;
    font-size: 15px;
  }

  .page-button {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
  }
}

@media (max-width: 430px) {
  .identity {
    font-size: 20px;
  }

  .verified,
  .truth-plus {
    width: 18px;
    height: 18px;
  }

  .handle,
  .meta,
  .stats,
  .tab {
    font-size: 13px;
  }

  .post-text {
    font-size: 15px;
  }

  .link-preview {
    grid-template-columns: 1fr;
  }

  .link-preview-image {
    height: 160px;
  }

  .post-head {
    grid-template-columns: 41px minmax(0, 1fr);
  }

  .original-toggle {
    grid-column: 2;
    justify-self: start;
    margin-top: 7px;
  }
}
