/* MoatConnect: Tools › Educational Library (public/library.js). Uses the tokens in styles.css; the covers echo the PDFs. */
.lib-search { display: grid; gap: 10px; margin-bottom: 22px; }
.lib-search input[type=search] { font: inherit; font-size: 15px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 0; background: var(--panel); color: var(--ink); width: 100%; }
.lib-search input[type=search]:focus { outline: none; border-color: var(--accent); }
.lib-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lib-filters select { width: auto; flex: 0 0 auto; font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 0; background: var(--panel); color: var(--ink); }

.lib-shelf { margin-bottom: 26px; }
.lib-shelf > h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.lib-titles { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lib-card { background: var(--panel); border: 1px solid var(--line); border-radius: 0; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.lib-cover { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 120px; padding: 14px 16px; background: #04060a; color: #e6eef5; }
.lib-cover:hover { text-decoration: none; background: #0b1119; }
.lib-mark, .lib-eyebrow { font-weight: 300; font-size: 11px; letter-spacing: .5em; text-transform: lowercase; color: rgba(230, 238, 245, .7); }
.lib-cover b { font-weight: 400; font-size: 17px; line-height: 1.25; color: #f4f8fb; }
.lib-body { padding: 12px 16px 14px; display: flex; flex-direction: column; flex: 1; }
.lib-body p { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); flex: 1; }

.lib-results { padding: 4px 16px; }
.lib-res { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; transition: background .4s ease; }
.lib-res:last-child { border-bottom: 0; }
.lib-res .grow { min-width: 0; flex: 1; }
.lib-res p { margin: 4px 0 2px; font-size: 13.5px; }
.lib-res-t { font-weight: 600; color: var(--ink); }
.lib-res-t:hover { color: var(--accent); }
.lib-res.flash { background: var(--accent-soft); }
.lib-n { flex: 0 0 22px; font-size: 12px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }

.lib-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; background: #04060a; color: #e6eef5; border-radius: 0; padding: 26px 26px 22px; margin: 6px 0 22px; }
.lib-hero h1 { color: #f4f8fb; font-weight: 400; margin: 6px 0 6px; }
.lib-hero p { margin: 0; color: rgba(230, 238, 245, .8); max-width: 560px; }
.lib-hero .lib-eyebrow { letter-spacing: .3em; text-transform: uppercase; font-size: 11px; }
.lib-meta { margin-top: 14px; font-size: 12px; color: rgba(230, 238, 245, .55); }
.lib-hero-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-hero .btn:not(.primary) { background: transparent; color: #e6eef5; border-color: rgba(207, 227, 242, .35); }
.lib-hero .btn:not(.primary):hover { background: rgba(207, 227, 242, .1); }
.lib-intro { font-size: 16px; line-height: 1.6; max-width: 720px; margin: 0 0 8px; }
.lib-h { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
.lib-level { font-size: 12px; font-weight: 600; color: var(--muted); margin: 16px 0 6px; }
.lib-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lib-pick { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.lib-pick:hover { text-decoration: none; border-color: var(--accent); }
.lib-pick b { font-size: 14.5px; line-height: 1.35; }
.lib-pick span:not(.lib-step) { font-size: 13.5px; color: var(--muted); }
.lib-step { width: 24px; height: 24px; display: grid; place-items: center; font-size: 11px; font-weight: 300; border: 1px solid var(--line-2); color: var(--ink); }
.lib-ideas { margin: 0; padding: 0 0 0 20px; display: grid; gap: 10px; max-width: 760px; }
.lib-ideas li { font-size: 15px; line-height: 1.55; padding-left: 4px; }
.lib-cites { margin-left: 6px; display: inline-flex; gap: 3px; vertical-align: 1px; }
.lib-cites a { font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 0; display: inline-grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.lib-cites a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }

@media (max-width: 900px) { .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .lib-grid, .lib-start { grid-template-columns: 1fr; }
  .lib-hero { padding: 20px 18px; }
  .lib-filters .seg { width: 100%; }
}

/* MoatConnect theme (connect.css): covers and the guide hero sit on the page's own black, so they get a frame and the grid */
.lib-card { position: relative; overflow: visible; }
.lib-cover { border-bottom: 1px solid var(--line); background: #04060a linear-gradient(to right, rgba(207, 227, 242, .05) 1px, transparent 1px) 0 0 / 22px 22px; transition: background-color .35s ease; }
.lib-cover:hover { background-color: #0b1119; }
.lib-cover b { font-weight: 200; font-size: 19px; }
.lib-hero { position: relative; border: 1px solid var(--line); background: #04060a; background-image: linear-gradient(to right, rgba(207, 227, 242, .05) 1px, transparent 1px), linear-gradient(to bottom, rgba(207, 227, 242, .05) 1px, transparent 1px); background-size: 22px 22px; }
.lib-hero h1 { font-weight: 200; }
.lib-hero .lib-eyebrow { font-weight: 400; letter-spacing: .34em; }
.lib-pick { transition: border-color .3s ease; }
.lib-pick:hover { border-color: var(--line-2); }
.lib-pick b { font-weight: 500; }
.lib-res-t { font-weight: 500; }
.lib-res-t:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); }
.lib-cites a { font-weight: 400; border: 1px solid var(--line); background: transparent; }
.lib-cites a:hover { background: var(--ink); color: var(--bg); }
.lib-ideas li { font-weight: 300; }
.lib-intro { font-weight: 300; }
.lib-level { font-weight: 400; letter-spacing: .2em; text-transform: uppercase; font-size: 10.5px; }
.lib-shelf > h2 { font-weight: 400; letter-spacing: .26em; }
.lib-h { font-weight: 400; letter-spacing: .26em; font-size: 11px; }
