/* ============================================================
   Member Report Library — styled to match the Human Charts /
   Matteen brand system (see archive-ic_prompt_topic.php).
   All tokens are scoped under .hdr-member-library so this can't
   leak into or clash with the rest of the theme.
============================================================ */

.hdr-member-library {
  --miami:    #00a2c8;
  --sunrise:  #f6b40e;
  --rolex:    #7184a6;
  --matt:     #5698a4;
  --dark:     #0d1117;
  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --bg-card:      #ffffff;
  --text-primary: #111827;
  --text-body:    #374151;
  --text-muted:   #6b7280;
  --border:       rgba(0,0,0,0.10);
  --card-shadow:  0 2px 16px rgba(0,0,0,0.07);
  --radius:       14px;

  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.hdr-member-library * { box-sizing: border-box; }
.hdr-member-library a { text-decoration: none; color: inherit; }

/* ============================================================
   HERO — full-bleed band, matches .ic-archive-hero. Breaks out
   of the 860px content container to run edge-to-edge, then
   re-constrains its own inner content.
============================================================ */
.hdr-lib-hero {
  position: relative; overflow: hidden;
  width: 100vw; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
  padding: 72px 20px 56px;
  margin-bottom: 40px;
  text-align: center;
}
.hdr-lib-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 75% 25%, rgba(0,162,200,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(246,180,14,0.04) 0%, transparent 55%);
  pointer-events: none;
}
.hdr-lib-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,162,200,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,162,200,0.05) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none;
}
.hdr-lib-hero-inner {
  max-width: 640px; margin: 0 auto;
  position: relative; z-index: 1;
}
.hdr-lib-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px; letter-spacing: 0.28em;
  color: var(--miami); text-transform: uppercase;
  display: block; margin-bottom: 16px;
  animation: hdrFadeUp 0.8s var(--ease) both;
}
.hdr-lib-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 0.95; letter-spacing: 0.02em;
  color: var(--text-primary); margin: 0 0 16px;
  animation: hdrFadeUp 0.8s var(--ease) 0.1s both;
}
.hdr-lib-title .accent { color: var(--miami); }
.hdr-lib-subtitle {
  font-family: 'DM Serif Display', serif; font-style: italic;
  font-size: clamp(15px, 2vw, 19px);
  color: var(--text-muted); max-width: 480px; margin: 0 auto; line-height: 1.5;
  animation: hdrFadeUp 0.8s var(--ease) 0.2s both;
}
@keyframes hdrFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   REPORT CARD GRID — matches .ic-topic-item pattern
============================================================ */
.hdr-lib-grid { display: block; }

.hdr-lib-card {
  display: flex; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 14px;
  box-shadow: var(--card-shadow); overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}
.hdr-lib-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.10);
  border-color: rgba(0,162,200,0.35);
}

.hdr-lib-card-accent { flex-shrink: 0; width: 5px; background: var(--miami); }

.hdr-lib-card-body {
  flex: 1; padding: 20px 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.hdr-lib-card-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.hdr-lib-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 17px; font-weight: 400;
  color: var(--text-primary); line-height: 1.3;
}
.hdr-lib-card-badge {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(0,162,200,0.08); color: var(--miami);
  white-space: nowrap; flex-shrink: 0;
}
.hdr-lib-card-desc { font-size: 14px; color: var(--text-body); line-height: 1.55; }
.hdr-lib-card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--miami); font-weight: 600; font-size: 13px;
  margin-top: 4px;
  transition: color 0.2s, gap 0.2s;
}
.hdr-lib-card:hover .hdr-lib-card-cta { color: var(--sunrise); gap: 10px; }

/* Cards that are direct-download actions (a <form> instead of an
   <a>) — reset default form/button chrome so the button fills the
   card exactly like the link-based cards do. */
form.hdr-lib-card { padding: 0; cursor: pointer; }
.hdr-lib-card-btn {
  background: none; border: none;
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
}

/* ============================================================
   EMPTY STATES
============================================================ */
.hdr-lib-empty {
  text-align: center; color: var(--text-muted);
  padding: 4rem 1.5rem; font-size: 15px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.hdr-lib-empty h3 {
  font-family: 'DM Serif Display', serif; font-weight: 400;
  font-size: 20px; color: var(--text-primary); margin: 0 0 10px;
}
.hdr-lib-empty p { margin: 0; }

/* ============================================================
   SINGLE REPORT VIEW
============================================================ */
.hdr-lib-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--miami); font-weight: 600; font-size: 13px;
  margin-bottom: 24px; transition: gap 0.2s;
}
.hdr-lib-back:hover { gap: 10px; }

.hdr-lib-report-title {
  font-family: 'DM Serif Display', serif; font-weight: 400;
  font-size: clamp(24px, 3.5vw, 32px);
  color: var(--text-primary); margin: 0 0 24px;
}

.hdr-report {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 28px 24px;
}
.hdr-report-section { margin-bottom: 22px; }
.hdr-report-section:last-child { margin-bottom: 0; }
.hdr-report-section h3 {
  font-family: 'DM Serif Display', serif; font-weight: 400;
  font-size: 17px; color: var(--text-primary); margin: 0 0 10px;
}
.hdr-report-table { width: 100%; border-collapse: collapse; }
.hdr-report-table th, .hdr-report-table td {
  text-align: left; padding: 10px 12px; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.hdr-report-table th {
  width: 40%; color: var(--text-muted); font-weight: 600;
}

.hdr-report-error {
  text-align: center; color: var(--text-muted);
  padding: 2.5rem 1.5rem; font-size: 14px;
}

/* Download-form report cards (Four Transformations / Identity & Reputation) */
.hdr-report-download-form { text-align: center; padding: 8px 0; }
.hdr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  padding: 14px 28px; border-radius: 999px;
  background: var(--miami); color: #fff !important;
  border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,162,200,0.28);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.hdr-btn:hover {
  background: #0089ab; transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,162,200,0.35);
}
.hdr-btn:active { transform: translateY(0); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
  .hdr-member-library { padding: 32px 16px 64px; }
  .hdr-lib-card { flex-direction: row; }
  .hdr-lib-card-body { padding: 16px 18px; }
  .hdr-btn { width: 100%; }
}