
/* Шапка: иконка float слева, текст обтекает (удобно на узкой ширине) */
.site-header {
  padding: calc(var(--ids__density, 1.3) * 0.75em) 0;
  padding-left: calc(var(--ids__density, 1.3) * 0.6em);
  padding-right: calc(var(--ids__density, 1.3) * 0.6em);

  & .site-header__row {
    display: flow-root;
    max-width: 50rem;
  }

  & .site-header__logo {
    float: left;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 3.25rem;
    height: 3.25rem;
    margin-right: 0.5em;
    margin-bottom: 0.25em;
    padding: 0.35rem;
    background-color: rgb(var(--ids__accent-RGB));

    @media (width < 768px) {
      width: 2.6rem;
      height: 2.6rem;
      margin-top: 0.1em;
      margin-right: 0.34em;
      margin-bottom: 0;
    }

    & svg {
      display: block;
      width: 100%;
      height: 100%;
    }
  }

  & .site-header__tagline {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.32;
    color: rgb(var(--ids__accent-RGB));

    @media (width < 768px) {
      font-size: 0.7rem;
    }

    & .site-header__eyes {
      display: inline-block;
      height: 1em;
      width: auto;
      vertical-align: -0.06em;
      margin: 0 0.05em 0 -0.1em;
      transform: scale(1.2);
    }
  }

  & .site-header__project {
    font-weight: 700;
  }
}

.container {
}

/* Дата в hgroup */
.post-date {
  font-size: 0.6em;
  color: rgba(var(--ids__text-RGB), 0.6);
  margin: 0 0 calc(var(--ids__density, 1.3) * 0.25em) 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Автор и теги — один текстовый поток (без flex: иначе теги уезжают отдельным блоком) */
.post-meta {
  display: block;
  font-size: 0.8em;
  font-weight: 500;
  line-height: 1.45;
  margin: calc(var(--ids__density, 1.3) * 1.2em) 0 0 0;

  & .post-meta__avatar {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.1em;
    border-radius: 50%;
    object-fit: cover;
    /* выравнивание по центру строки, чуть ниже — рядом с подчёркнутым именем */
    vertical-align: -0.3em;
  }

  & .post-meta__author {
    display: inline;
    margin: 0;
  }

  & .post-meta__sep {
    display: inline;
    margin: 0 0.25em;
    color: rgba(var(--ids__text-RGB), 0.45);
    user-select: none;
  }

  & .post-meta__tags {
    display: inline;
    margin: 0;
  }
}

/* Промо после последней публикации: блок на всю ширину колонки */
/* Специфичность выше `.ids a`, чтобы не тянуть подчёркивание и перебить цвет */
.ids a.post-subscribe-promo {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: calc(var(--ids__density, 1.3) * 1.4em);
  padding: 1em 1.25em;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05em;
  line-height: 1.25;
  color: rgb(var(--ids__link-RGB));
  background-color: rgba(var(--ids__link-RGB), 0.2);
  transition:
    color 0.5s ease,
    background-color 0.5s ease;

  &:hover {
    color: rgb(var(--ids__hover-RGB));
    background-color: rgba(var(--ids__hover-RGB), 0.2);
    transition:
      color 0s ease,
      background-color 0s ease;
  }
}

/* Футер: одна строка, акцентный цвет; ссылки — глобальные .ids a */
.site-footer {
  margin-top: 5em;
  padding: calc(var(--ids__density, 1.3) * 1.5em) 0
    calc(var(--ids__density, 1.3) * 0.75em);
  padding-left: calc(var(--ids__density, 1.3) * 0.6em);
  padding-right: calc(var(--ids__density, 1.3) * 0.6em);
  max-width: 50rem;

  & .site-footer__line {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.32;
    color: rgb(var(--ids__accent-RGB));

    @media (width < 768px) {
      font-size: 0.7rem;
    }
  }
}

body {
  margin: 0;
}

*,
*:before,
*:after {
  box-sizing: border-box;

  &:focus:not(:focus-visible) {
    outline: none;
  }
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0
}

img {
  display: block;
  width: 100%;
}
.ids {
  & a {
    color: rgb(var(--ids__link-RGB));
    text-decoration: underline;
    will-change: color;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
    text-decoration-skip-ink: none;
    text-decoration-color: rgba(var(--ids__link-RGB), 1);
    transition:
      color 0.5s ease,
      text-decoration 0.5s ease;

    &:hover {
      color: rgb(var(--ids__hover-RGB));
      text-decoration-color: rgba(var(--ids__hover-RGB), 1);
      transition:
        color 0s ease,
        text-decoration 0s ease;
    }
  }

  .ids__promo-link {
    display: flex;

    & a {
      display: inline-block;
      padding: 0.45em 0.6em 0.5em;
      border: 1px solid rgba(var(--ids__text-RGB), 0.5);
      border-right: 0;

      &:hover {
        background-color: rgba(var(--ids__hover-RGB), 0.1);
      }

      &:first-child {
        border-radius: 0.3em 0 0 0.3em;
        padding-left: 1em;
      }

      &:last-child {
        border-radius: 0 0.3em 0.3em 0;
        padding-right: 1em;
        border-right: 1px solid rgba(var(--ids__text-RGB), 0.5);
      }

      &.active {
        color: RGB(var(--ids__text-RGB));
        background-color: rgba(var(--ids__text-RGB), 0.05);
        -webkit-text-decoration: none;
        text-decoration: none;
        cursor: default;
      }

      &.active::after {
        content: " ↓";
      }
    }
  }

  & p {
    margin-top: 0;
    margin-bottom: calc(var(--ids__density) * 0.4em);

    &.loud {
      font-size: 1.2em;
      line-height: 1.2;
    }

    &.huge {
      font-size: 6em;
      line-height: 1;

      @media (max-width: 767px) {
        &.huge {
          font-size: 3.2em;
        }
      }

      @media (max-width: 549.98px) {
        &.huge {
          font-size: 2.8em;
        }
      }
    }
  }

  & h1,
  & h2,
  & h3,
  & h4,
  & h5,
  & h6 {
    margin: 0;
    font-weight: 600;
  }

  & h1 {
    font-size: 3.6em;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: calc(var(--ids__density) / 1.3);
    margin-bottom: 0.4em;

    @media (width < 768px) {
      font-size: 2.6em;
    }

    &.S {
      font-size: 2.4em;
      font-weight: 650;
    }
    &.XS {
      font-size: 1.5em;
      font-weight: 600;
    }
  }

  & h2 {
    font-size: 2.4em;
    font-weight: 650;
    line-height: 1;
    margin-bottom: 0.3em;

    @media (width < 768px) {
      font-size: 2em;
    }

    &.XS {
      font-size: 1.5em;
      font-weight: 600;
    }
  }

  & h3 {
    font-size: 1.5em;
    line-height: calc(var(--ids__density) / 1.1);
    margin-bottom: 0.6em;
  }

  & h4 {
    font-size: 1.1em;
    line-height: var(--ids__density);
    margin-bottom: 0.5em;
  }

  & h5 {
    font-size: 1em;
    line-height: var(--ids__density);
    margin-bottom: 0.5em;
  }

  & h6 {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: var(--ids__density);
    margin-bottom: 0.5em;
  }

  & strong,
  & b {
    font-weight: 600;
  }

  & mark {
    color: rgb(var(--ids__text-RGB));
    background-color: rgb(var(--ids__mark-RGB));
  }

  & ul,
  & ol {
    margin: 0 0 calc(var(--ids__density) * 0.75em) 0;
    padding: 0;

    & li {
      position: relative;
      margin-bottom: calc(var(--ids__density) * 0.5em);
    }
  }

  & ul {
    & li {
      list-style-type: none;
      padding-left: calc(var(--ids__density) * 0.75em);

      &:before {
        position: absolute;
        left: 0;
        content: "⋅ ";
      }
    }
  }

  & ol {
    & li {
      list-style: decimal inside none;
    }
  }

  & blockquote {
    font-size: 1.4em;
    line-height: var(--ids__density);
    margin: 0;
    padding-left: calc(var(--ids__density) * 0.75em);
    margin-bottom: calc(var(--ids__density) * 1em);
  }

  & aside {
    margin: 0;
    margin-bottom: calc(var(--ids__density) * 0.5em);
    background: rgb(var(--ids__surface-RGB));
    padding-top: calc(var(--ids__density) * 0.4em);
    padding-right: calc(var(--ids__density) * 1.5em);
    padding-bottom: calc(var(--ids__density) * 0.4em);
    padding-left: calc(var(--ids__density) * 0.5em);
    border-radius: 0.2em;

    @media (width < 768px) {
      padding-right: calc(var(--ids__density) * 0.75em);
    }
  }

  & code {
    font-size: 0.9em;
    font-family: "Inter";
    letter-spacing: 0.02em;
    font-weight: 450;
    padding: 0.1em 0.25em;
    border-radius: 0.2em;
    color: rgba(var(--ids__code-RGB), 1);
    border: 1px solid rgba(var(--ids__code-RGB), 0.1);
    background: rgba(var(--ids__code-RGB), 0.1);
  }

  & figure {
    margin: 0 0 calc(var(--ids__density) * 0.5em) 0;

    &.XXS,
    &.ids__figure__XXS {
      width: 25%;
    }
    &.XS,
    &.ids__figure__XS {
      width: 50%;
    }
    &.S,
    &.ids__figure__S {
      width: 75%;
    }

    & figcaption {
      margin-top: calc(var(--ids__density) * 0.25em);
      font-size: 0.8em;
      line-height: var(--ids__density);
      opacity: 0.7;
    }
  }

  & details {
    padding: 0.5em;
    cursor: pointer;
    border-radius: var(--ids__radius);

    & summary {
      padding-bottom: var(--ids__micro-padding);
    }
  }

  & table {
    border-spacing: 0;
    background-color: inherit;

    @media (max-width: 767px) {
      font-size: 0.7em;
    }

    thead {
      background-color: inherit;
    }

    tr {
      background-color: inherit;

      & th {
        position: sticky;
        top: 0px;
        text-align: left;
        border-bottom: 2px solid rgba(var(--ids__text-RGB), 1);
        padding-bottom: 0.3em;
        background-color: inherit;

        @media (max-width: 767px) {
          padding-top: 0.8em;
        }
      }

      & td {
        padding: 0.8em 0.5em 1em 0;
        border-bottom: 1px solid rgba(var(--ids__text-RGB), 0.5);
        vertical-align: top;
      }

      &:last-child {
        & td {
          border-bottom: none;
        }
      }
    }
  }

  & hr {
    border-top-color: rgba(var(--ids__text-RGB), 0.2);
    border-bottom: 0;
  }
}

:root {
  --ids__text-RGB: 0, 35, 70;
  --ids__link-RGB: 51, 76, 219;
  --ids__hover-RGB: 0, 200, 0;
  --ids__accent-RGB: 51, 76, 219; /* #334cdb */
  --ids__code-RGB: 115, 120, 125;
  --ids__mark-RGB: 255, 225, 0;
  --ids__surface-RGB: 238, 240, 242;
  --ids__background-RGB: 255, 255, 255;
}

body {
  color: rgba(var(--ids__text-RGB), 1);
  background-color: rgba(var(--ids__background-RGB), 1);
}

.ids__space {
  height: calc(var(--ids__density) * 0.7em);

  &.S {
    height: calc(var(--ids__density) * 0.7em);
  }
  &.M {
    height: calc(var(--ids__density) * 1.4em);
  }
  &.L {
    height: calc(var(--ids__density) * 2.4em);
  }
  &.XL {
    height: calc(var(--ids__density) * 4em);
  }
}

.ids__wrapper {
  position: relative;
  width: 60%;
  margin: 0 auto 0 10%;

  @media (width < 768px) {
    width: 100%;
    padding: 0 calc(var(--ids__density) * 0.6em);
    margin: 0 auto;
  }

  & .ids__text-width {
    width: 85%;

    @media (width < 768px) {
      width: 100%;
    }
  }
}

.ids__sequence {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: calc(var(--ids__density) * 0.4em);
  --gap: 0em;
  gap: var(--gap);

  &.gap-L {
    --gap: 1.5em;
    margin-bottom: calc(var(--gap) * 1.5);
  }

  &.gap-M {
    --gap: 1em;
    margin-bottom: calc(var(--gap) * 1.5);
  }

  &.gap-S {
    --gap: 0.5em;
    margin-bottom: calc(var(--gap) * 1.5);
  }

  .ids__sequence-item {
    --columns: 4;
    width: calc((100% - var(--gap) * (var(--columns) - 1)) / var(--columns));

    @media (width < 768px) {
      --columns: 2;
    }
  }

  &.XL {
    .ids__sequence-item {
      --columns: 2;

      @media (width < 768px) {
        --columns: 1;
      }
    }
  }

  &.L {
    .ids__sequence-item {
      --columns: 3;

      @media (width < 768px) {
        --columns: 2;
      }
    }
  }

  &.S {
    .ids__sequence-item {
      --columns: 6;

      @media (width < 768px) {
        --columns: 3;
      }
    }
  }
}

.ids__rounded {
  border-radius: var(--ids__radius);
  corner-shape: squircle;
  overflow: hidden;
}

@supports not (corner-shape: squircle) {
  .ids__rounded {
    border-radius: 0;
    border-radius: initial;
    mask:
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,1 c0,-1 0,-1 1,-1 l99,0 l0,100 l-100,0 Z"/></svg>')
        top left / calc(var(--ids__radius) * 100) no-repeat intersect,
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l99,0 c1,0 1,0 1,1 l0,99 l-100,0 l0,-100 Z"/></svg>')
        top right / calc(var(--ids__radius) * 100) no-repeat intersect,
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l100,0 l0,99 c0,1 -0,1 -1,1 l-99,0 Z"/></svg>')
        bottom right / calc(var(--ids__radius) * 100) no-repeat intersect,
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l100,0 l0,100 l-99,0 c-1,0 -1,-0 -1,-1 Z"/></svg>')
        bottom left / calc(var(--ids__radius) * 100) no-repeat intersect;
  }
}

header,
footer {
  padding: calc(var(--ids__density) * 1em);
}

* {
  box-sizing: border-box;
}

/* Fonts */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  src: url("fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
}

body {
  font-family: "Inter";
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

/* Density and radius */

:root {
  --ids__density: 1.3;
  --ids__radius: 1.5em;
}

body {
  font-size: 1em;
  line-height: var(--ids__density);
}

html {
  /* Font-size calculation using variables */

  --mobile-font-size-min: 14;
  --mobile-font-size-max: 32;

  --desktop-font-size-min: 11.5;
  --desktop-font-size-max: 22.5;

  --mobile-viewport-min: 320;
  --mobile-desktop-breakpoint: 768;
  --desktop-viewport-max: 1500;

  font-size: calc(var(--mobile-font-size-min) * 1px);

  @media screen and (min-width: 320px) {
    font-size: calc(
      var(--mobile-font-size-min) * 1px +
        (var(--mobile-font-size-max) - var(--mobile-font-size-min)) *
        (
          (100vw - var(--mobile-viewport-min) * 1px) /
            (var(--mobile-desktop-breakpoint) - var(--mobile-viewport-min))
        )
    );
  }

  @media screen and (min-width: 768px) {
    font-size: calc(
      var(--desktop-font-size-min) * 1px +
        (var(--desktop-font-size-max) - var(--desktop-font-size-min)) *
        (
          (100vw - var(--mobile-desktop-breakpoint) * 1px) /
            (var(--desktop-viewport-max) - var(--mobile-desktop-breakpoint))
        )
    );
  }

  @media screen and (min-width: 1500px) {
    font-size: calc(var(--desktop-font-size-max) * 1px);
  }
}

/* Smooth scroll for anchored links */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.ids__navbar {    
    display: block;
    position: fixed;
    top: 0.3em;
    left: 0.3em;
    z-index: 1;

    @media (width < 768px) { 
        position: static;
        margin: 1em 0;

    }
}

.ids__navbar ul li {
    font-size: 0.8em;
    border: solid 1px transparent;
    
    padding: 0;
    margin-bottom: 0;
    
    &::before {
        content: '';
    }

    @media (width < 768px) { 
        font-size: 1em;
    }
    
    a {
        padding: 0.2em 0.5em 0.2em 0.3em;
        border-radius: 0.2em;
        display: block;
        text-decoration: none;

        @media (width < 768px) { 
            padding: 0.2em 0;
        }
    }
}

.ids__navbar .current {

    a {
        background-color: rgba(var(--ids__link-RGB), 0.1);

        @media (width < 768px) { 
            background-color: transparent;
        }

        &:hover {
            background-color: rgba(var(--ids__hover-RGB), 0.1);
            @media (width < 768px) { 
            background-color: transparent;
        }
        }
    }

    
    
}
.ids__nav-item {
}

@import "lib/photoswipe.css";

ids-gallery,
.ids__gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4em;
  background-color: rgba(var(--ids__text-RGB), 0.03);
  padding-bottom: 1em;
  margin-bottom: 1em;

  figure {
    flex: 0 0 12.5em;

    @media (width < 768px) {
      flex: 0 0 calc(50% - 0.2em);
    }

    &:focus-within:has(a:focus-visible) {
      outline: 2px solid rgb(var(--ids__link-RGB));
      outline-offset: 2px;
    }

    a:hover,
    a:focus-visible {
      opacity: 0.9;
    }

    img {
      object-fit: contain;
      max-height: 100%;
      max-width: 100%;
    }
  }
}

/* PhotoSwipe lightbox caption */
.pswp .pswp__caption {
  position: absolute;
  display: grid;
  left: 0;
  right: 0;
  bottom: calc(var(--ids__density, 1.5) * 1em);

  figcaption {
    place-self: center;
    color: rgb(var(--ids__background-RGB));
    background: rgba(var(--ids__text-RGB), 0.8);
    font-size: 0.8em;
    line-height: var(--ids__density, 1.5);
    padding: 0.4em 0.8em;
    text-align: center;
    max-width: 80%;

    a {
      color: inherit;
      text-decoration: underline;
      text-underline-offset: 0.15em;

      &:hover {
        opacity: 0.7;
      }
    }
  }
}

.ids__inline-gallery {
  display: grid;
  gap: 0.2em;
  position: relative;
  touch-action: pan-y;

  & > img {
    display: block;
    grid-area: 1/1;
    width: 100%;
    aspect-ratio: var(--img-aspect-ratio, 1/1);
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    visibility: hidden;
    transition: filter 500ms ease;
  }

  & > img:first-child {
    visibility: visible;
  }

  & > a::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
  }

  &:hover {
    &:has(a) > img {
      filter: brightness(105%);
      transition: filter 0s;
    }
  }

  .ids__inline-gallery__pos {
    text-align: center;
    font-variant-numeric: tabular-nums;

    &::before {
      content: attr(data-index) "/" attr(data-count);
    }
  }

  .ids__inline-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 0.6em;

    .ids__inline-gallery__dot {
      width: 0.3em;
      aspect-ratio: 1/1;
      border-radius: 50%;
      background-color: rgba(var(--ids__text-RGB), 0.2);
    }

    .ids__inline-gallery__dot-active {
      background-color: rgba(var(--ids__text-RGB), 1);
      order: var(--index) !important;
      
    }
  }

  .ids__inline-gallery__dashes {
    display: flex;
    justify-content: center;
    gap: 0.4em;

    .ids__inline-gallery__dash {
      width: 0.5em;
      height: 0.1em;
      border-radius: 0.05em;
      background-color: rgba(var(--ids__text-RGB), 0.5);
      transition: width 100ms ease, background-color 100ms ease;
    }

    .ids__inline-gallery__dash-active {
      width: 1.5em;
      background-color: rgba(var(--ids__text-RGB), 1);
    }
  }
}


/* ============================================
   IDS Footnote Link
   ============================================ */

ids-footnote-link {
  display: inline;
  white-space: nowrap;

  label {
    cursor: pointer;
    white-space: nowrap;
  }
}

.ids-footnote-link__button {
  appearance: none;
  cursor: pointer;
  padding: 0.5em 0.15em;
  margin: 0 0 0.15em 0.15em;
  transform: translateY(-0.3em);

  /* Circle styling */
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  display: inline-grid;
  font-size: 0.65em;
  line-height: 1;
  place-content: center;

  /* Not selected state: outlined circle */
  background: transparent;
  border: 1px solid rgb(var(--ids__text-RGB));
  color: rgb(var(--ids__text-RGB));

  &.enlarge {
    font-size: 0.85em;
  }

  /* Selected state: filled circle */
  &.open {
    background: rgb(var(--ids__text-RGB));
    border: 1px solid transparent;
    color: rgb(var(--ids__background-RGB));
  }

  /* Hover state for non-selected */
  &:not(.open):hover {
    border-color: rgb(var(--ids__hover-RGB));
    color: rgb(var(--ids__hover-RGB));
  }
}

/* ============================================
   IDS Footnote
   ============================================ */

.ids-footnote-wrap {
  left: 100%;
  width: max-content;
  height: auto;
  position: relative;
  top: var(--top);

  > :not(aside) {
    display: none;
  }
}

aside.ids-footnote {
  position: absolute;
  width: 20em;
  padding: calc(var(--ids__density) * 0.75em);
  font-size: 0.8em;
  z-index: 150;
  box-shadow: 0 0.5em 1em rgba(var(--ids__text-RGB), 0.3);
  background: rgb(var(--ids__background-RGB));
  border-radius: 0.3em;

  /* First paragraph badge - black filled circle */
  p:first-child::before {
    content: attr(data-index);
    display: inline-grid;
    place-items: center;
    width: 1.3em;
    height: 1.3em;
    border-radius: 50%;
    background: rgb(var(--ids__text-RGB));
    color: rgb(var(--ids__background-RGB));
    font-size: 1em;
    line-height: 1;
    margin-right: 0.3em;
    vertical-align: middle;
  }

  &.enlarge-number p:first-child::before {
    font-size: 1.1em;
  }

  /* Scrollability */
  &.scrollable {
    box-shadow:
      0 0.5em 1em rgba(var(--ids__text-RGB), 0.5),
      0 -10em 0 rgba(var(--ids__text-RGB), 0.3);
    overflow: auto;
  }
}

/* Mobile layout */
@media (width < 768px) {
  .ids-footnote-wrap {
    left: 0;
    bottom: 0;
  }

  aside.ids-footnote {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 1em;
    max-height: calc(100dvh - 5em);
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0.5em 1em rgba(var(--ids__text-RGB), 0.3);
  }
}

/* Scrollability - lock body scroll */
html:has(.ids-footnote.scrollable) {
  overflow: hidden;
}

/* Close button */
:not(.scrollable) .ids-footnote__close {
  display: none;
}
.scrollable .ids-footnote__close {
  display: block;

  width: 100%;
  background-color: transparent;
  border: none;
  color: rgba(var(--ids__link-RGB), 1);
  cursor: pointer;
  font-size: 0.9em;
  padding: 0.5em 0;
  margin-top: 1em;

  &:hover,
  &:active {
    color: rgba(var(--ids__hover-RGB), 1);
  }

  svg {
    width: 0.8em;
    height: 0.8em;
    margin-right: 0.5em;
    vertical-align: middle;
  }

  line {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */

.pswp {
  --pswp-bg: #000;
  --pswp-placeholder-bg: #222;
  

  --pswp-root-z-index: 100000;
  
  --pswp-preloader-color: rgba(79, 79, 79, 0.4);
  --pswp-preloader-color-secondary: rgba(255, 255, 255, 0.9);
  
  /* defined via js:
  --pswp-transition-duration: 333ms; */
  
  --pswp-icon-color: #fff;
  --pswp-icon-color-secondary: #4f4f4f;
  --pswp-icon-stroke-color: #4f4f4f;
  --pswp-icon-stroke-width: 2px;

  --pswp-error-text-color: var(--pswp-icon-color);
}


/*
	Styles for basic PhotoSwipe (pswp) functionality (sliding area, open/close transitions)
*/

.pswp {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: var(--pswp-root-z-index);
	display: none;
	touch-action: none;
	outline: 0;
	opacity: 0.003;
	contain: layout style size;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Prevents focus outline on the root element,
  (it may be focused initially) */
.pswp:focus {
  outline: 0;
}

.pswp * {
  box-sizing: border-box;
}

.pswp img {
  max-width: none;
}

.pswp--open {
	display: block;
}

.pswp,
.pswp__bg {
	transform: translateZ(0);
	will-change: opacity;
}

.pswp__bg {
  opacity: 0.005;
	background: var(--pswp-bg);
}

.pswp,
.pswp__scroll-wrap {
	overflow: hidden;
}

.pswp__scroll-wrap,
.pswp__bg,
.pswp__container,
.pswp__item,
.pswp__content,
.pswp__img,
.pswp__zoom-wrap {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.pswp__img,
.pswp__zoom-wrap {
	width: auto;
	height: auto;
}

.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img {
	cursor: -webkit-zoom-in;
	cursor: -moz-zoom-in;
	cursor: zoom-in;
}

.pswp--click-to-zoom.pswp--zoomed-in .pswp__img {
	cursor: move;
	cursor: -webkit-grab;
	cursor: -moz-grab;
	cursor: grab;
}

.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active {
  cursor: -webkit-grabbing;
  cursor: -moz-grabbing;
  cursor: grabbing;
}

/* :active to override grabbing cursor */
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,
.pswp__img {
	cursor: -webkit-zoom-out;
	cursor: -moz-zoom-out;
	cursor: zoom-out;
}


/* Prevent selection and tap highlights */
.pswp__container,
.pswp__img,
.pswp__button,
.pswp__counter {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.pswp__item {
	/* z-index for fade transition */
	z-index: 1;
	overflow: hidden;
}

.pswp__hidden {
	display: none !important;
}

/* Allow to click through pswp__content element, but not its children */
.pswp__content {
  pointer-events: none;
}
.pswp__content > * {
  pointer-events: auto;
}


/*

  PhotoSwipe UI

*/

/*
	Error message appears when image is not loaded
	(JS option errorMsg controls markup)
*/
.pswp__error-msg-container {
  display: grid;
}
.pswp__error-msg {
	margin: auto;
	font-size: 1em;
	line-height: 1;
	color: var(--pswp-error-text-color);
}

/*
class pswp__hide-on-close is applied to elements that
should hide (for example fade out) when PhotoSwipe is closed
and show (for example fade in) when PhotoSwipe is opened
 */
.pswp .pswp__hide-on-close {
	opacity: 0.005;
	will-change: opacity;
	transition: opacity var(--pswp-transition-duration) cubic-bezier(0.4, 0, 0.22, 1);
	z-index: 10; /* always overlap slide content */
	pointer-events: none; /* hidden elements should not be clickable */
}

/* class pswp--ui-visible is added when opening or closing transition starts */
.pswp--ui-visible .pswp__hide-on-close {
	opacity: 1;
	pointer-events: auto;
}

/* <button> styles, including css reset */
.pswp__button {
	position: relative;
	display: block;
	width: 50px;
	height: 60px;
	padding: 0;
	margin: 0;
	overflow: hidden;
	cursor: pointer;
	background: none;
	border: 0;
	box-shadow: none;
	opacity: 0.85;
	-webkit-appearance: none;
	-webkit-touch-callout: none;
}

.pswp__button:hover,
.pswp__button:active,
.pswp__button:focus {
  transition: none;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  opacity: 1;
}

.pswp__button:disabled {
  opacity: 0.3;
  cursor: auto;
}

.pswp__icn {
  fill: var(--pswp-icon-color);
  color: var(--pswp-icon-color-secondary);
}

.pswp__icn {
  position: absolute;
  top: 14px;
  left: 9px;
  width: 32px;
  height: 32px;
  overflow: hidden;
  pointer-events: none;
}

.pswp__icn-shadow {
  stroke: var(--pswp-icon-stroke-color);
  stroke-width: var(--pswp-icon-stroke-width);
  fill: none;
}

.pswp__icn:focus {
	outline: 0;
}

/*
	div element that matches size of large image,
	large image loads on top of it,
	used when msrc is not provided
*/
div.pswp__img--placeholder,
.pswp__img--with-bg {
	background: var(--pswp-placeholder-bg);
}

.pswp__top-bar {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 60px;
	display: flex;
  flex-direction: row;
  justify-content: flex-end;
	z-index: 10;

	/* allow events to pass through top bar itself */
	pointer-events: none !important;
}
.pswp__top-bar > * {
  pointer-events: auto;
  /* this makes transition significantly more smooth,
     even though inner elements are not animated */
  will-change: opacity;
}


/*

  Close button

*/
.pswp__button--close {
  margin-right: 6px;
}


/*

  Arrow buttons

*/
.pswp__button--arrow {
  position: absolute;
  top: 0;
  width: 75px;
  height: 100px;
  top: 50%;
  margin-top: -50px;
}

.pswp__button--arrow:disabled {
  display: none;
  cursor: default;
}

.pswp__button--arrow .pswp__icn {
  top: 50%;
  margin-top: -30px;
  width: 60px;
  height: 60px;
  background: none;
  border-radius: 0;
}

.pswp--one-slide .pswp__button--arrow {
  display: none;
}

/* hide arrows on touch screens */
.pswp--touch .pswp__button--arrow {
  visibility: hidden;
}

/* show arrows only after mouse was used */
.pswp--has_mouse .pswp__button--arrow {
  visibility: visible;
}

.pswp__button--arrow--prev {
  right: auto;
  left: 0px;
}

.pswp__button--arrow--next {
  right: 0px;
}
.pswp__button--arrow--next .pswp__icn {
  left: auto;
  right: 14px;
  /* flip horizontally */
  transform: scale(-1, 1);
}

/*

  Zoom button

*/
.pswp__button--zoom {
  display: none;
}

.pswp--zoom-allowed .pswp__button--zoom {
  display: block;
}

/* "+" => "-" */
.pswp--zoomed-in .pswp__zoom-icn-bar-v {
  display: none;
}


/*

  Loading indicator

*/
.pswp__preloader {
  position: relative;
  overflow: hidden;
  width: 50px;
  height: 60px;
  margin-right: auto;
}

.pswp__preloader .pswp__icn {
  opacity: 0;
  transition: opacity 0.2s linear;
  animation: pswp-clockwise 600ms linear infinite;
}

.pswp__preloader--active .pswp__icn {
  opacity: 0.85;
}

@keyframes pswp-clockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/*

  "1 of 10" counter

*/
.pswp__counter {
  height: 30px;
  margin-top: 15px;
  margin-inline-start: 20px;
  font-size: 14px;
  line-height: 30px;
  color: var(--pswp-icon-color);
  text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
  opacity: 0.85;
}

.pswp--one-slide .pswp__counter {
  display: none;
}
