/* TOP specific-use shortcut */
.top-example-launcher {
  position: fixed;
  z-index: 45;
  border: 1px solid rgba(24, 79, 114, .2);
  background: linear-gradient(145deg, #f5cf72 0%, #f8dd9c 100%);
  color: #173b5f;
  font: inherit;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(18, 47, 72, .16);
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.top-example-launcher--desktop {
  top: 45%;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 136px;
  padding: 0;
  border-left: 0;
  border-radius: 0 14px 14px 0;
}

.top-example-launcher--desktop span {
  display: block;
  white-space: nowrap;
  transform: rotate(-90deg);
}

.top-example-launcher--mobile {
  display: none;
}

.top-example-launcher:hover {
  background: linear-gradient(145deg, #f7d681 0%, #fbe6b3 100%);
  box-shadow: 0 10px 24px rgba(18, 47, 72, .2);
}

.top-example-launcher--desktop:hover {
  transform: translateX(2px);
}

.top-example-launcher:focus-visible,
.top-example-drawer button:focus-visible,
.top-example-drawer a:focus-visible {
  outline: 3px solid rgba(35, 166, 181, .56);
  outline-offset: 3px;
}

html.is-opening .top-example-launcher {
  opacity: 0;
  pointer-events: none;
}

html.top-example-drawer-open,
body.top-example-drawer-open {
  overflow: hidden;
}

.top-example-drawer {
  position: fixed;
  z-index: 90;
  inset: 0;
  pointer-events: none;
}

.top-example-drawer.is-open {
  pointer-events: auto;
}

.top-example-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 31, 43, .3);
  opacity: 0;
  transition: opacity 240ms ease;
}

.top-example-drawer.is-open .top-example-drawer__overlay {
  opacity: 1;
}

.top-example-drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 410px;
  max-width: calc(100vw - 32px);
  background: #fbfcfd;
  color: #17283a;
  box-shadow: 16px 0 34px rgba(13, 35, 54, .2);
  transform: translateX(-102%);
  transition: transform 360ms cubic-bezier(.22, .61, .36, 1);
}

.top-example-drawer.is-open .top-example-drawer__panel {
  transform: translateX(0);
}

.top-example-drawer__handle {
  display: none;
}

.top-example-drawer__header {
  display: flex;
  flex: 0 0 auto;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px 24px 20px;
  border-bottom: 1px solid rgba(23, 59, 95, .12);
  background: #fff;
}

.top-example-drawer__header h2 {
  margin: 0;
  color: #173b5f;
  font-size: 1.45rem;
  line-height: 1.3;
}

.top-example-drawer__header p {
  margin: 7px 0 0;
  color: #627282;
  font-size: .88rem;
  line-height: 1.65;
}

.top-example-drawer__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(23, 59, 95, .18);
  border-radius: 50%;
  background: #fff;
  color: #173b5f;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.top-example-drawer__close:hover {
  background: #eef6f8;
  transform: rotate(4deg);
}

.top-example-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.top-example-category {
  border-bottom: 1px solid rgba(23, 59, 95, .12);
}

.top-example-category__trigger {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 4px;
  border: 0;
  background: transparent;
  color: #173b5f;
  font: inherit;
  font-size: .96rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.top-example-category__trigger > span:first-child {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.top-example-category__trigger b {
  color: #22a6b5;
  font-size: .7rem;
  letter-spacing: .12em;
}

.top-example-category__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(23, 59, 95, .18);
  border-radius: 50%;
  color: #2457a6;
  font-size: 1.05rem;
}

.top-example-category__trigger:hover {
  color: #2457a6;
}

.top-example-category__content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 220ms ease, opacity 180ms ease;
}

.top-example-category__content.is-open {
  max-height: 1800px;
  padding-bottom: 18px;
  opacity: 1;
}

.top-example-category--empty {
  opacity: .48;
}

.top-example-category--empty .top-example-category__trigger {
  cursor: default;
}

.top-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.top-example-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 59, 95, .14);
  border-radius: 12px;
  background: #fff;
  color: #173b5f;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(18, 47, 72, .08);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.top-example-card__image {
  display: block;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #e9eef2;
}

.top-example-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.top-example-card__title {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 11px;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.45;
}

.top-example-card__title b {
  flex: 0 0 auto;
  color: #22a6b5;
}

.top-example-card:hover {
  box-shadow: 0 8px 18px rgba(18, 47, 72, .14);
  transform: translateY(-2px);
}

.top-example-card:hover .top-example-card__image img {
  transform: scale(1.035);
}

.top-example-drawer__all {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  color: #2457a6;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.top-example-drawer__all:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 720px) {
  .top-example-launcher--desktop {
    display: none;
  }

  .top-example-launcher--mobile {
    right: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: .88rem;
    transform: translateX(-50%);
  }

  .top-example-launcher--mobile:hover {
    transform: translateX(-50%) translateY(-1px);
  }

  .top-example-drawer__panel {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: 80vh;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -16px 34px rgba(13, 35, 54, .2);
    transform: translateY(102%);
  }

  .top-example-drawer.is-open .top-example-drawer__panel {
    transform: translateY(0);
  }

  .top-example-drawer__handle {
    flex: 0 0 auto;
    display: block;
    width: 46px;
    height: 5px;
    margin: 9px auto 0;
    border-radius: 999px;
    background: rgba(23, 59, 95, .2);
  }

  .top-example-drawer__header {
    padding: 14px 18px 15px;
  }

  .top-example-drawer__header h2 {
    font-size: 1.25rem;
  }

  .top-example-drawer__header p {
    margin-top: 4px;
    font-size: .8rem;
  }

  .top-example-drawer__close {
    width: 40px;
    height: 40px;
  }

  .top-example-drawer__body {
    padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  }

  .top-example-category__trigger {
    padding: 15px 2px;
    font-size: .9rem;
  }

  .top-example-grid {
    gap: 10px;
  }

  .top-example-card__title {
    min-height: 50px;
    padding: 9px;
    font-size: .78rem;
  }
}

@media (max-width: 350px) {
  .top-example-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-example-launcher,
  .top-example-drawer__overlay,
  .top-example-drawer__panel,
  .top-example-category__content,
  .top-example-card,
  .top-example-card__image img {
    transition-duration: .01ms;
  }
}
