.profile-page {
  padding-bottom: 84px;
  background:
    radial-gradient(circle at 82% 4%, rgba(95, 61, 255, 0.06), transparent 23%),
    linear-gradient(180deg, #fff 0, #fafbff 300px, #f7f8fc 100%);
}

.profile-breadcrumb {
  padding-bottom: 23px;
}

.profile-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.dashboard-draft-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #fbfaff, #f6f3ff);
  border-color: #dbd4fa;
  box-shadow: 0 14px 34px rgba(73, 52, 160, 0.07);
}

.dashboard-draft-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: #fff;
  border: 1px solid #ded6ff;
  border-radius: 14px;
  font-size: 24px;
}

.dashboard-draft-copy {
  min-width: 0;
}

.dashboard-draft-kicker {
  display: block;
  color: #6551bf;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-draft-copy h2 {
  margin: 4px 0 0;
  color: #242944;
  font-family: Manrope, Inter, sans-serif;
  font-size: 18px;
}

.dashboard-draft-copy h3 {
  margin: 8px 0 0;
  color: #303750;
  font-size: 13px;
}

.dashboard-draft-copy p {
  max-width: 670px;
  margin: 5px 0 0;
  color: #68738c;
  font-size: 11px;
  line-height: 1.55;
}

.dashboard-draft-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 9px;
  color: #7a849c;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-draft-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dashboard-draft-meta i {
  color: var(--purple);
}

.dashboard-draft-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dashboard-draft-actions form {
  margin: 0;
}

.dashboard-discard-button {
  color: #a32b43;
  background: #fff;
  border-color: #e5b8c1;
}

.dashboard-discard-button:hover,
.dashboard-discard-button:focus-visible {
  color: #8a1d33;
  background: #fff5f7;
  border-color: #d3919f;
}

.profile-cover {
  position: relative;
  height: 126px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 45%, rgba(114, 83, 255, 0.12), transparent 25%),
    linear-gradient(102deg, #f1edff 0%, #f8f6ff 55%, #fff 100%);
  border-bottom: 1px solid #e8e4fb;
}

.profile-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(112, 85, 229, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 85, 229, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, #000, transparent 62%);
}

.cover-kicker {
  position: absolute;
  z-index: 2;
  top: 26px;
  left: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(95, 61, 255, 0.14);
  border-radius: 999px;
  color: #5840c5;
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.cover-line {
  position: absolute;
  z-index: 2;
  top: 69px;
  left: 30px;
  margin: 0;
  color: #6b638c;
  font-size: 12px;
  font-weight: 600;
}

.profile-cover-art {
  position: absolute;
  z-index: 1;
  top: 0;
  right: -12px;
  width: 470px;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 19%;
  opacity: 0.78;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 24%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 24%, #000 100%);
  pointer-events: none;
}

.profile-summary {
  position: relative;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) auto;
  gap: 22px;
  padding: 25px 29px 27px;
}

.profile-photo-wrap {
  position: relative;
  align-self: start;
  margin-top: -73px;
}

.profile-photo {
  width: 124px;
  height: 124px;
  display: block;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #eae6ff;
  box-shadow: 0 12px 30px rgba(32, 28, 74, 0.16);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.online-dot {
  position: absolute;
  right: 5px;
  bottom: 7px;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2bc46b;
}

.profile-identity {
  min-width: 0;
}

.identity-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 9px;
  row-gap: 6px;
}

.identity-line h1 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.65px;
}

.profile-handle {
  display: inline-flex;
  align-items: center;
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.owner-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #5b4b83;
  background: #f2effb;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.administrator-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #d9cff5;
  border-radius: 999px;
  color: #4d2f8f;
  background: #f2effb;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.administrator-pill i {
  color: var(--purple);
  font-size: 12px;
}

.profile-bio {
  max-width: 720px;
  margin: 11px 0 0;
  color: #52607d;
  font-size: 13px;
  line-height: 1.65;
}

.profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.profile-meta span,
.profile-meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-meta a {
  color: var(--purple);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.profile-actions .icon-only {
  width: 42px;
  padding: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #fbfbfe;
}

.profile-stat {
  position: relative;
  padding: 15px 12px;
  text-align: center;
}

.profile-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 0;
  bottom: 15px;
  width: 1px;
  background: #e7e9f0;
}

.profile-stat strong,
.profile-stat span {
  display: block;
}

.profile-stat strong {
  font-family: Manrope, Inter, sans-serif;
  font-size: 17px;
}

.profile-stat span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 24px;
  align-items: start;
}

.profile-content,
.profile-sidebar {
  min-width: 0;
}

.profile-sidebar {
  display: grid;
  gap: 14px;
}

.activity-panel {
  overflow: hidden;
}

.profile-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar {
  display: none;
}

.profile-tab {
  position: relative;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 0;
  color: #62708d;
  background: transparent;
  font-size: 11.5px;
  font-weight: 800;
}

.profile-tab::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.profile-tab:hover,
.profile-tab:focus-visible,
.profile-tab.is-active {
  color: var(--purple);
}

.profile-tab.is-active::after {
  background: var(--purple);
}

.tab-count {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #75809a;
  background: #eef0f5;
  font-size: 8.5px;
}

.profile-tab.is-active .tab-count {
  color: #5538d7;
  background: var(--purple-soft);
}

.tab-panel {
  padding: 22px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.panel-title h2 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 18px;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.feed-list {
  display: grid;
}

.feed-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 16px 3px;
  border-top: 1px solid #eceef4;
}

.feed-item:first-child {
  border-top: 0;
}

.feed-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: var(--purple);
  background: var(--purple-soft);
  font-size: 17px;
}

.feed-icon.answer {
  color: #168049;
  background: var(--green-soft);
}

.feed-icon.article {
  color: #9d600f;
  background: #fff3df;
}

.feed-icon.edit {
  color: #34718b;
  background: #eaf5fa;
}

.feed-copy {
  min-width: 0;
}

.feed-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
  color: #7a849d;
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.accepted-label {
  padding: 3px 6px;
  border-radius: 999px;
  color: #157c47;
  background: var(--green-soft);
}

.feed-copy h3 {
  margin: 0;
  overflow: hidden;
  color: #182139;
  font-size: 13px;
  line-height: 1.38;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.edit-summary {
  margin-top: 7px;
  padding-left: 9px;
  border-left: 2px solid #8cb5c7;
  color: #55707d;
  font-size: 9.5px;
  line-height: 1.45;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #78839c;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.feed-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.side-card {
  padding: 20px;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.side-heading h2,
.side-card > h2 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  font-size: 14px;
}

.side-heading a {
  color: var(--purple);
  font-size: 9px;
  font-weight: 800;
}

.badge-list {
  display: grid;
  gap: 8px;
}

.badge-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid #e8eaf1;
  border-radius: 9px;
  text-align: left;
  background: #fbfbfe;
  transition: border-color 160ms ease, background 160ms ease;
}

.badge-row:hover,
.badge-row:focus-visible {
  border-color: #cec5ff;
  background: #f9f7ff;
}

.badge-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #7358ff, #4e2dd4);
  box-shadow: 0 6px 14px rgba(79, 46, 211, 0.18);
  font-size: 15px;
}

.badge-icon.gold {
  background: linear-gradient(145deg, #efb848, #b87414);
  box-shadow: 0 6px 14px rgba(184, 116, 20, 0.17);
}

.badge-icon.green {
  background: linear-gradient(145deg, #38c778, #168748);
  box-shadow: 0 6px 14px rgba(22, 135, 72, 0.17);
}

.badge-copy strong,
.badge-copy span {
  display: block;
}

.badge-copy strong {
  color: #24304a;
  font-size: 10.5px;
}

.badge-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.badge-date {
  color: #8a93a8;
  font-size: 8px;
}

.badge-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #dfe1ea;
  border-radius: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.badge-empty > i {
  color: var(--purple);
  font-size: 22px;
}

.badge-empty strong {
  display: block;
  color: #4a5570;
  font-size: 10px;
}

.badge-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.badge-catalog-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 15px;
  border: 1px solid #e5e7ef;
  border-radius: 12px;
  background: #fbfbfe;
}

.badge-catalog-item .badge-icon {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.badge-catalog-item.is-locked .badge-icon {
  filter: grayscale(1);
  opacity: 0.48;
}

.badge-catalog-copy h3 {
  margin: 3px 0 0;
  color: #24304a;
  font-family: Manrope, Inter, sans-serif;
  font-size: 13px;
}

.badge-catalog-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.badge-state,
.badge-earned-date,
.badge-progress-copy {
  color: #8a93a8;
  font-size: 8px;
  font-weight: 800;
}

.badge-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-catalog-item.is-locked .badge-state {
  color: #8a93a8;
}

.badge-earned-date,
.badge-progress-copy {
  display: block;
  margin-top: 8px;
}

.badge-progress {
  height: 5px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: #eceef4;
}

.badge-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5f3dff, #8b75ff);
}

.standing-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.standing-value strong {
  font-family: Manrope, Inter, sans-serif;
  font-size: 25px;
}

.standing-value span {
  color: var(--muted);
  font-size: 9px;
}

.standing-bar {
  height: 7px;
  overflow: hidden;
  margin-top: 11px;
  border-radius: 999px;
  background: #eceef4;
}

.standing-bar span {
  width: 72%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #5f3dff, #8b75ff);
}

.standing-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8.5px;
}

.standing-next strong {
  color: #4a5570;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.public-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.public-note i {
  flex: 0 0 auto;
  color: var(--purple);
  font-size: 15px;
}

.profile-modal {
  width: min(590px, 100%);
}

.profile-form {
  margin-top: 19px;
}

.photo-edit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfe;
}

.photo-preview {
  width: 66px;
  height: 66px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #eae6ff;
  box-shadow: 0 7px 16px rgba(29, 27, 69, 0.11);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-edit-copy strong,
.photo-edit-copy span {
  display: block;
}

.photo-edit-copy strong {
  font-size: 11px;
}

.photo-edit-copy span {
  margin: 3px 0 8px;
  color: var(--muted);
  font-size: 9px;
}

.upload-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--purple);
  background: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 15px;
}

.field {
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: #29334d;
  font-size: 10px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 11.5px;
}

.field input {
  height: 41px;
  padding: 0 11px;
}

.field textarea {
  min-height: 94px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-color: #9c8aff;
  box-shadow: 0 0 0 3px rgba(95, 61, 255, 0.08);
}

.field-help {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8.5px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 11px;
  border-radius: 8px;
  color: #584d76;
  background: var(--purple-faint);
  font-size: 9px;
  line-height: 1.5;
}

.privacy-note i {
  color: var(--purple);
}

@media (max-width: 1040px) {
  .profile-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

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

  .profile-photo {
    width: 112px;
    height: 112px;
  }

  .profile-actions {
    grid-column: 2;
  }
}

@media (max-width: 880px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

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

  .profile-sidebar .public-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-draft-card {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .dashboard-draft-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 20px;
  }

  .dashboard-draft-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .profile-cover {
    height: 104px;
  }

  .cover-kicker {
    top: 20px;
    left: 18px;
  }

  .cover-line {
    top: 59px;
    left: 18px;
  }

  .profile-cover-art {
    top: 0;
    right: -52px;
    width: 330px;
    height: 100%;
    object-position: center 18%;
    opacity: 0.62;
  }

  .profile-summary {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 15px;
    padding: 19px 17px 21px;
  }

  .profile-photo-wrap {
    margin-top: -52px;
  }

  .profile-photo {
    width: 86px;
    height: 86px;
    border-width: 4px;
  }

  .identity-line h1 {
    font-size: 23px;
  }

  .owner-pill {
    display: none;
  }

  .administrator-pill {
    padding: 5px 7px;
    font-size: 9px;
  }

  .profile-bio {
    grid-column: 1 / -1;
  }

  .profile-actions {
    grid-column: 1 / -1;
  }

  .profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-stat:nth-child(3)::after,
  .profile-stat:last-child::after {
    display: none;
  }

  .profile-stat:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .feed-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .feed-icon {
    width: 38px;
    height: 38px;
  }

  .feed-meta {
    grid-column: 2;
    justify-content: flex-start;
  }

  .profile-sidebar {
    grid-template-columns: 1fr;
  }

  .profile-sidebar .public-card {
    grid-column: auto;
  }

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

  .field.full {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .badge-catalog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 470px) {
  .cover-line {
    max-width: 190px;
    font-size: 10px;
  }

  .profile-cover-art {
    right: -90px;
    width: 310px;
    opacity: 0.52;
  }

  .profile-summary {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .profile-photo {
    width: 76px;
    height: 76px;
  }

  .profile-photo-wrap {
    margin-top: -45px;
  }

  .identity-line h1 {
    font-size: 21px;
  }

  .profile-handle {
    width: 100%;
  }

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

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

  .profile-stat:nth-child(even)::after {
    display: none;
  }

  .profile-stat:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .tab-panel {
    padding: 18px 15px;
  }

  .photo-edit-row {
    align-items: flex-start;
  }
}

.profile-stats.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .profile-stats.is-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-stats.is-four .profile-stat:nth-child(n) {
    grid-column: auto;
  }

  .profile-stats.is-four .profile-stat:nth-child(2)::after,
  .profile-stats.is-four .profile-stat:nth-child(4)::after {
    display: none;
  }
}
