@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Pacifico&display=swap");

:root {
  --pg-gradient-start: #7b9fff;
  --pg-gradient-mid: #21d0c3;
  --pg-gradient-end: #21d0c3;
  --pg-gradient-dark: #5164ff;
  --pg-text-dark: #14161a;
  --pg-muted: #737b86;
  --pg-border: #e2e6f0;
  --pg-card-bg: #ffffff;
  --pg-soft-bg: #f5f7fb;
  --pg-accent: #ffd37d;
  --pg-like: #f66d6d;
  --pg-focus: #b388ff;
}

body {
  background: #fafafa;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--pg-text-dark);
}

.feed-header {
  align-items: center;
}

.paper-feed {
  max-width: 780px;
  margin: 0 auto;
}

.paper-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--pg-card-bg);
  border: 1px solid rgba(17, 23, 41, 0.08);
  box-shadow: 0 20px 45px rgba(17, 23, 41, 0.08);
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.5rem 0.75rem;
}

.feed-card-header .btn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3949ab;
  border-color: rgba(57, 73, 171, 0.2);
}

.feed-card-header .btn:hover {
  background: rgba(57, 73, 171, 0.1);
}

.feed-avatar {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.feed-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pg-gradient-start), var(--pg-gradient-mid), var(--pg-gradient-end));
}

.feed-avatar img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.feed-avatar .initials {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--pg-gradient-dark);
  font-size: 1.1rem;
}

.feed-preview,
.paper-preview,
.paper-preview-lg {
  background: linear-gradient(160deg, rgba(106, 90, 249, 0.35), rgba(255, 126, 179, 0.45));
}

.feed-preview.has-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: none;
}

.feed-preview.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.feed-preview iframe,
.paper-preview iframe,
.paper-preview-lg iframe {
  border: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: #11131f;
}

.paper-preview-lg img {
  width: 100%;
  border-radius: 18px;
  display: block;
}

.feed-preview {
  border-radius: 18px;
  overflow: hidden;
  display: block;
}


.feed-preview-placeholder {
  border-radius: 18px;
  min-height: 320px;
  background: rgba(57, 73, 171, 0.15);
  font-size: 3rem;
  color: rgba(57, 73, 171, 0.5);
}

.feed-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.feed-meta h2 a {
  color: var(--pg-text-dark);
}

.feed-meta small a {
  color: inherit;
}

.feed-controls {
  background: var(--pg-soft-bg);
  border-radius: 20px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--pg-border);
  gap: 1.25rem;
}

.feed-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.35rem;
  box-shadow: inset 0 1px 3px rgba(17, 23, 41, 0.08);
}

.feed-tabs a,
.feed-tabs button {
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  border: none;
  font-weight: 600;
  color: #5c5f6d;
  background: transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}

.feed-tabs a.active,
.feed-tabs button.active,
.feed-tabs button[aria-expanded="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--pg-gradient-start), var(--pg-gradient-mid), var(--pg-gradient-end));
  box-shadow: 0 6px 18px rgba(106, 90, 249, 0.35);
}

.feed-control-search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.feed-control-search input {
  border-radius: 999px;
  padding-inline: 1rem;
}

.feed-extra-trigger {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.feed-extra-panels .feed-extra {
  margin-top: 0.75rem;
}

.feed-extra-panels .feed-extra .card {
  border-radius: 18px;
}

.btn-gradient {
  background: linear-gradient(135deg, var(--pg-gradient-start), var(--pg-gradient-mid), var(--pg-gradient-end));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(106, 90, 249, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-gradient:hover,
.btn-gradient:focus {
  color: #fff;
  transform: translateY(-1px);
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.follow-suggestions .profile-item + .profile-item {
  border-top: 1px solid rgba(17, 23, 41, 0.08);
}

.profile-item .profile-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.profile-item .avatar-sm {
  width: 38px;
  height: 38px;
  position: relative;
  flex-shrink: 0;
}

.profile-item .avatar-sm::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pg-gradient-start), var(--pg-gradient-mid), var(--pg-gradient-end));
}

.profile-item .avatar-sm img,
.profile-item .avatar-sm .initials {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--pg-gradient-dark);
}

.meta-subtext {
  color: var(--pg-muted);
  font-size: 0.85rem;
}

.feed-link,
.feed-link:hover {
  color: var(--pg-gradient-dark);
  font-weight: 600;
}

.follow-chip {
  border-radius: 999px !important;
  padding: 0.4rem 0.95rem !important;
}

.paper-meta dt {
  font-weight: 600;
}

.paper-meta dd {
  margin-bottom: 0.25rem;
}

.feed-card-header .btn {
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3949ab;
  border-color: rgba(57, 73, 171, 0.25);
  background: rgba(255, 255, 255, 0.85);
}

.feed-card-header .btn:hover {
  background: rgba(57, 73, 171, 0.12);
  color: #2c387e;
}

.feed-tags .badge {
  background: #f1f3f5;
  color: #3949ab;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
}

.feed-tags .badge:hover {
  background: #e2e6f5;
  color: #2c387e;
}

.feed-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
}

.like-button,
.comment-button,
.share-button {
  background: none;
  border: none;
  color: #4f5668;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease, color 0.2s ease;
}

.like-button:hover,
.comment-button:hover,
.share-button:hover {
  transform: scale(1.05);
  color: #e1306c;
}

.like-button.active,
.like-button.active .bi {
  color: #e1306c;
}

.like-button.detail {
  font-size: 1.75rem;
  padding: 0;
}

.feed-stats {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.feed-caption {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: #2f3349;
}

.feed-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  color: #385185;
}

.feed-link:hover {
  text-decoration: underline;
}

.feed-pagination {
  margin-top: 2rem;
}

/* --- Nordic Play refresh ------------------------------------------------ */

.btn-cta {
  background: linear-gradient(120deg, var(--pg-gradient-start), var(--pg-gradient-mid));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(123, 159, 255, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-cta:hover,
.btn-cta:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(123, 159, 255, 0.35);
}

.feed-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.gradient-card {
  border-radius: 24px;
  padding: 2.25rem 2.5rem;
  background: linear-gradient(135deg, rgba(123, 159, 255, 0.18), rgba(33, 208, 195, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  width: 100%;
}

.feed-eyebrow {
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pg-muted);
}

.feed-title {
  font-weight: 800;
  font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem);
}

.feed-nav-wrapper {
  display: flex;
  flex-direction: column;
}

.feed-tabs {
  position: relative;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 230, 240, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px rgba(20, 22, 26, 0.05);
  align-self: stretch;
  width: 100%;
  justify-content: space-between;
  overflow: hidden;
}

.feed-tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--pg-muted);
  font-weight: 600;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 0;
  justify-content: center;
  z-index: 1;
}

.feed-tab.feed-tab--button {
  cursor: pointer;
}

.feed-tab.is-active {
  color: #ffffff;
}

.feed-tab:hover,
.feed-tab:focus-visible {
  color: var(--pg-text-dark);
}

.feed-tab__badge {
  background: rgba(123, 159, 255, 0.15);
  color: var(--pg-gradient-dark);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.feed-tab.is-active .feed-tab__badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.feed-tabs__indicator {
  position: absolute;
  top: 0.4rem;
  height: calc(100% - 0.8rem);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--pg-gradient-start), var(--pg-gradient-mid));
  box-shadow: 0 10px 24px rgba(123, 159, 255, 0.32);
  transition: transform 0.25s ease, width 0.25s ease;
  pointer-events: none;
  z-index: 0;
}

.feed-stats {
  margin-top: 1.25rem;
  color: var(--pg-muted);
  font-size: 0.85rem;
}

.feed-stats__label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.feed-stats__value {
  display: block;
  font-size: 1.1rem;
  color: var(--pg-text-dark);
  font-weight: 700;
}

.feed-search-panel {
  margin-top: 1.5rem;
  display: none;
}

.feed-search-panel.is-visible {
  display: block;
}

.feed-search-shell {
  border-radius: 20px;
  border: 1px solid var(--pg-border);
  background: var(--pg-card-bg);
  padding: 1.5rem;
  box-shadow: 0 14px 32px rgba(20, 22, 26, 0.06);
}

.feed-search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--pg-border);
  border-radius: 14px;
  background: var(--pg-soft-bg);
}

.feed-search-bar i {
  color: var(--pg-muted);
  font-size: 1.1rem;
}

.feed-search-bar input {
  border: none;
  background: transparent;
  font-weight: 500;
  padding: 0;
}

.feed-search-bar input:focus {
  outline: none;
  box-shadow: none;
}

.feed-search-hint {
  font-size: 0.85rem;
}

.feed-search-results {
  display: grid;
  gap: 1.25rem;
}

.search-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pg-muted);
  margin-bottom: 0.6rem;
}

.search-result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.search-result-list li {
  border-radius: 14px;
  overflow: hidden;
}

.search-result-list li a {
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  background: rgba(123, 159, 255, 0.07);
  text-decoration: none;
  color: var(--pg-text-dark);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-result-list li a span {
  font-size: 0.85rem;
  color: var(--pg-muted);
}

.search-result-list li a:hover,
.search-result-list li a:focus-visible {
  border-color: rgba(123, 159, 255, 0.35);
  background: rgba(123, 159, 255, 0.12);
}

.search-result-list li.is-active a {
  border-color: rgba(123, 159, 255, 0.6);
  background: linear-gradient(120deg, rgba(123, 159, 255, 0.23), rgba(33, 208, 195, 0.18));
}

.search-result-list mark {
  background: var(--pg-accent);
  color: var(--pg-text-dark);
  border-radius: 4px;
  padding: 0 0.2rem;
}

.search-empty {
  text-align: center;
  font-size: 0.9rem;
}

.partner-rail .card-body {
  padding: 1.5rem;
}

.partner-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
}

.partner-track::-webkit-scrollbar {
  height: 6px;
}

.partner-track::-webkit-scrollbar-thumb {
  background: rgba(123, 159, 255, 0.35);
  border-radius: 999px;
}

.partner-tile {
  border: 1px solid var(--pg-border);
  border-radius: 18px;
  padding: 1rem;
  background: var(--pg-card-bg);
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.partner-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(123, 159, 255, 0.25), rgba(33, 208, 195, 0.25));
  color: var(--pg-gradient-dark);
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
}

.partner-avatar img,
.partner-avatar .initials {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.partner-name {
  font-weight: 600;
  text-decoration: none;
  color: var(--pg-text-dark);
}

.partner-name:hover {
  color: var(--pg-gradient-dark);
}

.partner-meta {
  max-width: 160px;
}

.feed-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
  .feed-grid {
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  }
}

.feed-main {
  display: grid;
  gap: 1.75rem;
}

.filter-card .hashtag-chip {
  background: rgba(123, 159, 255, 0.12);
  border-color: rgba(123, 159, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-card .hashtag-chip.is-active {
  background: linear-gradient(120deg, rgba(123, 159, 255, 0.24), rgba(33, 208, 195, 0.2));
  color: var(--pg-text-dark);
}

.feed-sidebar .card-body {
  padding: 1.5rem;
}

.sidebar-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}

.sidebar-person + .sidebar-person {
  border-top: 1px solid var(--pg-border);
}

.sidebar-person__meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
  background: rgba(123, 159, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pg-gradient-dark);
  font-weight: 700;
}

.sidebar-avatar img,
.sidebar-avatar .initials {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: cover;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.insight-panel {
  border-top: 1px solid var(--pg-border);
  padding-top: 1rem;
}

.insight-list {
  display: grid;
  gap: 0.5rem;
}

.insight-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
}

.insight-list li a {
  color: var(--pg-text-dark);
}

.insight-list li a:hover {
  color: var(--pg-gradient-dark);
}

.explore-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.explore-grid {
  display: grid;
  gap: 1.75rem;
}

.explore-panel .card-body {
  padding: 1.75rem;
}

.explore-user .card-body {
  padding: 1.25rem;
}

.explore-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(123, 159, 255, 0.25), rgba(33, 208, 195, 0.25));
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.explore-avatar img {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
}

.explore-hashtag-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.explore-tag-card {
  border: 1px solid rgba(226, 230, 240, 0.85);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(123, 159, 255, 0.08);
  text-decoration: none;
  color: var(--pg-text-dark);
  display: grid;
  gap: 0.45rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.explore-tag-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(20, 22, 26, 0.08);
}

.explore-tag-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.explore-tag-card .hashtag {
  font-weight: 700;
}

.explore-growth-list {
  display: grid;
  gap: 0.6rem;
}

.explore-growth-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.explore-growth-list li a {
  font-weight: 600;
  color: var(--pg-text-dark);
}

.explore-growth-list li a:hover {
  color: var(--pg-gradient-dark);
}

.explore-paper-grid {
  display: grid;
  gap: 1rem;
}

.explore-paper-card {
  border: 1px solid rgba(226, 230, 240, 0.85);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  background: var(--pg-card-bg);
  box-shadow: 0 10px 24px rgba(20, 22, 26, 0.05);
  display: grid;
  gap: 0.5rem;
}

.explore-paper-card__header a {
  color: var(--pg-text-dark);
}

.explore-paper-card__header a:hover {
  color: var(--pg-gradient-dark);
}

@media (min-width: 992px) {
  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.paper-card {
  background: var(--pg-card-bg);
  border: 1px solid rgba(226, 230, 240, 0.85);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(20, 22, 26, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.paper-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(20, 22, 26, 0.09);
}

.paper-card__header {
  display: flex;
  gap: 1.1rem;
  padding: 1.5rem 1.75rem 1rem;
  align-items: flex-start;
}

.paper-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(123, 159, 255, 0.4), rgba(33, 208, 195, 0.4));
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pg-gradient-dark);
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
}

.paper-card__avatar img,
.paper-card__avatar .initials {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.paper-card__meta {
  flex: 1;
}

.paper-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-card__title a {
  color: var(--pg-text-dark);
  text-decoration: none;
}

.paper-card__title a:hover {
  color: var(--pg-gradient-dark);
}

.paper-card__subtitle {
  font-size: 0.9rem;
  color: var(--pg-muted);
}

.paper-card__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.paper-card__body {
  padding: 0 1.75rem 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.paper-card__details {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--pg-muted);
}

.paper-card__details .label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: 0.7rem;
  margin-right: 0.35rem;
  color: var(--pg-muted);
}

.paper-card__summary {
  position: relative;
  color: var(--pg-text-dark);
  font-size: 1rem;
  line-height: 1.6;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.paper-card__summary[data-teaser] {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  max-height: 7.5rem;
}

.paper-card__summary[data-expanded="true"] {
  -webkit-line-clamp: unset;
  max-height: none;
}

.paper-card:hover .paper-card__summary[data-teaser][data-expanded="false"] {
  -webkit-line-clamp: 6;
  max-height: 10.5rem;
}

.paper-card__summary-toggle {
  border: none;
  background: none;
  color: var(--pg-gradient-dark);
  font-weight: 600;
  padding: 0;
  width: max-content;
}

.paper-card__summary-toggle:hover {
  text-decoration: underline;
}

.paper-card__hashtags {
  padding: 0 1.75rem 1.25rem;
}

.hashtag-track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.hashtag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(123, 159, 255, 0.35);
  background: rgba(123, 159, 255, 0.08);
  color: var(--pg-gradient-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.hashtag-chip:hover {
  background: rgba(123, 159, 255, 0.18);
}

.paper-card__footer {
  padding: 1.25rem 1.75rem 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  align-items: center;
  border-top: 1px solid var(--pg-border);
}

.paper-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--pg-muted);
  text-decoration: none;
  font-weight: 600;
  border: none;
  background: none;
  padding: 0;
  transition: transform 0.15s ease, color 0.2s ease;
}

.paper-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(123, 159, 255, 0.12);
  color: var(--pg-gradient-dark);
}

.paper-action:hover,
.paper-action:focus-visible {
  transform: translateY(-1px);
  color: var(--pg-text-dark);
}

.paper-action.is-active .paper-action__icon,
.paper-action.is-active i {
  background: rgba(246, 109, 109, 0.18);
  color: var(--pg-like);
}

.paper-card__stats {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--pg-muted);
}

.paper-card__stat {
  font-weight: 600;
}

.empty-state {
  border-radius: 24px;
  background: var(--pg-card-bg);
  border: 1px solid var(--pg-border);
  box-shadow: 0 12px 32px rgba(20, 22, 26, 0.06);
}

.feed-pagination {
  margin-top: 1rem;
  padding: 1.5rem 1.75rem;
  border-radius: 18px;
  border: 1px solid var(--pg-border);
  background: var(--pg-card-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.feed-pagination .btn {
  border-radius: 999px;
}

.feed-search-panel .btn-link {
  font-weight: 600;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(179, 136, 255, 0.3);
}

.paper-action:focus-visible,
.feed-tab:focus-visible,
.hashtag-chip:focus-visible,
.partner-avatar:focus-visible {
  outline: 3px solid rgba(179, 136, 255, 0.4);
  outline-offset: 3px;
}

.paper-card__summary-toggle[hidden] {
  display: none;
}

.snackbar {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 100%);
  background: rgba(20, 22, 26, 0.92);
  color: #fff;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  box-shadow: 0 18px 34px rgba(20, 22, 26, 0.3);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 1050;
}

.snackbar.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 767.98px) {
  .paper-card__header {
    flex-wrap: wrap;
  }

  .paper-card__header-actions {
    margin-left: auto;
  }

  .feed-tabs {
    width: 100%;
  }

  .feed-tab {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.detail-actions .like-button {
  font-size: 1.75rem;
}

.detail-actions span {
  font-size: 0.95rem;
}

.navbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--pg-like);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #262626;
}

.navbar-brand .brand-script {
  font-family: "Pacifico", cursive;
  font-size: 1.5rem;
  color: #262626;
  letter-spacing: 0.03em;
}

.navbar-brand .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pg-gradient-start), var(--pg-gradient-end));
}

.card {
  border-radius: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pg-gradient-mid), var(--pg-gradient-end));
  border: none;
  box-shadow: 0 12px 20px rgba(106, 90, 249, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--pg-gradient-start), var(--pg-gradient-mid));
}

.btn-outline-dark {
  border-color: var(--pg-border);
  color: #262626;
  font-weight: 500;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
  background: rgba(38, 38, 38, 0.05);
  border-color: var(--pg-border);
  color: #262626;
}

.btn-outline-primary {
  border-radius: 999px;
}

.lead {
  color: #4a4f5a;
}

.conversation-box {
  max-height: 400px;
  overflow-y: auto;
  background: #f1f3ff;
  border-radius: 0.75rem;
  padding: 1rem;
}

.message {
  padding: 0.75rem;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.message-outgoing {
  border-left: 4px solid #3949ab;
}

.message-incoming {
  border-left: 4px solid #8e24aa;
}

.list-group-item {
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.list-group-item:last-child {
  border-bottom: 0;
}

footer {
  margin-top: auto;
}

/* Login page */
.auth-hero {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.auth-wrapper {
  display: flex;
  justify-content: center;
  width: min(420px, 100%);
}

.auth-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 30px 70px rgba(106, 90, 249, 0.12);
}

.auth-card form {
  width: 100%;
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.auth-card .form-label {
  color: var(--pg-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-card .form-control {
  border-radius: 12px;
  border: 1px solid var(--pg-border);
  padding: 0.75rem 1rem;
  background: #fafafa;
}

.auth-card .form-control:focus {
  border-color: rgba(106, 90, 249, 0.65);
  box-shadow: 0 0 0 4px rgba(106, 90, 249, 0.12);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--pg-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: var(--pg-border);
}

.brand-script-large {
  font-family: "Pacifico", cursive;
  font-size: 2rem;
  color: #262626;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, calc(100% - 2.5rem));
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  z-index: 1060;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.container-small {
  width: 100%;
}

@media (max-width: 992px) {
  .auth-wrapper {
    text-align: center;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .cookie-banner {
    bottom: 1rem;
    width: calc(100% - 1.5rem);
    padding: 1.25rem;
  }
}

.settings-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.settings-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(106, 90, 249, 0.1);
}

.settings-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.settings-card .form-control {
  border-radius: 12px;
  border: 1px solid var(--pg-border);
  background: #fafafa;
}

.settings-card .form-control:focus {
  border-color: rgba(106, 90, 249, 0.65);
  box-shadow: 0 0 0 4px rgba(106, 90, 249, 0.15);
}

@media (max-width: 768px) {
  .settings-card {
    padding: 1.5rem;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #0f0f0f;
    color: #e4e4e4;
  }

  .settings-card,
  .auth-card,
  .paper-card,
  .card {
    background: #161617;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  }

  .cookie-banner {
    background: #161617;
    border-color: rgba(255, 255, 255, 0.05);
    color: #e4e4e4;
  }

  .feed-preview,
  .paper-preview,
  .paper-preview-lg {
    background: linear-gradient(160deg, rgba(106, 90, 249, 0.3), rgba(24, 24, 24, 0.8));
  }
}


.pdf-frame {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.pdf-object {
  width: 100%;
  min-height: 520px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .pdf-frame {
    background: #161617;
    border-color: rgba(255, 255, 255, 0.08);
  }

  .pdf-object {
    background: #0f0f0f;
  }
}
.paper-card__media {
  position: relative;
  display: block;
  margin: 0 1.75rem 1.25rem;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(123, 159, 255, 0.18), rgba(33, 208, 195, 0.12));
  color: var(--pg-gradient-dark);
  text-decoration: none;
  aspect-ratio: 4 / 3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.paper-card__media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--pg-gradient-dark);
}

.paper-card__media-placeholder i {
  font-size: 2.2rem;
}

.paper-card__media:hover,
.paper-card__media:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(20, 22, 26, 0.08);
}
.notifications-shell .card {
  border-radius: 20px;
}

.notification-unread {
  background: rgba(123, 159, 255, 0.08);
}
