/* Poof News — layered on the site's own tokens (--surface, --line, --pink, ...) */

.nw-head { padding-bottom: 36px; }

/* ---------- filter ---------- */
.nw-filter {
  position: relative;
  display: inline-flex;
  gap: 4px;
  margin-top: 30px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.nw-filter[hidden] { display: none; }
.nw-filter button {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.nw-filter button:hover { color: var(--text); }
.nw-filter button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.nw-filter .nw-count { margin-left: 6px; font-weight: 500; opacity: .6; }

.nw-demo {
  margin: 0 auto 28px;
  max-width: 640px;
  padding: 12px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-align: center;
}

/* ---------- covers ---------- */
.nw-media {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 20% 10%, rgba(255, 61, 139, .10), transparent 60%),
    radial-gradient(ellipse 70% 80% at 90% 100%, rgba(74, 157, 255, .10), transparent 60%),
    var(--surface-2);
  color: var(--text);
}
.nw-media img, .nw-media .nw-gen {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ---------- featured ---------- */
.nw-feature {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .22s ease;
}
.nw-feature:hover { border-color: var(--line-strong); }
.nw-feature .nw-media { min-height: 340px; }
.nw-feature .nw-card__body { padding: 40px; justify-content: center; }
.nw-feature .nw-card__title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); }
.nw-feature .nw-card__excerpt { font-size: 1rem; -webkit-line-clamp: 4; }

/* ---------- grid ---------- */
.nw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.nw-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .22s ease;
}
.nw-card:hover { border-color: var(--line-strong); }
.nw-card .nw-media { aspect-ratio: 16 / 9; }
.nw-card__body { display: flex; flex-direction: column; gap: 12px; padding: 24px; flex: 1; }
.nw-card__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-dim); }
.nw-card__title { font-size: 1.15rem; line-height: 1.25; }
.nw-card:hover .nw-card__title, .nw-feature:hover .nw-card__title { color: var(--pink-soft); }
[data-theme="light"] .nw-card:hover .nw-card__title,
[data-theme="light"] .nw-feature:hover .nw-card__title { color: #c4126a; }
.nw-card__excerpt {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nw-result {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.nw-result small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--text-dim); }

.badge--blog { background: rgba(140, 82, 255, .16); color: #c6a4ff; }
[data-theme="light"] .badge--blog { color: #6b2fd0; }
[data-theme="light"] .badge--pink { color: #c4126a; }

/* ---------- states ---------- */
.nw-skel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-height: 320px; animation: nwPulse 1.4s ease-in-out infinite; }
.nw-skel--wide { min-height: 340px; border-radius: var(--radius-lg); }
@keyframes nwPulse { 50% { opacity: .55; } }

.nw-empty { max-width: 520px; margin: 24px auto 0; text-align: center; }
.nw-empty h2 { font-size: 1.4rem; }
.nw-empty p { margin-top: 12px; color: var(--text-muted); }
.nw-empty .nw-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ---------- post ---------- */
.nw-post__head { max-width: 700px; margin-inline: auto; padding-top: 64px; }
.nw-back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-muted); }
.nw-back:hover { color: var(--text); }
.nw-post__head .nw-card__meta { margin-top: 28px; }
.nw-post__head h1 { margin-top: 16px; font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); line-height: 1.08; }
.nw-dek { margin-top: 18px; font-size: 1.125rem; color: var(--text-muted); line-height: 1.6; }
.nw-byline { margin-top: 18px; font-size: var(--fs-sm); color: var(--text-dim); }
.nw-keyresult {
  display: inline-block;
  margin-top: 24px;
  padding: 14px 20px;
  border-left: 3px solid var(--pink);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 700; font-size: 1.15rem;
}
.nw-keyresult small { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--text-dim); }

.nw-post__cover { max-width: 960px; margin: 44px auto 0; border-radius: var(--radius-lg); border: 1px solid var(--line); aspect-ratio: 7 / 4; }

.nw-body { max-width: 700px; margin: 48px auto 0; font-size: 1.0625rem; line-height: 1.8; color: var(--text-muted); }
.nw-body > * + * { margin-top: 1.1em; }
.nw-body h2 { margin-top: 2em; font-size: 1.55rem; color: var(--text); line-height: 1.2; }
.nw-body h3 { margin-top: 1.7em; font-size: 1.2rem; color: var(--text); }
.nw-body h4 { margin-top: 1.5em; font-size: 1rem; color: var(--text); }
.nw-body strong { color: var(--text); }
.nw-body a { color: var(--text); text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.nw-body a:hover { color: var(--pink-soft); }
.nw-body ul, .nw-body ol { padding-left: 1.3em; }
.nw-body ul { list-style: disc; }
.nw-body ol { list-style: decimal; }
.nw-body li + li { margin-top: .4em; }
.nw-body li::marker { color: var(--pink); }
.nw-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--violet); color: var(--text); font-size: 1.2rem; line-height: 1.55; }
.nw-body blockquote p { margin: 0; }
.nw-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.nw-body code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-size: .9em; }
.nw-body figure { margin: 2em 0; }
.nw-body figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.nw-body figcaption { margin-top: 10px; font-size: var(--fs-sm); color: var(--text-dim); }
.nw-table { overflow-x: auto; }
.nw-body table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.nw-body th, .nw-body td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.nw-body th { color: var(--text); }

.nw-cta {
  max-width: 700px;
  margin: 72px auto 96px;
  padding: 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.nw-cta h2 { font-size: 1.3rem; }
.nw-cta p { margin-top: 6px; color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) { .nw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .nw-feature { grid-template-columns: 1fr; }
  .nw-feature .nw-media { min-height: 0; aspect-ratio: 16 / 9; }
  .nw-feature .nw-card__body { padding: 28px; }
}
@media (max-width: 640px) {
  .nw-grid { grid-template-columns: 1fr; }
  .nw-post__head { padding-top: 40px; }
  .nw-post__cover { border-radius: var(--radius); }
  .nw-filter button { padding: 8px 13px; }
}
@media (prefers-reduced-motion: reduce) { .nw-skel { animation: none; } }
