/* 用户端公告 / 独立页（M8）：移植自旧版 themes/hidns 的 nl-* / hn-pager 样式 */
.nl-page {
  width: 100%;
  padding: 2rem 0 4rem;
}

/* ── Container: container mx-auto px-4 sm:px-6 lg:px-8 ── */
.nl-container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .nl-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .nl-container { padding-left: 2rem; padding-right: 2rem; }
}
.nl-container--wide { max-width: 80rem; }   /* max-w-7xl = 1280px */
.nl-container--post { max-width: 56rem; }   /* max-w-4xl = 896px */

/* ── space-y-6: vertical rhythm ── */
.nl-page-header { margin-bottom: 1.5rem; }

/* text-3xl font-bold */
.nl-page-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 .5rem;
}

/* text-lg opacity-70 mt-2 */
.nl-page-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  opacity: .7;
  margin: .5rem 0 0;
}

/* ── grid gap-4 ── */
.nl-grid {
  display: grid;
  gap: 1.5rem;  /* gap-6 — 略大于 nodeloc gap-4，让卡片呼吸 */
}

/* ──────────────────────────────────────────────
   CARD: card bg-base-200 shadow-xl hover:shadow-2xl transition-all
   DaisyUI card:
     border-radius: var(--rounded-box, 1rem)
     box-shadow: shadow-xl = 0 20px 25px -5px rgb(0 0 0/0.1), 0 8px 10px -6px rgb(0 0 0/0.1)
   bg-base-200 light = #f2f2f2, dark = #191e24
────────────────────────────────────────────── */
.nl-card {
  background: var(--surface-2);
  border-radius: 1rem;  /* --rounded-box */
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.07),
    0 2px 4px -2px rgb(0 0 0 / 0.05);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
  min-width: 0;         /* grid item 必须能收缩 */
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.nl-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}
/* hover:shadow-2xl */
.nl-card--link:hover {
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.12), 0 4px 10px -6px rgb(0 0 0 / 0.08);
  transform: translateY(-2px);
}

/* card-body: DaisyUI = padding: var(--padding-card, 2rem) */
.nl-card-body {
  padding: 2rem;
}

/* ── List card: title + meta + excerpt ── */

/* card-title text-2xl (DaisyUI card-title = font-size via .card-title class) */
.nl-card-title {
  font-size: 1.5rem;   /* text-2xl */
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 0.5rem;
}

/* text-sm opacity-70 mt-2 */
.nl-card-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin: 0.5rem 0 0.75rem;
}

/* prose prose-sm max-w-none line-clamp-3 */
.nl-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--text);
  opacity: 0.85;
  margin: 0;
  /* 纯文本，直接 line-clamp */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── Empty state ── */
.nl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
}
.nl-empty-icon {
  width: 5rem; height: 5rem;
  opacity: 0.4;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.nl-empty h3 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--text); margin: 0 0 .5rem;
}
.nl-empty p { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* ──────────────────────────────────────────────
   nodeloc: space-y-6, btn btn-ghost btn-sm gap-2,
            card bg-base-200 shadow-xl, card-body,
            text-4xl font-bold mb-4,
            flex items-center gap-4 text-sm opacity-70 mb-6 pb-6 border-b border-base-300,
            prose prose-lg max-w-none
══════════════════════════════════════════════════════════ */

/* space-y-6 gap between back button and card */
.nl-back { margin-bottom: 1.5rem; }

/* btn btn-ghost btn-sm gap-2 */
.nl-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;   /* --rounded-btn */
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.nl-btn-ghost svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.nl-btn-ghost:hover { background: rgb(0 0 0 / 0.05); }
[data-theme="dark"] .nl-btn-ghost:hover { background: rgb(255 255 255 / 0.08); }

/* text-4xl font-bold mb-4 */
.nl-post-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 1rem;
}

/* flex items-center gap-4 text-sm opacity-70 mb-6 pb-6 */
.nl-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
}
.nl-post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.nl-post-meta-item svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* border-b border-base-300 */
.nl-post-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

/* TOS / Privacy — 底部 signature，对应 nodeloc: text-sm text-gray-500 mt-8 pt-4 border-t */
.nl-page-footer-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* prose prose-lg max-w-none */
.nl-post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  word-break: break-word;
}
.nl-post-content h1,
.nl-post-content h2,
.nl-post-content h3,
.nl-post-content h4 {
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
  line-height: 1.3;
}
.nl-post-content h1 { font-size: 2rem; }
.nl-post-content h2 { font-size: 1.5rem; }
.nl-post-content h3 { font-size: 1.25rem; }
.nl-post-content h4 { font-size: 1.125rem; }
.nl-post-content p  { margin: 0 0 1rem; }
.nl-post-content a  { color: var(--primary); text-underline-offset: 2px; }
.nl-post-content a:hover { text-decoration: underline; }
.nl-post-content ul,
.nl-post-content ol { padding-left: 1.5rem; margin: 0 0 1rem; }
.nl-post-content li { margin-bottom: 0.375rem; }
.nl-post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-style: italic;
}
.nl-post-content pre {
  background: var(--input-bg);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875em;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
}
.nl-post-content code {
  font-size: 0.875em;
  background: var(--input-bg);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  border: 1px solid var(--border);
}
.nl-post-content pre code { background: none; padding: 0; border: none; }
.nl-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 0.5rem 0 1rem;
}
.nl-post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.nl-post-content table {
  width: 100%; border-collapse: collapse;
  margin: 0 0 1rem; font-size: 0.9em;
}
.nl-post-content th,
.nl-post-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}
.nl-post-content th { background: var(--input-bg); font-weight: 600; }

/* ══════════════════════════════════════════════
   HN-PAGER — 完全自主分页，不依赖 Bootstrap
   无任何外部选择器干扰，圆角完全可控
══════════════════════════════════════════════ */
.hn-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.hn-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.875rem;
  border-radius: 0.5rem;   /* 永远有圆角 */
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  box-sizing: border-box;
  user-select: none;
}

a.hn-pager-btn:hover {
  background: rgb(87 13 248 / 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

.hn-pager-btn.hn-pager-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgb(87 13 248 / 0.35);
  cursor: default;
}

.hn-pager-btn.hn-pager-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .nl-post-title  { font-size: 1.75rem; }
  .nl-card-title  { font-size: 1.25rem; }
  .nl-card-body   { padding: 1.25rem; }
