@font-face {
  font-family: "PoetsenOne";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/PoetsenOne-Regular.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --damus-bg: #060114;
  --damus-gradient: radial-gradient(circle at 18% 20%, rgba(248, 79, 255, 0.28) 0%, rgba(34, 5, 66, 0.82) 45%, rgba(6, 1, 20, 0.96) 100%);
  --damus-card-bg: rgba(22, 10, 38, 0.82);
  --damus-card-border: rgba(255, 255, 255, 0.08);
  --damus-text: #f5f2ff;
  --damus-muted: rgba(226, 215, 255, 0.72);
  --damus-accent: #bd66ff;
  --damus-accent-strong: #ff59d5;
  --damus-highlight: rgba(189, 102, 255, 0.16);
  --damus-font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--damus-font);
  background: var(--damus-bg);
  color: var(--damus-text);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* The gradient lives on its own fixed layer, which the browser composites
   once, rather than as a `background-attachment: fixed` background, which
   repaints the whole viewport every scroll frame and flickers under the
   backdrop-filter blurs. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--damus-gradient), var(--damus-bg);
  pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--damus-accent);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: var(--damus-accent-strong);
  text-decoration: underline;
}

.damus-app {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 48px 16px 72px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 768px) {
  .damus-app {
    padding: 64px 32px 96px;
  }
}

.damus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.damus-logo-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.damus-logo-image {
  width: clamp(36px, 7vw, 48px);
  height: clamp(36px, 7vw, 48px);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.damus-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.damus-link {
  color: var(--damus-muted);
  font-weight: 600;
  text-decoration: none;
}

.damus-link:hover {
  color: #ffffff;
}

.damus-cta {
  background: linear-gradient(135deg, var(--damus-accent), var(--damus-accent-strong));
  color: #090118;
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 34px rgba(189, 102, 255, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.damus-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(189, 102, 255, 0.45);
  text-decoration: none;
}


.damus-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.damus-supporting {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--damus-muted);
  max-width: 720px;
}

.damus-card {
  background: var(--damus-card-bg);
  border: 1px solid var(--damus-card-border);
  border-radius: 28px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: 0 25px 60px rgba(5, 0, 21, 0.5);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.damus-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.damus-section-title {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  color: #ffffff;
}

.damus-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--damus-muted);
}

.damus-profile-meta-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.damus-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(189, 102, 255, 0.18);
  color: var(--damus-accent-strong);
}

.damus-meta-icon svg {
  width: 18px;
  height: 18px;
}

.damus-profile-meta-row a {
  color: inherit;
  text-decoration: none;
  word-break: break-all;
}

.damus-profile-meta-row a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.damus-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;
}

.damus-note-header,
.damus-profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.damus-note-avatar {
  width: 64px;
  height: 64px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.damus-note-author {
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
}

.damus-note-handle {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--damus-muted);
}

.damus-note-time {
  font-size: 0.9rem;
  color: var(--damus-muted);
  display: block;
  margin-top: 4px;
}

.damus-note-body {
  font-size: 1.05rem;
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.damus-note-body img {
  max-width: 100%;
  border-radius: 20px;
  margin: 1.25rem 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.damus-note-body ul,
.damus-note-body ol {
  padding-left: 1.25rem;
  margin: 0 0 1.1em;
}

.damus-note-body blockquote {
  margin: 0 0 1.1em;
  padding-left: 1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
}

.damus-note-body code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.damus-note-body video {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.damus-note-body pre {
  background: rgba(0, 0, 0, 0.35);
  padding: 1rem;
  border-radius: 16px;
  margin: 1.25rem 0;
  overflow-x: auto;
}

.damus-article-title {
  font-family: "PoetsenOne", var(--damus-font);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
}

.damus-article-hero {
  max-width: 100%;
  border-radius: 28px;
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.35);
}

.damus-article-summary {
  font-size: 1.1rem;
  color: var(--damus-muted);
  margin: 0;
}

.damus-article-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.damus-article-topic {
  background: rgba(189, 102, 255, 0.12);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Draft badge for unpublished articles (kind:30024) */
.damus-article-draft {
  background: linear-gradient(135deg, #ff6b35, #f7931a);
  color: #ffffff;
  padding: 0.25em 0.65em;
  border-radius: 6px;
  font-family: var(--damus-font);
  font-size: 0.4em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 0.75em;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* NIP-84 Highlight styles (kind:9802) */
.damus-highlight-text {
  border-left: 3px solid var(--damus-accent);
  padding-left: 1.25rem;
  margin: 0;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--damus-text);
}

.damus-highlight-context {
  color: var(--damus-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.damus-highlight-source {
  font-size: 0.9rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--damus-card-border);
}

.damus-highlight-source-label {
  color: var(--damus-muted);
  margin-right: 0.35em;
}

.damus-highlight-comment {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.damus-profile-card {
  gap: 1.5rem;
}

.damus-profile-names {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.damus-profile-handle {
  font-size: 1rem;
  color: var(--damus-muted);
}

.damus-profile-about {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--damus-muted);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.damus-relays {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.damus-relays summary {
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
  list-style: none;
}

.damus-relays summary::-webkit-details-marker {
  display: none;
}

.damus-relay-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--damus-muted);
}

.damus-relay-role {
  margin-left: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
}

.damus-footer {
  color: var(--damus-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  justify-content: center;
  align-items: center;
}

.damus-footer a {
  color: inherit;
}

.damus-footer a:hover {
  color: #ffffff;
}

.muted-link {
  color: var(--damus-muted);
}

.muted-link:hover {
  color: #ffffff;
}

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

/* NIP-18 Embedded Quotes (q tags) */
.damus-embedded-quotes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.damus-embedded-quote {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--damus-card-border);
  border-radius: 16px;
  padding: 0.875rem 1rem;
  transition: border-color 160ms ease;
  text-decoration: none;
  display: block;
}

.damus-embedded-quote:hover {
  border-color: rgba(189, 102, 255, 0.3);
  text-decoration: none;
}

.damus-embedded-quote-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.damus-embedded-quote-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.damus-embedded-quote-author {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9rem;
}

.damus-embedded-quote-username {
  color: var(--damus-muted);
  font-size: 0.85rem;
}

.damus-embedded-quote-time {
  color: var(--damus-muted);
  font-size: 0.85rem;
}

.damus-embedded-quote-type {
  background: rgba(189, 102, 255, 0.2);
  color: var(--damus-accent);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 0.5rem;
}

.damus-embedded-quote-type-draft {
  background: rgba(255, 107, 53, 0.2);
  color: #ff6b35;
}

.damus-embedded-quote-reply {
  color: var(--damus-muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

/* Thread layout: CSS grid with avatar + content columns */
.damus-thread-grid {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.75rem;
}

/* Line sits in row 1 of the avatar column, stretches full row height
   plus the row-gap. margin-top: 42px starts it below the parent avatar.
   margin-bottom: -0.5rem extends it through the row-gap so it reaches
   the reply avatar. */
.damus-thread-line {
  grid-column: 1;
  grid-row: 1;
  width: 2px;
  background: rgba(255, 255, 255, 0.25);
  margin: 42px auto -0.75rem;
  align-self: stretch;
}

.damus-thread-pfp {
  display: flex;
  align-items: start;
  justify-content: center;
}

.damus-thread-pfp-parent {
  grid-column: 1;
  grid-row: 1;
}

.damus-thread-pfp-reply {
  grid-column: 1;
  grid-row: 2;
}

.damus-thread-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.damus-thread-parent-content {
  grid-column: 2;
  grid-row: 1;
  text-decoration: none;
  padding-bottom: 0.75rem;
  min-width: 0;
}

.damus-thread-parent-content:hover .damus-thread-parent-text {
  color: var(--damus-text);
}

.damus-thread-parent-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.damus-thread-parent-author {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.95rem;
}

.damus-thread-parent-time {
  color: var(--damus-muted);
  font-size: 0.85rem;
}

.damus-thread-parent-text {
  color: var(--damus-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.damus-thread-reply-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.damus-thread-reply-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.damus-thread-reply-meta a {
  text-decoration: none;
}

.damus-embedded-quote-content {
  color: var(--damus-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.damus-embedded-quote-highlight {
  border-left: 3px solid var(--damus-accent);
  padding-left: 0.75rem;
  font-style: italic;
}

/* Article card styling for embedded quotes */
.damus-embedded-quote-article {
  display: flex;
  flex-direction: column;
}

.damus-embedded-article-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.damus-embedded-article-title {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.damus-embedded-article-title.damus-embedded-article-draft::after {
  content: "DRAFT";
  background: linear-gradient(135deg, #ff6b35, #f7931a);
  color: #ffffff;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: 0.5em;
  vertical-align: middle;
}

.damus-embedded-article-summary {
  font-size: 0.85rem;
  color: var(--damus-muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.damus-embedded-article-wordcount {
  font-size: 0.8rem;
  color: var(--damus-muted);
  font-weight: 500;
}

.damus-embedded-quote-showmore {
  color: var(--damus-accent);
  font-weight: 500;
}

.damus-embedded-quote-urls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.damus-embedded-quote-url {
  background: rgba(255, 255, 255, 0.08);
  color: var(--damus-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .damus-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .damus-header-actions {
    width: 100%;
    align-items: flex-start;
  }

  .damus-cta {
    width: 100%;
  }

  .damus-card {
    border-radius: 22px;
    padding: 1.5rem;
  }

  .damus-note-avatar {
    width: 56px;
    height: 56px;
  }
}

/* Note stats footer (replies, reposts, reactions) */
.damus-note-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.damus-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--damus-muted);
  font-size: 0.85rem;
}

.damus-stat-icon {
  width: 1rem;
  height: 1rem;
}

.damus-stat-count {
  font-weight: 500;
}

/* Replies section */
.damus-replies {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 0.75rem;
}

.damus-reply {
  display: flex;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  background: var(--damus-card-bg);
  border: 1px solid var(--damus-card-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--damus-text);
  transition: border-color 160ms ease;
}

.damus-reply:hover {
  border-color: rgba(189, 102, 255, 0.3);
  text-decoration: none;
}

.damus-reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.damus-reply-body {
  min-width: 0;
  flex: 1;
}

.damus-reply-header {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.damus-reply-author {
  font-weight: 600;
  font-size: 0.85rem;
  color: #ffffff;
}

.damus-reply-time {
  color: var(--damus-muted);
  font-size: 0.8rem;
}

/* x.com-style app shell: left nav rail + centered feed column. The side
   columns share the leftover width equally, so the feed sits in the middle
   of the screen; the nav hugs the feed from the left column and the right
   column stays empty. A side column never gets narrower than the nav, so
   on screens too narrow for both, the feed gives up centering first. */
.damus-shell-body {
  margin: 0;
}

.damus-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(275px, 1fr) minmax(0, 600px) minmax(0, 1fr);
  align-items: start;
}

/* Left navigation rail */
.damus-nav {
  position: sticky;
  top: 0;
  justify-self: end;
  width: 275px;
  height: 100vh;
  padding: 8px 8px 8px 0;
}

.damus-nav-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  height: 100%;
  padding: 4px 4px 16px;
}

.damus-nav-logo {
  padding: 10px;
  margin-bottom: 4px;
}

.damus-nav-logo img {
  display: block;
  border-radius: 12px;
}

.damus-nav-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 16px 11px 12px;
  border-radius: 999px;
  color: var(--damus-text);
  font-size: 1.25rem;
  font-weight: 500;
  transition: background 160ms ease;
}

.damus-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #ffffff;
}

.damus-nav-link-active {
  font-weight: 800;
}

.damus-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.damus-nav-icon svg {
  width: 26px;
  height: 26px;
}

.damus-nav-cta {
  margin-top: 16px;
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--damus-accent), var(--damus-accent-strong));
  color: #090118;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(189, 102, 255, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.damus-nav-cta:hover {
  color: #090118;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(189, 102, 255, 0.45);
}

.damus-nav-cta-icon {
  display: none;
  width: 24px;
  height: 24px;
}

.damus-nav-cta-icon svg {
  width: 24px;
  height: 24px;
}

.damus-nav-account {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--damus-text);
}

.damus-nav-account:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.damus-nav-account img {
  border-radius: 50%;
  flex-shrink: 0;
}

.damus-nav-account-names {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.damus-nav-account-name {
  font-weight: 700;
  color: #ffffff;
}

.damus-nav-account-handle {
  color: var(--damus-muted);
  font-size: 0.9rem;
}

/* Center feed column */
.damus-shell-center {
  min-height: 100vh;
  border-left: 1px solid var(--damus-card-border);
  border-right: 1px solid var(--damus-card-border);
  background: rgba(10, 3, 26, 0.35);
}

.damus-feed-head {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0 16px;
  background: rgba(6, 1, 20, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--damus-card-border);
}

.damus-feed-tabs {
  display: flex;
}

.damus-feed-tab {
  position: relative;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--damus-muted);
}

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

.damus-feed-tab-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--damus-accent);
}

.damus-feed {
  display: flex;
  flex-direction: column;
}

.damus-feed-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--damus-card-border);
  transition: background 160ms ease;
}

.damus-feed-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.damus-feed-avatar-link {
  flex-shrink: 0;
}

.damus-feed-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  display: block;
}

.damus-feed-main {
  flex: 1;
  min-width: 0;
}

.damus-feed-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}

.damus-feed-author {
  font-weight: 700;
  color: #ffffff;
}

.damus-feed-author:hover {
  text-decoration: underline;
  color: #ffffff;
}

.damus-feed-handle,
.damus-feed-dot,
.damus-feed-time {
  color: var(--damus-muted);
  font-weight: 400;
  font-size: 0.95rem;
}

.damus-feed-time:hover {
  color: var(--damus-muted);
  text-decoration: underline;
}

.damus-feed-reply {
  color: var(--damus-muted);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.damus-feed-reply a {
  color: var(--damus-accent);
}

.damus-feed-reply a:hover {
  text-decoration: underline;
}

.damus-feed-content.damus-note-body {
  font-size: 0.98rem;
  line-height: 1.55;
}

.damus-feed-content.damus-note-body img {
  margin: 0.75rem 0;
  border-radius: 16px;
}

.damus-feed-empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--damus-muted);
}

/* Index pages: article rows and the "Older posts" link */
.damus-index-article-title {
  font-family: "PoetsenOne", var(--damus-font);
  font-size: 1.35rem;
  margin: 4px 0 6px;
}

.damus-index-article-title a {
  color: #ffffff;
}

.damus-index-article .damus-article-summary {
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.damus-index-article .damus-article-hero {
  border-radius: 16px;
  box-shadow: none;
}

.damus-index-pager {
  padding: 20px 16px;
  text-align: center;
}

.damus-index-pager a {
  font-weight: 600;
  color: var(--damus-accent);
}

/* Profile header card sits flush at the top of the feed column */
.damus-shell-center > .damus-profile-card {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: transparent;
}

/* Collapse the nav labels into an icon rail on medium screens */
@media (max-width: 1000px) {
  .damus-shell {
    grid-template-columns: minmax(84px, 1fr) minmax(0, 600px) minmax(0, 1fr);
  }

  .damus-nav {
    width: 84px;
  }

  .damus-nav-label,
  .damus-nav-cta-label,
  .damus-nav-account-names {
    display: none;
  }

  .damus-nav-link {
    justify-content: center;
    padding: 12px;
  }

  .damus-nav-cta {
    width: 52px;
    height: 52px;
    padding: 0;
    margin-left: 2px;
  }

  .damus-nav-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .damus-nav-account {
    justify-content: center;
    padding: 10px;
  }
}

/* Move the nav to a bottom bar on phones */
@media (max-width: 700px) {
  .damus-shell {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .damus-shell-center {
    border-left: 0;
    border-right: 0;
    padding-bottom: 68px;
  }

  .damus-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    justify-self: stretch;
    width: auto;
    height: auto;
    padding: 0;
    background: rgba(6, 1, 20, 0.92);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--damus-card-border);
    z-index: 20;
  }

  .damus-nav-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    height: auto;
    padding: 6px 12px;
    gap: 0;
  }

  .damus-nav-logo,
  .damus-nav-account {
    display: none;
  }

  .damus-nav-cta {
    width: 46px;
    height: 46px;
    margin: 0;
  }
}

.damus-reply-content {
  font-size: 0.9rem;
  color: var(--damus-muted);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ------------------------------------------------------------------
   Personal mode (`--mode personal`): one person's blog. Every rule is
   scoped under `body.nc-personal` or an `nc-` class, so gateway pages are
   untouched. The token overrides recolour the shared note/feed/profile
   styles; the rest is the owner's ambient backdrop, the top bar, the
   index hero and journal, and the footer.
   ------------------------------------------------------------------ */
body.nc-personal {
  --damus-bg: #0d0e11;
  --damus-gradient: none;
  --damus-card-bg: rgba(22, 23, 28, 0.78);
  --damus-card-border: rgba(255, 255, 255, 0.08);
  --damus-text: #f1ede7;
  --damus-muted: rgba(241, 237, 231, 0.6);
  --damus-accent: #ffb26b;
  --damus-accent-strong: #ffcf9e;
  --damus-highlight: rgba(255, 178, 107, 0.14);
  --nc-accent-soft: rgba(255, 178, 107, 0.14);
  --nc-serif: "Iowan Old Style", "Charter", "Palatino Linotype", Palatino, Georgia, serif;
  --nc-column: 680px;
  --nc-wide: 880px;
}

/* Hard-coded purples and the Damus display face, swapped for the palette */
body.nc-personal .damus-meta-icon,
body.nc-personal .damus-article-topic,
body.nc-personal .damus-embedded-quote-type {
  background: var(--nc-accent-soft);
}

body.nc-personal .damus-embedded-quote:hover,
body.nc-personal .damus-reply:hover {
  border-color: rgba(255, 178, 107, 0.35);
}

body.nc-personal .damus-article-title,
body.nc-personal .damus-index-article-title {
  font-family: var(--nc-serif);
  font-weight: 700;
}

body.nc-personal .damus-card {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
  border-radius: 22px;
}

/* The owner's banner (or avatar), blurred into a fixed backdrop. It is its
   own composited layer, like the gateway's body::before gradient, so
   scrolling never repaints it. */
.nc-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.nc-ambient img {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  object-fit: cover;
  filter: blur(90px) saturate(1.6);
  opacity: 0.55;
  transform: translateZ(0);
}

.nc-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 14, 17, 0.15) 0%, rgba(13, 14, 17, 0.62) 45%, rgba(13, 14, 17, 0.9) 100%);
}

/* Top bar: the owner's avatar and name, then their nav */
.nc-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 14, 17, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nc-topbar-inner {
  max-width: calc(var(--nc-wide) + 32px);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--damus-text);
}

.nc-brand:hover {
  color: #ffffff;
  text-decoration: none;
}

.nc-brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(255, 178, 107, 0.5);
}

.nc-brand-name {
  font-family: var(--nc-serif);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nc-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--damus-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease;
}

.nc-nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--damus-text);
  text-decoration: none;
}

.nc-nav-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.nc-nav-icon svg {
  width: 18px;
  height: 18px;
}

/* The page column: wide on the index, a reading column elsewhere */
.nc-main {
  max-width: calc(var(--nc-column) + 32px);
  margin: 0 auto;
  padding: 0 16px;
  min-height: calc(100vh - 220px);
}

.nc-index .nc-main {
  max-width: calc(var(--nc-wide) + 32px);
}

/* Index hero: banner, overlapping avatar with buttons, name, meta, about */
.nc-masthead {
  margin: 24px 0 0;
}

.nc-masthead-banner {
  aspect-ratio: 3 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 30%, rgba(255, 178, 107, 0.45), rgba(255, 178, 107, 0) 60%), linear-gradient(135deg, #2a2119, #15161b);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.nc-masthead-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nc-masthead-banner-empty {
  aspect-ratio: 5 / 1;
}

.nc-masthead-body {
  padding: 0 28px;
}

.nc-masthead-id {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: -64px;
}

.nc-masthead-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--damus-bg);
  background: var(--damus-card-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: block;
  position: relative;
}

.nc-masthead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
}

.nc-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--damus-accent);
  color: #1d1308;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 28px rgba(255, 178, 107, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nc-button:hover {
  color: #1d1308;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(255, 178, 107, 0.38);
}

.nc-button-icon,
.nc-button-icon svg {
  display: inline-flex;
  width: 17px;
  height: 17px;
}

.nc-button-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--damus-text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.nc-button-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: none;
}

.nc-masthead-name {
  font-family: var(--nc-serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 8px;
  color: #ffffff;
}

.nc-masthead-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--damus-muted);
  font-size: 1rem;
}

.nc-masthead-about {
  margin: 18px 0 0;
  max-width: 62ch;
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(241, 237, 231, 0.88);
  overflow-wrap: anywhere;
}

/* Journal: posts grouped by day, the date in a sticky gutter on a
   timeline */
.nc-journal {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.nc-day {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0 28px;
  align-items: start;
}

.nc-day-label {
  position: sticky;
  top: 84px;
  margin: 2px 0 0;
  font-weight: 400;
  text-align: right;
}

.nc-day-label time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}

.nc-day-month {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--damus-accent);
}

.nc-day-num {
  font-family: var(--nc-serif);
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0 4px;
}

.nc-day-year {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--damus-muted);
}

.nc-day-posts {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nc-day-posts::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 18px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--damus-accent);
  box-shadow: 0 0 0 5px rgba(255, 178, 107, 0.16);
}

/* Each post a card, with its author's avatar and name as on any feed */
.nc-journal .damus-feed-item {
  background: var(--damus-card-bg);
  border: 1px solid var(--damus-card-border);
  border-radius: 18px;
  padding: 18px 22px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.nc-journal .damus-feed-item:hover {
  background: var(--damus-card-bg);
  border-color: rgba(255, 178, 107, 0.32);
  transform: translateY(-1px);
}


.nc-journal .damus-feed-time {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.nc-journal .damus-feed-content.damus-note-body {
  font-size: 1.1rem;
  line-height: 1.6;
}

.nc-journal .damus-note-stats {
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* Article rows: a card with the hero image across the top */
.nc-journal .damus-index-article {
  padding: 0;
  overflow: hidden;
}

.nc-journal .damus-index-article .damus-feed-main {
  display: flex;
  flex-direction: column;
  padding-bottom: 22px;
}

.nc-journal .damus-index-article .damus-feed-main > a {
  order: -1;
  display: block;
}

.nc-journal .damus-index-article .damus-article-hero {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
}

.nc-journal .damus-index-article .damus-feed-meta,
.nc-journal .damus-index-article .damus-index-article-title,
.nc-journal .damus-index-article .damus-article-summary {
  padding: 0 24px;
}

.nc-journal .damus-index-article .damus-feed-meta {
  padding-top: 20px;
}

.nc-journal .damus-index-article .damus-feed-handle {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--damus-accent);
}

.nc-journal .damus-index-article-title {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 6px 0 8px;
}

.nc-journal .damus-index-article .damus-article-summary {
  font-size: 1.02rem;
  margin: 0;
}

.nc-index .damus-index-pager {
  padding: 36px 0 8px 140px;
  text-align: left;
}

.nc-index .damus-index-pager a {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--damus-text);
}

.nc-index .damus-index-pager a:hover {
  border-color: rgba(255, 178, 107, 0.45);
  color: #ffffff;
  text-decoration: none;
}

.nc-index .damus-feed-empty {
  padding: 56px 0;
}

/* Note and profile pages: a back link, then the card */
.nc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 24px 0 14px;
  color: var(--damus-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nc-back:hover {
  color: var(--damus-accent);
  text-decoration: none;
}

.nc-note {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* The note itself reads like a post: serif, large */
.nc-note-page .damus-card .damus-note-body {
  font-family: var(--nc-serif);
  font-size: clamp(1.3rem, 2.6vw, 1.5rem);
  line-height: 1.55;
  color: #ffffff;
}

body.nc-personal .damus-note-avatar {
  border-radius: 50%;
  border-color: rgba(255, 178, 107, 0.55);
}

/* Replies: a headed list of separate cards */
.nc-note-page .damus-replies {
  gap: 10px;
}

.nc-note-page .damus-replies::before {
  content: "Replies";
  margin: 8px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--damus-accent);
}

.nc-note-page .damus-reply {
  border-radius: 16px;
  padding: 14px 18px;
}

.nc-profile .nc-main > .damus-profile-card {
  margin-top: 24px;
}

.nc-profile .damus-feed {
  margin-top: 16px;
}

/* Footer: the owner's signature */
.nc-footer {
  max-width: calc(var(--nc-column) + 32px);
  margin: 56px auto 0;
  padding: 32px 16px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--damus-muted);
  font-size: 0.88rem;
}

.nc-footer-sig {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--damus-text);
}

.nc-footer-sig:hover {
  color: #ffffff;
  text-decoration: none;
}

.nc-footer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.nc-footer-name {
  font-family: var(--nc-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.nc-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.nc-footer-links a {
  color: var(--damus-muted);
}

.nc-footer-links a:hover {
  color: var(--damus-accent);
}

/* Narrow screens: the date sits above its posts instead of in a gutter */
@media (max-width: 760px) {
  .nc-day {
    display: block;
  }

  .nc-day-label {
    position: static;
    text-align: left;
    margin: 0 0 12px;
  }

  .nc-day-label time {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .nc-day-num {
    font-size: 1.6rem;
    margin: 0;
  }

  .nc-day-posts {
    padding-left: 0;
    border-left: 0;
  }

  .nc-day-posts::before {
    display: none;
  }

  .nc-index .damus-index-pager {
    padding-left: 0;
    text-align: center;
  }
}

/* Phones: the nav drops to icons, the hero tightens */
@media (max-width: 560px) {
  .nc-nav-label {
    display: none;
  }

  .nc-nav-link {
    padding: 8px;
  }

  .nc-nav-icon,
  .nc-nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .nc-masthead {
    margin-top: 12px;
  }

  .nc-masthead-banner {
    aspect-ratio: 2.2 / 1;
    border-radius: 18px;
  }

  .nc-masthead-body {
    padding: 0 4px;
  }

  .nc-masthead-id {
    margin-top: -46px;
  }

  .nc-masthead-avatar {
    width: 92px;
    height: 92px;
    border-width: 4px;
  }

  .nc-masthead-actions {
    padding-bottom: 0;
  }

  .nc-button {
    padding: 8px 14px;
    font-size: 0.88rem;
  }

  .nc-journal {
    margin-top: 32px;
  }

  .nc-journal .damus-feed-item {
    padding: 16px 18px;
  }

  .nc-journal .damus-index-article {
    padding: 0;
  }
}

/* A profile mention: their avatar and name in a pill, in bios and notes.
   It is a plain inline box, not inline-flex: vertical padding and borders
   on an inline box don't grow the line, and the avatar is no taller than
   the text, so the pill sits in the text's own line height without
   pushing lines apart. Uses only the theme tokens, so it fits both the
   gateway and personal designs. */
.damus-mention-chip {
  display: inline;
  padding: 0.12em 0.55em 0.12em 0.18em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: var(--damus-text);
  font-weight: 600;
  white-space: nowrap;
  transition: box-shadow 160ms ease, background 160ms ease;
}

.damus-mention-chip:hover {
  box-shadow: inset 0 0 0 1px var(--damus-accent);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

/* Beats `.damus-note-body img`, which gives note images margins and a
   shadow. 1em tall, dropped by its share of the descender, so it spans
   the text's ascent-to-descent and never the line's. */
.damus-mention-chip img,
.damus-note-body .damus-mention-chip img {
  display: inline;
  width: 1em;
  height: 1em;
  margin: 0 0.3em 0 0;
  vertical-align: -0.14em;
  border-radius: 50%;
  box-shadow: none;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}
