:root {
  --site-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --site-font-brand: Georgia, "Times New Roman", serif;
  --site-font-size-base: 16px;
  --site-line-height-base: 1.55;
  --site-shell-accent: #2fa9eb;
  --site-shell-accent-strong: #136b99;
  --site-shell-accent-soft: #56b7ff;
  --site-shell-text: #253745;
  --site-shell-muted: #5f7280;
  --site-shell-bg: #e6ebef;
  --site-shell-paper: #f7fafc;
  --site-shell-paper-2: #f0f5f8;
  --site-shell-border: rgba(19, 107, 153, 0.12);
  --site-shell-footer: #2f2f2f;
  --site-radius-shell: 1.75rem;
  --site-radius-card: 1.5rem;
  --site-radius-media: 1.55rem;
  --site-radius-control: 1rem;
  --site-radius-pill: 999px;
  --site-shadow-card: 0 18px 45px rgba(19, 107, 153, 0.12);
  --site-shadow-soft: 0 10px 24px rgba(19, 107, 153, 0.08);
  --site-title-page: clamp(2rem, 4vw, 4rem);
  --site-title-section: clamp(1.75rem, 2.8vw, 3rem);
  --site-title-card: clamp(1.35rem, 1.8vw, 1.9rem);
  --site-title-article: var(--site-title-page);
  --site-title-h2: clamp(1.6rem, 2vw, 2.35rem);
  --site-title-h3: clamp(1.14rem, 1.3vw, 1.45rem);
}

body.is-search-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(19, 107, 153, 0.08);
  background: #fff;
}

.site-header__inner,
.site-footer__inner,
.search-overlay__inner {
  width: min(1320px, calc(100vw - 48px));
  margin: 0 auto;
}

.site-header__inner {
  padding: 1.1rem 0 0.95rem;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  align-items: center;
  gap: 1rem;
}

.site-header__brand {
  display: flex;
  justify-content: center;
}

.site-header__logo {
  width: min(132px, 100%);
  display: block;
}

.site-header__title {
  margin: 0;
  text-align: center;
  color: var(--site-shell-accent);
  font-family: var(--site-font-brand);
  font-size: clamp(2.2rem, 3.8vw, 4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.site-header__actions {
  display: flex;
  justify-content: center;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(19, 107, 153, 0.08);
  color: #000;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.search-button:hover,
.search-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(19, 107, 153, 0.12);
}

.search-button__icon {
  width: 1.3rem;
  height: 1.3rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10120;
  padding: 1.5rem 0 2rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.search-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.search-overlay__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem clamp(1.25rem, 2.5vw, 2.6rem);
  align-items: start;
}

.search-overlay__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6rem;
  margin-top: 0.7rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(231, 227, 219, 0.92);
  color: #8f98a4;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.search-overlay__close:hover,
.search-overlay__close:focus-visible {
  outline: none;
  transform: translateY(-1px);
  background: rgba(224, 219, 210, 0.96);
}

.search-overlay__close-icon {
  width: 2.05rem;
  height: 2.05rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.search-overlay__panel {
  display: grid;
  gap: 1.4rem;
  padding-top: 0.15rem;
}

.search-overlay__title {
  margin: 0;
  color: #111;
  font-size: clamp(2.8rem, 6.2vw, 5.4rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}

.search-overlay__field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 5.2rem;
  padding: 0 1rem 0 1.15rem;
  border: 2px solid rgba(17, 17, 17, 0.92);
  border-radius: var(--site-radius-control);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(19, 107, 153, 0.06);
}

.search-overlay__field-icon {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  stroke: #131313;
  stroke-width: 2;
  fill: none;
}

.search-overlay__input {
  width: 100%;
  min-width: 0;
  padding: 0.15rem 0.9rem;
  border: 0;
  background: transparent;
  color: #19222a;
  font: inherit;
  font-size: clamp(1.22rem, 1rem + 0.6vw, 1.7rem);
  line-height: 1.2;
}

.search-overlay__input::placeholder {
  color: #8d9aac;
}

.search-overlay__input:focus {
  outline: none;
}

.search-overlay__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c9c9c9;
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.search-overlay__clear:hover,
.search-overlay__clear:focus-visible {
  outline: none;
  transform: scale(1.04);
  background: #b4b4b4;
}

.search-overlay__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid rgba(48, 75, 95, 0.28);
  border-radius: var(--site-radius-control);
  background: rgba(255, 255, 255, 0.86);
  color: #6d8193;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.search-chip:hover,
.search-chip:focus-visible,
.search-chip.is-active,
.search-chip--primary {
  outline: none;
  border-color: rgba(0, 0, 0, 0.85);
  color: #131313;
}

.search-chip:hover,
.search-chip:focus-visible {
  transform: translateY(-1px);
}

.search-results {
  display: grid;
  gap: 0.8rem;
}

.search-result {
  display: grid;
  gap: 0.28rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(19, 107, 153, 0.08);
  border-radius: calc(var(--site-radius-control) + 0.15rem);
  background: rgba(255, 255, 255, 0.9);
  color: var(--site-shell-text);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(19, 107, 153, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.search-result:hover,
.search-result:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(47, 169, 235, 0.28);
  box-shadow: 0 14px 28px rgba(19, 107, 153, 0.1);
}

.search-result__meta {
  color: #7b8f9e;
  font-size: 0.88rem;
  line-height: 1.2;
}

.search-result__title {
  color: #1e3343;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
}

.search-result__excerpt {
  color: #607686;
  font-size: 0.94rem;
  line-height: 1.35;
}

.search-results__empty {
  margin: 0;
  color: #607686;
  font-size: 1rem;
  line-height: 1.45;
}

.site-footer {
  margin-top: auto;
  background: var(--site-shell-footer);
  color: #fff;
  min-height: 154px;
  display: flex;
  align-items: center;
}

.site-footer__inner {
  padding: 2rem 0 2.1rem;
  display: grid;
  justify-items: center;
  gap: 1.15rem;
  text-align: center;
}

.site-footer__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-footer__socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer__meta {
  width: min(100%, 1160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
}

.site-footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.site-footer__legal-link {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  border-bottom: 0;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.site-footer__legal-link:hover,
.site-footer__legal-link:focus-visible {
  outline: none;
  color: #fff;
  opacity: 0.78;
}

.site-footer__legal-link + .site-footer__legal-link::before {
  content: "";
  width: 0.28rem;
  height: 0.28rem;
  margin: 0 0.9rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  flex: 0 0 auto;
}

.site-footer__copy {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.25;
  white-space: nowrap;
}

.site-footer__brand {
  font-weight: 800;
  color: #fff;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
  opacity: 0.86;
}

.site-footer__social-icon {
  height: 1.8rem;
  width: auto;
  display: block;
  object-fit: contain;
  filter: none;
}

@media (max-width: 991.98px) {
  .search-overlay {
    padding: 1rem 0 1.4rem;
  }

  .search-overlay__inner {
    width: calc(100vw - 28px);
    grid-template-columns: 1fr;
    gap: 0.95rem;
  }

  .search-overlay__close {
    width: 4.5rem;
    height: 4.5rem;
    margin-top: 0;
  }

  .search-overlay__panel {
    gap: 1rem;
  }

  .search-overlay__field {
    min-height: 4.45rem;
    padding-inline: 0.95rem;
  }

  .search-chip {
    min-height: 2.7rem;
    padding: 0.58rem 0.92rem;
  }
}

@media (max-width: 767.98px) {
  .site-header__inner,
  .site-footer__inner,
  .search-overlay__inner {
    width: calc(100vw - 28px);
  }

  .search-overlay__title {
    font-size: clamp(2.2rem, 13vw, 3.35rem);
  }

  .search-overlay__field {
    min-height: 3.85rem;
    border-radius: 0.88rem;
  }

  .search-overlay__field-icon {
    width: 1.55rem;
    height: 1.55rem;
  }

  .search-overlay__input {
    font-size: 1.1rem;
    padding-inline: 0.72rem;
  }

  .search-overlay__clear {
    width: 1.85rem;
    height: 1.85rem;
  }

  .search-overlay__chips {
    gap: 0.55rem;
  }

  .search-chip {
    min-height: 2.45rem;
    padding: 0.52rem 0.82rem;
    font-size: 0.92rem;
    border-radius: 0.9rem;
  }

  .search-result {
    padding: 0.9rem 0.95rem;
  }

  .search-result__title {
    font-size: 1rem;
  }

  .site-header__inner {
    padding: 0.85rem 0 0.8rem;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
  }

  .site-header__brand {
    justify-content: flex-start;
  }

  .site-header__logo {
    width: 4rem;
  }

  .site-header__title {
    font-size: clamp(1.55rem, 7vw, 2.35rem);
  }

  .site-header__actions {
    justify-content: flex-end;
  }

  .search-button {
    width: 2.65rem;
    height: 2.65rem;
  }

  .site-footer__inner {
    padding: 1.6rem 0 1.7rem;
  }

  .site-footer__title {
    font-size: 1rem;
  }

  .site-footer__socials {
    gap: 0.85rem;
  }

  .site-footer__meta {
    gap: 0.7rem;
  }

  .site-footer__links {
    justify-content: center;
    gap: 0.45rem 0.95rem;
  }

  .site-footer__legal-link + .site-footer__legal-link::before {
    margin: 0 0.45rem 0 0;
  }

  .site-footer__copy {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-button,
  .site-footer__social-link,
  .search-overlay,
  .search-overlay__close,
  .search-overlay__clear,
  .search-chip,
  .search-result {
    transition: none;
  }
}
