@font-face {
  font-family: Inter;
  src: url('/fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

.library-site {
  margin: 0;
  background: #fafafa;
  color: #262626;
  font: 16px/1.55 Inter, system-ui, sans-serif;
}

.library-site *, .library-dialog * { box-sizing: border-box; }
.library-site a { color: inherit; }
.library-header {
  max-width: 1200px;
  margin: auto;
  padding: 24px clamp(16px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.library-header img { display: block; max-width: 100%; }
.library-header a:last-child { font-size: 14px; text-decoration: none; }

.library-dialog, .library-locked {
  width: min(100% - 32px, 448px);
  padding: 28px;
  color: #262626;
  background: #fff;
  border: 1px solid #e1e7ec;
  border-radius: 20px;
  box-shadow: 0 18px 65px #162d411a;
}
html:has(.library-dialog[open]) { overflow: hidden; }
.library-dialog { max-height: calc(100dvh - 32px); }
.library-dialog::backdrop { background: #192b446e; backdrop-filter: blur(4px); }
.library-locked { margin: clamp(36px, 11vh, 130px) auto; }
.library-dialog h2, .library-locked h1 {
  margin: 0 40px 18px 0;
  font: 650 29px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: -0.7px;
}
.library-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 36px;
  height: 36px;
  background: #eef2f5;
  border-radius: 9px;
  font-size: 23px;
}
.library-form { display: grid; gap: 9px; }
.library-form label { font-size: 14px; font-weight: 600; }
.library-form input, .library-form button {
  min-height: 45px;
  border-radius: 9px;
  font: inherit;
}
.library-form input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #bfcbd6;
}
.library-form button {
  border: 0;
  padding: 8px 12px;
  background: #086eb4;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
.library-form button:hover { background: #085c96; }
.library-form :focus-visible, .library-site a:focus-visible { outline: 2px solid #086eb4; outline-offset: 3px; }
.library-dialog p, .library-locked p { margin: 15px 0 3px; font-size: 14px; color: #515961; }
.library-form .library-error { color: #9b2525; margin: 0; }
.library-dialog .library-book, .library-site .library-book { color: #0967a6; font-weight: 650; text-decoration: underline; }

.library-content {
  max-width: 1200px;
  margin: auto;
  padding: 40px clamp(16px, 5vw, 48px) 68px;
}
.library-content h1 { margin: 0 0 34px; font-size: clamp(42px, 7vw, 70px); line-height: 1; letter-spacing: -0.065em; }
.library-content section + section { margin-top: 36px; }
.library-content h2 { margin: 0 0 14px; font-size: clamp(21px, 3.5vw, 27px); }
.library-results { padding: clamp(16px, 3vw, 28px); background: #edf5fd; border-radius: 16px; }
.library-results h3 { margin: 0; }
.library-results dl { display: flex; gap: clamp(18px, 5vw, 55px); margin: 12px 0; flex-wrap: wrap; }
.library-results dl div { display: grid; gap: 2px; }
.library-results dt, .library-results p { font-size: 14px; color: #4b5967; }
.library-results dd { margin: 0; font-size: clamp(26px, 5vw, 44px); font-weight: 700; line-height: 1.1; }
.library-results p { margin: 0; }
.library-creatives { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.library-creatives figure { margin: 0; padding: 8px; border: 1px solid #e3e7ea; border-radius: 12px; background: #fff; }
.library-creatives video, .library-creatives img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: #eef0f2;
  border-radius: 7px;
}
.library-creatives figcaption { padding: 7px 4px 2px; font-size: 14px; font-weight: 650; }
.library-meta { display: flex; gap: 9px; flex-wrap: wrap; }
.library-meta a { padding: 7px 12px; border: 1px solid #dbe2e8; border-radius: 8px; text-decoration: none; }
.library-meta a:hover { background: #edf5fd; }
