:root {
  --navy: #132e4b;
  --navy2: #0e243a;
  --orange: var(--b2b-orange);
  --ink: #25374a;
  --muted: #52616c;
  --line: #dfe5e9;
  --wash: #f4f6f7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 1rem/1.58 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
a:hover { text-decoration-color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 30;
  inset: .5rem auto auto .5rem;
  padding: .7rem 1rem;
  background: white;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 84px; }
.wordmark { display: block; width: 190px; flex: none; }
.wordmark img { display: block; width: 100%; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 30px); }
.nav a { font-size: .9rem; font-weight: 650; text-decoration: none; color: var(--navy); }
.nav a:hover, .nav [aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: .3em; }
.nav .btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 7px;
  background: var(--b2b-orange);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-align: center;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.menu-toggle {
  display: none;
  min-height: 44px;
  border: 1px solid #aab9c8;
  border-radius: 7px;
  padding: 8px 12px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
}
.library-hero {
  --hero-image: url('homepage-panorama.webp');
  display: grid;
  align-items: start;
  min-height: clamp(250px, 23.3vw, 358px);
  max-width: 1536px;
  margin-inline: auto;
  background: radial-gradient(ellipse at 50% 33%, #fff8edc9, transparent 57%),
    #e5c8a9 var(--hero-image) center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.library-hero .wrap {
  width: min(48%, 660px);
  padding-block: clamp(2rem, 3.8vw, 3.5rem) 1rem;
  text-align: center;
}
.library-hero h1 {
  margin: 0 0 .65rem;
  color: var(--navy2);
  font-size: clamp(2.5rem, 5.4vw, 4.75rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.045em;
}
.library-hero p {
  max-width: 31rem;
  margin: 0 auto;
  color: var(--orange);
  font-size: 1.1875rem;
  font-style: italic;
  font-weight: 700;
}
.catalog { display: grid; grid-template-columns: minmax(0, 242px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-block: 2.5rem 4rem; }
.filters { min-width: 0; align-self: start; }
.filter-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--wash);
  border-radius: 9px;
}
.field { display: grid; gap: 5px; }
.field label { color: var(--navy); font-size: .9rem; font-weight: 750; }
.field input, .field select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #9aaab9;
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
}
.field select {
  appearance: none;
  padding-right: 26px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23132e4b' stroke-width='1.6'/%3E%3C/svg%3E") right 8px center / 14px no-repeat;
}
.clear {
  justify-self: start;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  text-decoration-color: var(--orange);
  font-size: .9rem;
  font-weight: 700;
  text-decoration-line: underline;
  text-underline-offset: .2em;
}
.result-count { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.topic + .topic { margin-top: 2.15rem; }
.topic h2 {
  margin: 0;
  padding: .05em 0 .05em .65em;
  border-left: 4px solid var(--orange);
  color: var(--navy);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  letter-spacing: -.025em;
  line-height: 1.2;
}
.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 20px;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.article h3 { margin: 0 0 .2rem; color: var(--navy); line-height: 1.3; font-size: 1.08rem; }
.article p, .empty { margin: 0; font-size: .96rem; color: var(--muted); }
.article-links { display: flex; flex-wrap: wrap; gap: 8px; }
.article-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #b8c5cf;
  border-radius: 6px;
  color: var(--navy);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.article-links a:hover { border-color: var(--orange); background: var(--wash); }
.topic-placeholder { margin: .65rem 0 0; color: var(--muted); }
.footer { background: var(--navy2); color: #fff; padding-block: 28px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.footer a:hover { text-decoration-color: var(--orange); }
@media (max-width: 820px) {
  .library-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    background: white;
  }
  .library-hero::after {
    content: "";
    width: 100%;
    aspect-ratio: 3.25;
    background: #e5c8a9 var(--hero-image) center / cover no-repeat;
  }
  .library-hero .wrap { width: min(100% - 32px, 36rem); padding-block: 1.75rem 1.5rem; }
  .header-inner { min-height: 73px; }
  .wordmark { width: 165px; }
  .js .menu-toggle { display: block; }
  .nav { flex-wrap: wrap; padding-block: 10px; gap: 10px 16px; }
  .nav a { padding-block: 6px; }
  .js .nav {
    display: none;
    position: absolute;
    inset: 73px 0 auto;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 26px #06162918;
  }
  .js .nav.open { display: flex; }
  .js .nav a { display: flex; align-items: center; min-height: 44px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; }
  .catalog { grid-template-columns: 1fr; gap: 24px; padding-top: 1.5rem; }
  .article { grid-template-columns: 1fr; }
}
