/* ---------------------------------------------------------------------------
 * published.css — page-specific styles for the Published articles template
 * ---------------------------------------------------------------------------
 * Extracted from the former inline <style> block in templates/published.ts
 * (App-Building Bible principle 5: no inline <style>). Loaded via the layout's
 * headExtra <link href=asset("published.css")>. Behavior-preserving: rules are
 * verbatim from the original template.
 * ------------------------------------------------------------------------- */

.pub-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pub-summary .stat { min-width: 120px; }

.pub-table td { font-size: 12px; }
.pub-table th { position: sticky; top: 0; z-index: 2; }

.pub-table .title-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pub-table .title-cell a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.pub-table .title-cell a:hover { text-decoration: underline; }

.sort-icon {
  display: inline-block;
  width: 10px;
  margin-left: 3px;
  color: var(--text-3);
  font-size: 10px;
  vertical-align: middle;
}

th.sorted-asc .sort-icon::after { content: "▲"; }
th.sorted-desc .sort-icon::after { content: "▼"; }
th:not(.sorted-asc):not(.sorted-desc) .sort-icon::after { content: "⇅"; }

.decay-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-2);
}
.decay-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.decay-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.decay-dot.healthy { background: var(--success); }
.decay-dot.declining { background: var(--warning); }
.decay-dot.decaying { background: var(--error); }
.decay-dot.unknown { background: var(--text-3); }

.refresh-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--primary);
  font-weight: 500;
  transition: background 120ms;
}
.refresh-btn:hover { background: var(--bg-surface); }
.refresh-btn:disabled { opacity: .5; cursor: not-allowed; }
.refresh-btn.done { color: var(--success); border-color: var(--success); }

/* empty-state description (wider than the shared .empty-state-desc) */
.pub-empty-desc { max-width: 400px; margin: 0 auto; }
/* no-analytics notice box */
.pub-notice {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-2);
}
.pub-notice a { color: var(--primary); text-decoration: underline; }
