/* =========================================================
   The Lab — My Library (app surface)
   File: /the-lab/app/assets/css/library.css
   Rides on the shared shell (the-lab.css). Scoped to .lib-.
   ========================================================= */

.lib { display: grid; grid-template-columns: minmax(0,1fr) 292px; gap: 22px; align-items: start; }
@media (max-width: 1080px) { .lib { grid-template-columns: 1fr; } .lib-rail { order: 2; } }

/* intro */
.lib-intro {
  background: linear-gradient(135deg, #0d2138 0%, #0f766e 120%);
  color: #eafffb; border-radius: 20px; padding: 26px 28px; position: relative; overflow: hidden;
  box-shadow: 0 22px 50px -26px rgba(13,33,56,.6);
}
.lib-intro::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 240px; height: 240px; background: radial-gradient(circle, rgba(110,231,216,.28), transparent 70%); }
.lib-intro-eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #6ee7d8; }
.lib-intro-h { margin: 8px 0 6px; font-size: 25px; line-height: 1.12; font-weight: 900; letter-spacing: -.025em; max-width: 20ch; }
.lib-intro-p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #c7f2ea; max-width: 60ch; font-weight: 500; }

/* section header */
.lib-sec { margin-top: 26px; }
.lib-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lib-sec-title { font-size: 16px; font-weight: 850; letter-spacing: -.02em; color: var(--lab-ink); display: inline-flex; align-items: center; gap: 9px; }
.lib-sec-title .lib-dot { width: 8px; height: 8px; border-radius: 50%; background: #d4a017; }
.lib-sec-count { font-size: 12px; font-weight: 700; color: #94a3b8; }

/* grids */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.lib-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* resource card */
.lib-card {
  background: #fff; border: 1px solid var(--lab-line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.lib-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -22px rgba(6,17,31,.34); border-color: #cdd9d8; }
.lib-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.lib-badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: #e6efee; color: #0f766e; }
.lib-tier { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 9px; border-radius: 20px; }
.lib-tier--free { background: #dcfce7; color: #15803d; }
.lib-tier--pack { background: #ede9fe; color: #6d28d9; }
.lib-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin: 0 0 4px; }
.lib-card h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 850; letter-spacing: -.02em; line-height: 1.2; color: var(--lab-ink); }
.lib-card p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: #64748b; font-weight: 500; }
.lib-bullets { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.lib-bullets li { position: relative; padding-left: 18px; font-size: 12px; line-height: 1.4; color: #475569; font-weight: 550; }
.lib-bullets li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 6px; height: 6px; border-radius: 2px; background: #6ee7d8; }
.lib-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.lib-btn {
  appearance: none; border: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 750; text-decoration: none;
  border-radius: 10px; padding: 9px 14px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--lab-teal-d); color: #fff;
}
.lib-btn:hover { background: #0b5c55; }
.lib-btn--sec { background: #eef3f3; color: var(--lab-teal-d); }
.lib-btn--sec:hover { background: #e2ecec; }
.lib-btn--buy { background: #6d28d9; }
.lib-btn--buy:hover { background: #5b21b6; }

/* saved signal card */
.lib-note { background: #fff; border: 1px solid var(--lab-line); border-radius: 14px; padding: 15px 16px; display: flex; flex-direction: column; position: relative; }
.lib-note-tag { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #0f766e; margin-bottom: 7px; }
.lib-note h4 { margin: 0 0 7px; font-size: 13.5px; font-weight: 750; line-height: 1.35; letter-spacing: -.01em; color: var(--lab-ink); }
.lib-note p { margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: #64748b; font-weight: 500; }
.lib-note-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 650; color: #94a3b8; }
.lib-note-by { display: inline-flex; align-items: center; gap: 6px; }
.lib-note-av { width: 20px; height: 20px; border-radius: 6px; background: radial-gradient(120% 120% at 30% 20%,#0f766e,#0b5c55); color: #eafffb; display: grid; place-items: center; font-size: 9px; font-weight: 800; }
.lib-unsave { appearance: none; border: 0; background: transparent; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 750; color: #b6c0cc; padding: 3px 6px; border-radius: 7px; }
.lib-unsave:hover { color: #e11d48; background: rgba(225,29,72,.08); }

/* empty / loading */
.lib-empty { text-align: center; padding: 32px 20px; border: 1px dashed #d5dee0; border-radius: 16px; background: #fbfdfd; grid-column: 1 / -1; }
.lib-empty strong { display: block; font-size: 14px; font-weight: 850; letter-spacing: -.02em; color: var(--lab-ink); }
.lib-empty span { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: #64748b; font-weight: 550; max-width: 42ch; margin: 6px auto 0; }
.lib-empty a { color: #0f766e; font-weight: 750; text-decoration: none; }
.lib-loading { padding: 26px; text-align: center; font-size: 12.5px; font-weight: 650; color: #94a3b8; grid-column: 1 / -1; }

/* rail */
.lib-rail { display: grid; gap: 14px; position: sticky; top: 14px; }
.lib-rail-card { background: #fff; border: 1px solid var(--lab-line); border-radius: 16px; padding: 17px; }
.lib-rail-card h4 { margin: 0 0 12px; font-size: 12.5px; font-weight: 850; letter-spacing: -.01em; color: var(--lab-ink); }
.lib-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f4f4; }
.lib-stat:last-child { border-bottom: 0; }
.lib-stat b { font-size: 19px; font-weight: 850; letter-spacing: -.02em; color: #b8860b; }
.lib-stat span { font-size: 12px; font-weight: 650; color: #64748b; }
.lib-rail-card p { margin: 0; font-size: 12px; line-height: 1.5; color: #64748b; font-weight: 500; }
.lib-rail-card .lib-btn { margin-top: 12px; width: 100%; justify-content: center; }
