/* CHRI Public — scoped, lightweight styles for the public tier. All selectors live under
   .chri-pub so nothing leaks into the theme. Theme-neutral, responsive, no external assets. */

.chri-pub { max-width: 960px; margin: 0 auto; }
.chri-pub h1 { margin: 0 0 .5em; }
.chri-pub h2 { margin: 1.4em 0 .6em; font-size: 1.25rem; }

/* Search */
.chri-pub-search { display: flex; gap: .5rem; margin: 1rem 0 1.5rem; }
.chri-pub-search input[type="search"] { flex: 1 1 auto; padding: .6rem .8rem; border: 1px solid #cbd3dd; border-radius: 6px; font-size: 1rem; }
.chri-pub-search button { padding: .6rem 1.1rem; border: 0; border-radius: 6px; background: #14476b; color: #fff; cursor: pointer; }
.chri-pub-search button:hover { background: #0f3550; }

/* Card grid (categories) */
.chri-pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.chri-pub-card { display: block; padding: 1rem 1.1rem; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.chri-pub-card:hover { border-color: #14476b; box-shadow: 0 2px 10px rgba(20,71,107,.08); }
.chri-pub-card-title { display: block; font-weight: 600; }
.chri-pub-card-meta { display: block; margin-top: .25rem; font-size: .85rem; color: #64748b; }

/* Lists */
.chri-pub-list { margin: .5rem 0 0; padding-left: 1.1rem; }
.chri-pub-list li { margin: .3rem 0; }
.chri-pub-note { padding: .9rem 1rem; background: #f1f5f9; border-radius: 6px; color: #475569; }

/* Contact */
.chri-pub-contact { margin-top: 1.5rem; }

/* Article detail */
.chri-pub-breadcrumb { font-size: .9rem; color: #64748b; margin-bottom: 1rem; }
.chri-pub-breadcrumb a { color: #14476b; text-decoration: none; }
.chri-pub-article-body { line-height: 1.7; }
.chri-pub-related { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }
.chri-pub-feedback { margin-top: 1.5rem; padding: .8rem 1rem; background: #f1f5f9; border-radius: 6px; }
.chri-pub-feedback a, .chri-pub-related a { color: #14476b; }

/* Stats + status (units 3/4 reuse these) */
.chri-pub-stat-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1rem 0; }
.chri-pub-stat { flex: 1 1 160px; padding: 1rem; border: 1px solid #e2e8f0; border-radius: 8px; text-align: center; }
.chri-pub-stat .n { display: block; font-size: 2rem; font-weight: 700; color: #14476b; }
.chri-pub-stat .l { display: block; font-size: .85rem; color: #64748b; margin-top: .25rem; }
.chri-pub-status { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 999px; font-weight: 600; }
.chri-pub-status.operational { background: #dcfce7; color: #166534; }
.chri-pub-status.degraded { background: #fef3c7; color: #92400e; }
.chri-pub-status.unknown { background: #f1f5f9; color: #475569; }

/* Tables (stats by-study) */
.chri-pub-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; }
.chri-pub-table th, .chri-pub-table td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid #e2e8f0; }
.chri-pub-table th { font-size: .85rem; color: #475569; }
.chri-pub-table td:last-child, .chri-pub-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Public repository sub-nav */
.chri-pub-nav { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1.5rem; padding-bottom: .5rem; border-bottom: 1px solid #e2e8f0; }
.chri-pub-nav a { padding: .4rem .8rem; border-radius: 6px; text-decoration: none; color: #14476b; font-weight: 500; }
.chri-pub-nav a:hover { background: #eef4f8; }
.chri-pub-nav a.active { background: #14476b; color: #fff; }

/* Research list */
.chri-pub-intro { color: #475569; margin: 0 0 1.2rem; }
.chri-pub-pubs li { margin: .9rem 0; padding-bottom: .9rem; border-bottom: 1px solid #eef2f6; list-style: none; }
.chri-pub-pubs { padding-left: 0; }
.chri-pub-pub-title { text-decoration: none; color: #14476b; }
.chri-pub-pub-cite { color: #475569; margin: .2rem 0; }
.chri-pub-doi { color: #14476b; }

@media (max-width: 600px) {
  .chri-pub-search { flex-direction: column; }
  .chri-pub-grid { grid-template-columns: 1fr; }
}
