:root {
  --ab-blue: #0868df;
  --ab-blue-dark: #102553;
  --ab-blue-soft: #eaf4ff;
  --ab-border: #dce5f1;
  --ab-text: #14213d;
  --ab-muted: #61708a;
}

.ab-library, .ab-library * { box-sizing: border-box; }
.ab-library { width: 100%; color: var(--ab-text); font-family: inherit; }
.ab-library button, .ab-library input, .ab-library select { font: inherit; }
.ab-library [hidden] { display: none !important; }

.ab-hero {
  position: relative;
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 14px 24px 12px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(237,247,255,.96), rgba(255,255,255,.9), rgba(235,246,255,.96)),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(18,105,205,.08) 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(18,105,205,.08) 40px);
  border-bottom: 1px solid #d8e8f8;
}
.ab-hero::before, .ab-hero::after {
  content: '';
  position: absolute;
  width: 330px;
  height: 180px;
  bottom: -70px;
  border: 2px solid rgba(8,104,223,.09);
  transform: skewY(-8deg);
}
.ab-hero::before { left: -80px; box-shadow: 40px -32px 0 -2px rgba(8,104,223,.05), 80px -64px 0 -2px rgba(8,104,223,.04); }
.ab-hero::after { right: -80px; box-shadow: -40px -32px 0 -2px rgba(8,104,223,.05), -80px -64px 0 -2px rgba(8,104,223,.04); }
.ab-hero__content { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.ab-eyebrow { margin: 0 0 8px; color: var(--ab-blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.ab-hero h1 { margin: 0; color: #07164a; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.05; letter-spacing: -.03em; }
.ab-hero h1 + p { margin: 12px auto 25px; max-width: 720px; color: #314567; font-size: clamp(16px, 2vw, 19px); line-height: 1.55; }

.ab-search { display: grid; grid-template-columns: auto 1fr auto; align-items: center; max-width: 680px; margin: 10px auto 0; padding: 3px; background: #fff; border: 1px solid #cbd9e9; border-radius: 9px; box-shadow: 0 7px 20px rgba(16,37,83,.07); }
.ab-search__icon { padding-left: 12px; color: #6f819b; font-size: 21px; transform: rotate(-20deg); }
.ab-search input { width: 100%; min-width: 0; height: 38px; padding: 0 12px; color: var(--ab-text); font-size: 14px; background: transparent; border: 0; outline: 0; box-shadow: none; }
.ab-search input:focus { border: 0; box-shadow: none; }
.ab-search button { height: 34px; padding: 0 20px; color: #fff; font-size: 14px; font-weight: 750; background: var(--ab-blue); border: 0; border-radius: 7px; cursor: pointer; }
.ab-search button:hover { background: #0058c5; }

.ab-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.ab-chips button { padding: 6px 16px; color: #283c5f; font-size: 14px; font-weight: 650; background: rgba(255,255,255,.88); border: 1px solid #d7e3ef; border-radius: 999px; cursor: pointer; }
.ab-chips button:hover, .ab-chips button.is-active { color: #fff; background: var(--ab-blue); border-color: var(--ab-blue); }

.ab-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; max-width: 1380px; margin: 0 auto; padding: 22px 28px 55px; }
.ab-filters { position: sticky; top: 24px; align-self: start; padding: 24px 20px; background: #fff; border: 1px solid var(--ab-border); border-radius: 12px; box-shadow: 0 8px 26px rgba(16,37,83,.045); }
.ab-filters__title { display: flex; align-items: center; gap: 9px; margin-bottom: 25px; }
.ab-filters__title span { color: var(--ab-blue); font-size: 18px; }
.ab-filters h2 { margin: 0; font-size: 22px; }
.ab-field { margin-bottom: 22px; }
.ab-field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
.ab-field select, #ab-sort { width: 100%; min-height: 46px; padding: 0 38px 0 13px; color: #334766; background-color: #fff; border: 1px solid #cedbea; border-radius: 8px; }
.ab-clear { width: 100%; margin-top: 10px; padding: 12px; color: #25405f; font-weight: 650; background: #f2f7fc; border: 1px solid #d6e2ef; border-radius: 8px; cursor: pointer; }
.ab-clear:hover { color: var(--ab-blue); background: var(--ab-blue-soft); }

.ab-results { min-width: 0; }
.ab-results__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 48px; margin-bottom: 14px; }
.ab-count { margin: 0; font-weight: 750; }
#ab-sort { width: 190px; min-height: 42px; }
.ab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-height: 300px; transition: opacity .2s ease; }
.ab-grid.is-loading { opacity: .45; }
.ab-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--ab-border); border-radius: 11px; box-shadow: 0 8px 24px rgba(16,37,83,.055); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ab-card:hover { transform: translateY(-3px); border-color: #b5d3f5; box-shadow: 0 14px 30px rgba(16,37,83,.11); }
.ab-card__image { display: block; aspect-ratio: 16 / 6; overflow: hidden; background: #eaf1f8; }
.ab-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ab-card:hover .ab-card__image img { transform: scale(1.035); }
.ab-card__body { display: flex; flex: 1; flex-direction: column; padding: 10px 12px 12px; }
.ab-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 6px; }
.ab-card__meta > span:first-child { display: inline-flex; padding: 3px 8px; color: #0759bd; font-size: 11px; font-weight: 750; background: #e8f3ff; border-radius: 999px; }
.ab-card__draft { color: #805d00 !important; background: #fff3c7 !important; }
.ab-card h3 { display: -webkit-box; min-height: 40px; overflow: hidden; margin: 0 0 6px; font-size: 16px; line-height: 1.25; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ab-card h3 a { color: #111f3d; text-decoration: none; }
.ab-card p { display: -webkit-box; min-height: 38px; overflow: hidden; margin: 0 0 10px; color: var(--ab-muted); font-size: 13px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ab-card__button { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; padding: 7px 12px; color: #fff; font-size: 13px; font-weight: 750; text-decoration: none; background: var(--ab-blue); border-radius: 6px; }
.ab-card__button:hover { color: #fff; background: #0058c5; }
.ab-empty { grid-column: 1 / -1; align-self: start; padding: 70px 20px; text-align: center; background: #f8fbfe; border: 1px dashed #c8d9e9; border-radius: 12px; }
.ab-empty strong { display: block; margin-bottom: 6px; font-size: 20px; }
.ab-empty p { margin: 0; color: var(--ab-muted); }
.ab-pagination { display: flex; justify-content: center; gap: 7px; margin-top: 28px; }
.ab-pagination button { min-width: 38px; height: 38px; padding: 0 10px; color: #294160; font-weight: 650; background: #fff; border: 1px solid #d4e0ed; border-radius: 7px; cursor: pointer; }
.ab-pagination button:hover, .ab-pagination button.is-active { color: #fff; background: var(--ab-blue); border-color: var(--ab-blue); }
.ab-pagination button:disabled { opacity: .38; cursor: not-allowed; }

@media (max-width: 1050px) {
  .ab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ab-hero { padding: 12px 14px 11px; }
  .ab-search { grid-template-columns: auto 1fr auto; }
  .ab-layout { display: block; padding: 20px 15px 45px; }
  .ab-filters { position: static; margin-bottom: 22px; }
  .ab-results__toolbar { align-items: stretch; flex-direction: column; }
  #ab-sort { width: 100%; }
  .ab-grid { grid-template-columns: 1fr; }
}
