/* ── ResearchHub — Design minimalist, paleta green/beige ─────────────────── */

:root {
  --bg:          #F4F8F4;
  --sidebar-bg:  #D1E8D1;
  --accent:      #7AC0B4;
  --accent-dark: #5DA89C;
  --border:      #B8E5B8;
  --text:        #2D3B2D;
  --muted:       #787569;
  --beige:       #EDE8D0;
  --beige-dark:  #C9C5B1;
  --card-bg:     #FFFFFF;
  --sidebar-w:   230px;
  --danger:      #c0392b;
  --warning-bg:  #fffbe6;
  --warning-bd:  #f0d080;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.rh-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.rh-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
}

.rh-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: color 0.15s;
}
.rh-logo:hover { color: var(--accent); }
.rh-logo:hover .rh-logo-icon { stroke: var(--accent); }

.rh-logo-icon { width: 22px; height: 22px; stroke-width: 1.75px; flex-shrink: 0; stroke: var(--text); transition: stroke 0.15s; }

.rh-logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: inherit;
  letter-spacing: -0.02em;
}

.rh-inst-badge {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.4rem 1.25rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav */
.rh-nav {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0 0.6rem;
  flex: 1;
}

.rh-nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.12s;
  white-space: nowrap;
}

.rh-nav-link:hover { background: var(--beige); color: var(--text); }
.rh-nav-link.active { background: var(--accent); color: #fff; }

.rh-nav-icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.75px;
  flex-shrink: 0;
}
.rh-nav-link.active .rh-nav-icon { stroke: #fff; }

.rh-btn-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
  flex-shrink: 0;
  vertical-align: middle;
}

.rh-nav-separator {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0.75rem;
}

.rh-nav-section {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.3rem 0.75rem 0.15rem;
}

/* Sidebar footer */
.rh-sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.6rem 1rem;
}

.rh-logout { color: var(--muted); font-size: 0.82rem; }

.rh-copyright { color: var(--muted); font-size: 0.72rem; padding: 0.5rem 0.6rem 0; }

/* ── Language switch En / Ro (same family as mdconvert's theme dots) ────── */
.rh-lang { display: inline-flex; gap: 0.35rem; align-items: center; }
.rh-lang .rh-lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 22px; padding: 0 0.45rem;
  border-radius: 999px;
  border: 1.5px solid var(--beige-dark);
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; line-height: 1;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, color 0.15s;
}
.rh-lang .rh-lang-btn:hover { transform: translateY(-1px); color: var(--text); border-color: var(--accent-dark); }
.rh-lang .rh-lang-btn.is-active {
  background: var(--accent); border-color: var(--accent-dark); color: #fff;
  box-shadow: 0 0 0 2px rgba(122, 192, 180, 0.35);
}
.rh-lang .rh-lang-btn:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.rh-sidebar-footer .rh-lang { padding: 0.25rem 0.6rem 0.5rem; }
.rh-auth-card { position: relative; }
.rh-auth-card > .rh-lang { position: absolute; top: 0.75rem; right: 0.9rem; }
.rh-auth-layout .rh-copyright { text-align: center; padding-top: 1rem; }

/* ── Main content ────────────────────────────────────────────────────────── */

.rh-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;   /* a long URL or wide table must not stretch the page past the screen */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.rh-flash-wrap {
  padding: 1rem 1.5rem 0;
}

/* Superadmin "view as" banner — must be impossible to miss */
.rh-imp-banner {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 1.5rem;
  background: var(--danger);
  color: #fff;
  font-size: 0.88rem;
}
.rh-imp-banner .rh-btn-icon { width: 16px; height: 16px; }
.rh-imp-stop {
  background: #fff;
  color: var(--danger);
  border: 0;
  border-radius: 4px;
  padding: 0.2rem 0.7rem;
  font-weight: 600;
  font-size: 0.82rem;
}
.rh-imp-stop:hover { background: #fbeaea; }

/* Global site notice (superadmin) */
.rh-site-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 1.5rem;
  background: var(--warning-bg);
  border-bottom: 1px solid var(--warning-bd);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
}
.rh-site-notice-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.1rem; }
.rh-site-notice-text { flex: 1; min-width: 0; }
.lp-body .rh-site-notice {
  border-bottom: 1px solid var(--border);
}
.rh-site-notice-admin .rh-notice-help,
.rh-site-notice-admin .rh-notice-label {
  font-size: 0.85rem;
}
.rh-site-notice-admin .rh-notice-help,
.rh-notice-meta {
  color: var(--muted);
}
.rh-notice-status { font-size: 0.85rem; }
.rh-notice-when { max-width: 280px; }

.rh-content {
  padding: 1.5rem;
  flex: 1;
}

/* ── Auth layout (no sidebar) ────────────────────────────────────────────── */

.rh-auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1.5rem;
}

.rh-auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 420px;
}

/* ── Page header ─────────────────────────────────────────────────────────── */

.rh-page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.rh-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.rh-page-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

/* ── Line-art illustrations (templates/_illustrations.html, §BRAND) ──────── */

.ill { color: var(--accent-dark); display: block; flex-shrink: 0; }
.ill .pale  { fill: #EAF4EF; }
.ill .paper { fill: #FFFFFF; }
.ill .acc   { stroke: #F07B13; }
.ill .accf  { fill: #F07B13; stroke: none; }
.ill .soft  { stroke: var(--border); }
.ill .dash  { stroke-dasharray: 2 5; }

/* chapter illustration on the left of the page title */
.rh-page-header:has(.rh-page-ill) { align-items: center; }
.rh-page-ill { width: 112px; height: auto; margin: -0.35rem 0 -0.35rem; }
.rh-page-ill + div { margin-right: auto; }
@media (max-width: 700px) { .rh-page-ill { display: none; } }

/* empty states / 404 */
.ill-empty { width: 190px; max-width: 70%; margin: 0 auto 0.9rem; }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.rh-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.rh-card-sm {
  padding: 0.9rem 1.1rem;
}

.rh-card-header {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.rh-card-body {
  font-size: 0.88rem;
}

/* ── Details / collapsible warning ──────────────────────────────────────── */

.rh-details-warning {
  border: 1px solid #ffc107;
  border-radius: 6px;
  background: #fffbea;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
}

.rh-details-warning summary {
  cursor: pointer;
  font-weight: 600;
  color: #7a5c00;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.rh-details-warning summary::-webkit-details-marker { display: none; }

.rh-details-warning summary::after {
  content: '▾';
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.15s;
}

.rh-details-warning:not([open]) summary::after {
  transform: rotate(-90deg);
}

.rh-details-warning ul {
  color: #5a4200;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

/* ── Stat boxes ──────────────────────────────────────────────────────────── */

.rh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rh-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  text-align: center;
}

.rh-stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.1;
}

.rh-stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn-rh {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.12s;
}

.btn-rh:hover { background: var(--accent-dark); color: #fff; }

.btn-rh-outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.12s;
}

.btn-rh-outline:hover { background: var(--sidebar-bg); }

.btn-rh-beige {
  background: var(--beige);
  color: var(--text);
  border: 1px solid var(--beige-dark);
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-rh-beige:hover { background: var(--beige-dark); }

/* ── Forms ───────────────────────────────────────────────────────────────── */

.rh-form-group { margin-bottom: 1rem; }

.rh-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.rh-label .required { color: var(--danger); margin-left: 2px; }

.rh-input {
  width: 100%;
  border: 1px solid var(--beige-dark);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  background: var(--card-bg);
  color: var(--text);
  transition: border-color 0.12s;
  font-family: inherit;
}

.rh-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 192, 180, 0.15);
}

textarea.rh-input { resize: vertical; min-height: 120px; }

.rh-input-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ── Item type grid ──────────────────────────────────────────────────────── */

.rh-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.rh-type-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 0.75rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.12s, background 0.12s;
  display: block;
}

.rh-type-card:hover {
  border-color: var(--accent);
  background: var(--sidebar-bg);
  color: var(--text);
}

.rh-type-icon { margin-bottom: 0.5rem; color: var(--accent-dark); }
.rh-type-icon svg { width: 26px; height: 26px; stroke-width: 1.5px; }
.rh-type-card:hover .rh-type-icon { color: var(--accent); }
.rh-type-name { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.2rem; }
.rh-type-desc { font-size: 0.72rem; color: var(--muted); }

.rh-type-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1.25rem 0 0.5rem;
}

/* ── Submit form layout ──────────────────────────────────────────────────── */

.rh-submit-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .rh-submit-layout { grid-template-columns: 1fr; }
}

/* ── Example box ─────────────────────────────────────────────────────────── */

.rh-example-box {
  background: var(--beige);
  border: 1px solid var(--beige-dark);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.6;
  position: sticky;
  top: 1rem;
}

.rh-example-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.rh-example-text {
  font-style: italic;
  color: #4F4D46;
}

/* ── AI feedback box ─────────────────────────────────────────────────────── */

.rh-ai-result {
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  margin-top: 1rem;
  display: none;
}

.rh-ai-result.confirmed  { background: #f0fff4; border: 1px solid #86efac; }
.rh-ai-result.needs_review { background: var(--warning-bg); border: 1px solid var(--warning-bd); }
.rh-ai-result.rejected   { background: #fff0f0; border: 1px solid #fca5a5; }
.rh-ai-result.ai_unavailable { background: var(--beige); border: 1px solid var(--beige-dark); }

/* ── Items table ─────────────────────────────────────────────────────────── */

.rh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.rh-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.rh-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--bg);
  vertical-align: top;
}

.rh-table tr:hover td { background: var(--sidebar-bg); }

/* ── Status badges ───────────────────────────────────────────────────────── */

.rh-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.rh-badge.confirmed    { background: #dcfce7; color: #15803d; }
.rh-badge.needs_review { background: #fef9c3; color: #854d0e; }
.rh-badge.draft        { background: var(--beige); color: var(--muted); }
.rh-badge.rejected     { background: #fee2e2; color: #991b1b; }
.rh-badge.pending_ai   { background: #e0f2fe; color: #0369a1; }
.rh-badge.manual       { background: #f3e8ff; color: #6b21a8; }
.rh-badge.ai_unavailable { background: var(--beige); color: var(--muted); }
.rh-badge.submitted    { background: #dbeafe; color: #1d4ed8; }
.rh-badge.approved     { background: #dcfce7; color: #15803d; }
.rh-badge.corrected    { background: #fef3c7; color: #92400e; }
.rh-badge.in_progress  { background: var(--beige); color: var(--muted); }
.rh-badge.no_activity  { background: #f3f4f6; color: #6b7280; }

/* ── Pending badge (nav) ─────────────────────────────────────────────────── */

.rh-badge-count {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: auto;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

.rh-mobile-header {
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.rh-hamburger {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.6rem;
}

.rh-offcanvas {
  background: var(--sidebar-bg);
  max-width: 240px;
}

@media (max-width: 767px) {
  .rh-sidebar { display: none; }
  .rh-main    { margin-left: 0; }
  .rh-content { padding: 1rem; }
  /* Wide tables scroll sideways inside their card instead of being cut off */
  .rh-card[style*="overflow:hidden"] { overflow-x: auto !important; }
  .rh-card > .rh-table { min-width: 560px; }
}

/* ── Alerts (Bootstrap override) ────────────────────────────────────────── */

.alert-success { background: #f0fff4; border-color: #86efac; color: #15803d; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-bd); color: #854d0e; }
.alert-danger  { background: #fff0f0; border-color: #fca5a5; color: #991b1b; }
.alert-info    { background: #f0f9ff; border-color: #7dd3fc; color: #0369a1; }
/* Generated password, shown once: pastel orange, strong border, 30% larger. */
.alert-password { background: #FFE3C2; border: 3px solid #F07B13; color: #6B2E00;
                  font-size: 1.3em; box-shadow: 0 4px 14px rgba(240,123,19,0.35); }
.alert-password .rh-pw-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.5rem 0; }
.alert-password .rh-pw { font-size: 1.15em; background: #fff; color: #000; padding: 0.25rem 0.6rem;
                         border: 1px dashed #F07B13; border-radius: 6px; user-select: all; word-break: break-all; }
.alert-password .rh-pw-note { font-size: 0.8em; font-weight: 600; }
.rh-pw-warning { background: #FFE3C2; border: 2px solid #F07B13; color: #6B2E00; border-radius: 8px;
                 padding: 0.6rem 0.8rem; font-size: 0.9rem; margin-bottom: 0.75rem; }

/* ── Utility ─────────────────────────────────────────────────────────────── */

.text-muted-rh { color: var(--muted); }
.text-accent   { color: var(--accent-dark); }
.divider       { height: 1px; background: var(--border); margin: 1rem 0; }

a { color: var(--accent-dark); }
a:hover { color: var(--text); }

hr { border-color: var(--border); }


/* ── INCD activity log ──────────────────────────────────────────────────── */
.rh-act-summary { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.rh-act-total { font-weight: 600; font-size: 0.88rem; margin-right: 0.4rem; }
.rh-act-cat { text-decoration: none; color: inherit; }
.rh-act-cat.active { background: var(--accent, #7ec4b0); border-color: var(--accent-dark, #4a9d87); color: #fff; }
.rh-act-month { font-size: 0.95rem; font-weight: 600; margin: 1.2rem 0 0.5rem; color: var(--muted); }
.rh-act-list { list-style: none; margin: 0; padding: 0; }
.rh-act-list li { display: flex; gap: 0.7rem; padding: 0.6rem 1rem; align-items: flex-start; }
.rh-act-list li + li { border-top: 1px solid var(--border); }
.rh-act-ico { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.15rem; color: var(--muted); }
.rh-act-main { flex: 1; min-width: 0; }
.rh-act-main summary { cursor: pointer; list-style: none; }
.rh-act-main summary::-webkit-details-marker { display: none; }
.rh-act-title { display: block; font-size: 0.9rem; font-weight: 500; overflow-wrap: anywhere; }
.rh-act-meta { display: block; font-size: 0.78rem; color: var(--muted); }
.rh-act-text { font-size: 0.84rem; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 0.4rem;
  padding: 0.5rem 0.7rem; background: var(--beige); border-radius: 4px; }

/* ── Journal (§IDEI8OCT A) ───────────────────────────────────────────────── */
.rh-jr-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.rh-jr-filters .rh-input { width: auto; flex: 1 1 160px; max-width: 280px; }
.rh-jr-filters input[type=search] { flex: 2 1 220px; max-width: 360px; }
.rh-jr-clear { font-size: 0.82rem; color: var(--muted); }
.rh-jr-list { display: flex; flex-direction: column; gap: 0.75rem; }
.rh-jr-entry { display: block; min-width: 0; overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s; }
.rh-jr-entry:hover { border-color: var(--primary, #4a7c59); color: inherit; }
.rh-jr-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.35rem; }
.rh-jr-date { font-weight: 600; font-size: 0.88rem; }
.rh-jr-chip { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.76rem; color: var(--muted); }
.rh-jr-ico { width: 13px; height: 13px; }
.rh-jr-excerpt { font-size: 0.88rem; white-space: pre-line; overflow-wrap: anywhere; }
.rh-jr-linkrow { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; min-width: 0; }
.rh-jr-linkchip { font-size: 0.75rem; background: var(--beige, #f3f1ea); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.1rem 0.6rem; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-jr-thumbs { display: flex; gap: 0.4rem; margin-top: 0.55rem; flex-wrap: wrap; }
.rh-jr-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.rh-jr-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
.rh-jr-fig { position: relative; margin: 0; display: block; }
.rh-jr-fig img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.rh-jr-remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 0.8rem; line-height: 1; }
.rh-jr-linkbox { border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem; margin-bottom: 0.5rem; }
.rh-jr-small { padding: 0.2rem 0.6rem; font-size: 0.78rem; white-space: nowrap; }
.rh-jr-url { font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; display: block; }
.rh-jr-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92rem; }
.rh-jr-pasted { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.86rem; margin-top: 0.5rem;
  padding: 0.5rem 0.7rem; background: var(--beige, #f3f1ea); border-left: 3px solid var(--border); border-radius: 4px; }
.rh-jr-default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.rh-jr-form { position: relative; }
.rh-jr-types { list-style: none; margin: 0; padding: 0; }
.rh-jr-types li + li { border-top: 1px solid var(--border); }
.rh-jr-types a { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.55rem 1rem; color: inherit; text-decoration: none; }
.rh-jr-types a:hover { background: var(--beige, #f3f1ea); }
.rh-jr-code { font-family: ui-monospace, monospace; font-size: 0.78rem; color: var(--muted); min-width: 4.5rem; }
.rh-jr-tname { flex: 1; font-size: 0.88rem; }
.rh-jr-cat { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) {
  .rh-jr-filters .rh-input, .rh-jr-filters input[type=search] { max-width: none; flex-basis: 100%; }
  .rh-jr-cat { display: none; }
}

/* Co-authored */
.rh-coauth-actions { display: flex; gap: 0.35rem; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
@media (max-width: 576px) {
  .rh-coauth-row { flex-wrap: wrap; }
  .rh-coauth-actions { width: 100%; padding-left: calc(16px + 0.7rem); }
}
.rh-coauth-dup { color: #92400e; }
