/* ============================================================
   Astra Origins — Information Space Hub · article detail
   Page-only styles. Shared shell lives in cosmos.css; the list
   grid + author/tag helpers live in information-space-hub.css.
   ============================================================ */

.art-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 800; color: var(--ink-2);
  letter-spacing: 0.1em;
  padding: 4px 8px; border-radius: 6px;
  margin-bottom: 14px; text-decoration: none;
}
.art-back:hover { background: var(--surface-2); color: var(--ink); }

.t-cr-link {
  font-size: 10px; font-weight: 700;
  color: var(--ink-2); letter-spacing: 0.1em;
  text-decoration: none;
}
.t-cr-link:hover { color: var(--accent); }

/* ── Article head ─────────────────────────────────────── */
.art-page { display: flex; flex-direction: column; gap: 0; }
.art-head {
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.art-cat {
  font-size: 9px; font-weight: 800; color: var(--accent);
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.art-title {
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.2;
  margin: 0 0 4px;
  max-width: 32ch;
  text-wrap: pretty;
}
.art-lede {
  font-size: 15px; line-height: 1.65; color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 64ch;
}
.art-media-meta {
  display: flex; flex-direction: column; gap: 6px;
  margin: 0 0 18px;
  max-width: 64ch;
}
.art-media-caption,
.art-media-credit {
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
  margin: 0;
}
.art-media-label {
  display: inline-block; margin-right: 4px;
  font-weight: 700;
}
.art-meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.art-byline { display: flex; align-items: center; gap: 10px; }
.art-stats {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.1em; font-weight: 700;
}
.art-stats span { display: inline-flex; align-items: center; gap: 4px; }
.art-stats .bi { font-size: 11px; color: var(--ink-2); }

/* ── Cover ────────────────────────────────────────────── */
.art-cover {
  position: relative;
  min-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, oklch(0.15 0.05 270), oklch(0.08 0.02 250));
  margin-bottom: 16px;
}
.art-cover-img { display: block; width: 100%; max-height: 460px; object-fit: cover; }
.art-cover-video { display: block; width: 100%; max-height: 480px; background: #000; }
.art-cover-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 30%, white 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 25% 65%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 25%, white 50%, transparent 51%),
    radial-gradient(2px 2px at 65% 55%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 30%, white 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 75%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 88%, white 50%, transparent 51%);
  opacity: 0.75;
}
.art-cover-glow { position: absolute; inset: 0; mix-blend-mode: screen; }
.art-cover-caption {
  position: absolute; bottom: 10px; left: 12px; z-index: 2;
  font-size: 9px; color: white;
  background: oklch(0 0 0 / 0.5); padding: 4px 8px; border-radius: 4px;
  backdrop-filter: blur(4px); letter-spacing: 0.1em;
}

/* ── Action bar ───────────────────────────────────────── */
.art-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.art-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 10px; font-weight: 800; color: var(--ink-2);
  letter-spacing: 0.1em; cursor: pointer;
}
.art-action:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.art-action.is-on { background: var(--accent); color: white; border-color: var(--accent); }

/* ── Body grid ────────────────────────────────────────── */
.art-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 14px;
}
.art-body { min-width: 0; font-size: 14px; color: var(--ink); line-height: 1.75; overflow-wrap: anywhere; }
.art-body [data-ih-richbody] { white-space: normal; }
.art-body p { margin: 0 0 14px; max-width: 68ch; overflow-wrap: break-word; }
.art-body h2 {
  font-size: 19px; font-weight: 800;
  letter-spacing: -0.01em; line-height: 1.3;
  margin: 22px 0 10px;
}
.art-body h3 { font-size: 16px; font-weight: 800; margin: 18px 0 8px; }
.art-body strong { color: var(--ink); font-weight: 800; }
.art-body em { color: var(--ink); font-style: italic; }
.art-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.art-body ul, .art-body ol { padding-left: 20px; margin: 0 0 14px; max-width: 68ch; }
.art-body li { margin-bottom: 6px; }
.art-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0 14px; }
.art-body blockquote {
  margin: 22px 0; padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 8px 8px 0;
  font-size: 16px; color: var(--ink); line-height: 1.5; font-style: italic;
}

.art-foot {
  margin: 24px 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.art-tags-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Comments (detail) ────────────────────────────────── */
.art-comments { margin-top: 8px; }
.art-section-h {
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  display: flex; align-items: baseline; gap: 8px;
}
.org-section-ct { font-size: 9px; color: var(--ink-3); letter-spacing: 0.14em; font-weight: 800; }
.art-c-more {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 12px;
  background: transparent; border: none; cursor: pointer;
  font-size: 10px; font-weight: 800; color: var(--accent);
  letter-spacing: 0.12em;
}

/* Discussion avatars — larger + clearer than the card-foot variant */
.art-comments .ih-author.sm,
.ih-comment-composer .ih-author.sm {
  width: 34px; height: 34px; flex: none;
  font-size: 12px; font-weight: 800;
  align-self: start;
  border: 1px solid var(--line);
}
.art-comments .ih-author.sm img,
.ih-comment-composer .ih-author.sm img { width: 100%; height: 100%; object-fit: cover; }

/* Comment composer */
.ih-comment-composer { display: flex; gap: 10px; margin-bottom: 16px; }
.ih-comment-composer .ih-author.sm { flex: none; }
.ih-composer-main { flex: 1; min-width: 0; }
.ih-composer-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.ih-comment-guest {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px dashed var(--line); border-radius: 10px;
  color: var(--ink-2); font-size: 13px; margin-bottom: 16px;
}
.ih-comment-guest .bi { font-size: 18px; color: var(--ink-3); }
.ih-comment-guest .ih-btn-primary { margin-left: auto; }

/* Comment list (reference art-comments-list) */
.art-comments-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.art-comments-list li,
.art-c-skel {
  display: grid; grid-template-columns: 34px 1fr;
  gap: 10px; padding: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px;
}
.art-c-main { min-width: 0; }
.art-c-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.art-c-name { font-size: 12px; font-weight: 800; color: var(--ink); text-decoration: none; }
a.art-c-name:hover { color: var(--accent); }
.art-c-time { font-size: 9px; color: var(--ink-3); letter-spacing: 0.12em; }
.art-c-del {
  margin-left: auto; border: none; background: transparent;
  color: var(--ink-3); cursor: pointer; font-size: 12px; line-height: 1;
}
.art-c-del:hover { color: oklch(0.55 0.2 25); }
.art-c-body { font-size: 12px; color: var(--ink-2); margin: 0 0 6px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.art-c-foot { display: flex; align-items: center; gap: 10px; }
.art-c-like {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; background: transparent; cursor: pointer;
  color: var(--ink-3); font-size: 11px; font-weight: 700;
}
.art-c-like:hover { color: var(--ink); }
.art-c-like.is-on { color: oklch(0.6 0.2 25); }
.art-c-empty { text-align: center; color: var(--ink-3); font-size: 11px; letter-spacing: 0.14em; padding: 16px; }

/* ── Sidebar ──────────────────────────────────────────── */
.art-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.art-side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.org-side-h {
  font-size: 9px; font-weight: 800; color: var(--ink-3);
  letter-spacing: 0.14em; margin-bottom: 10px;
}

.art-toc { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.art-toc a {
  display: block; padding: 5px 0 5px 10px;
  font-size: 11px; color: var(--ink-2);
  border-left: 2px solid transparent;
  text-decoration: none; cursor: pointer;
}
.art-toc a.is-on { border-left-color: var(--accent); color: var(--accent); font-weight: 700; }
.art-toc a:hover { color: var(--ink); }

.art-related { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.art-related a {
  display: grid; grid-template-columns: 60px 1fr;
  gap: 8px; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 7px; text-decoration: none; color: inherit;
}
.art-related a:hover { border-color: var(--accent-line); }
.art-rel-thumb { width: 60px; height: 44px; border-radius: 5px; }
.art-rel-title { font-size: 11px; font-weight: 700; line-height: 1.3; }
.art-rel-meta { font-size: 8px; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.12em; }

.art-author-card { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.art-author-name { font-size: 13px; font-weight: 800; }
.art-author-role { font-size: 9px; color: var(--ink-3); letter-spacing: 0.12em; margin-top: 2px; }
.art-author-bio { font-size: 11px; color: var(--ink-2); line-height: 1.5; margin: 0 0 10px; }
.art-author-follow {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 6px; text-decoration: none;
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .art-grid { grid-template-columns: 1fr; }
  .art-side { flex-direction: column; }
}
@media (max-width: 768px) {
  .art-title { font-size: 22px; }
  .art-lede { font-size: 13px; }
  .art-media-caption { font-size: 13px; }
  .art-cover { min-height: 160px; }
  .art-body { font-size: 13px; line-height: 1.7; }
  .art-body h2 { font-size: 17px; }
  .art-actions { gap: 4px; }
  .art-action { padding: 6px 10px; font-size: 9px; }
}

/* ── Feature (compass) toggle — gold when featured ──────── */
.art-feature.is-featured {
  background: color-mix(in oklch, #e9c46a 18%, var(--surface));
  border-color: color-mix(in oklch, #e9c46a 55%, var(--line));
  color: #a9781f;
}
.art-feature.is-featured:hover {
  background: color-mix(in oklch, #e9c46a 28%, var(--surface));
  color: #8a6413; border-color: color-mix(in oklch, #e9c46a 70%, var(--line));
}
.art-feature.is-featured i { color: #e0a92e; }
.art-feature[data-ih-pending] { opacity: 0.7; pointer-events: none; }

/* ── Custom feature confirm modal ───────────────────────── */
.ih-confirm-modal {
  position: fixed; inset: 0; z-index: 4200;
  display: none; align-items: center; justify-content: center;
  padding: 20px; background: oklch(0 0 0 / 0.55); backdrop-filter: blur(3px);
}
.ih-confirm-modal.is-open { display: flex; animation: ihConfirmFade 0.16s ease; }
@keyframes ihConfirmFade { from { opacity: 0; } to { opacity: 1; } }
.ih-confirm-dialog {
  width: 100%; max-width: 380px; text-align: center;
  padding: 26px 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.4); position: relative;
  animation: ihConfirmPop 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ihConfirmPop { from { transform: translateY(8px) scale(0.97); } to { transform: none; } }
.ih-confirm-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 15px;
  display: grid; place-items: center; font-size: 24px; color: oklch(0.28 0.08 60);
  background: linear-gradient(135deg, #f0d488, #e0a92e);
}
.ih-confirm-title { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; margin: 0 0 8px; }
.ih-confirm-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 0 0 20px; }
.ih-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ih-confirm-cancel, .ih-confirm-ok {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px; border-radius: 9px; cursor: pointer;
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
}
.ih-confirm-cancel { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.ih-confirm-cancel:hover { background: var(--surface-2); color: var(--ink); }
.ih-confirm-ok { background: var(--accent); border: 1px solid var(--accent); color: white; }
.ih-confirm-ok:hover { filter: brightness(1.06); }
.ih-confirm-ok.is-danger { background: oklch(0.55 0.2 25); border-color: oklch(0.55 0.2 25); }
.ih-confirm-ok:disabled { opacity: 0.6; pointer-events: none; }
