:root {
  --bg-color: rgb(22, 22, 22);
  --panel-color-alpha: rgba(35, 35, 35, 0);
  --panel-color: rgba(35, 35, 35, 1);
  --title-color: rgb(196, 196, 196);
  --text-color: rgb(128, 128, 128);
  --hili-color: rgb(45, 140, 235);
  --panel-radius: 2px;
  --line-height: 2em;
}

* {
  line-height: var(--line-height);
  letter-spacing: 0.05em;
  font-family: -apple-system, Verdana, Geneva, Tahoma, Helvetica,
    BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--text-color);
}

html {
  font-size: 14px;
  background-color: var(--bg-color);
}

body {
  width: 80%;
  margin: 0 auto;
  max-width: 1440px;
  min-height: 100vh;
  /* background-color: #fff; */
  padding: 2rem;
}

header {
  padding: 10rem 0;
  background-color: var(--panel-color);
}

header h1 {
  font-size: 3rem;
  font-weight: 200;
  letter-spacing: 0.1em;
  color: var(--title-color);
  padding: 1rem;
}

header h1 a {
  position: relative;
  display: inline-block;
}

header h1 a::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--title-color);
  position: absolute;
  bottom: 0;
  right: 0;
  transform: scale(1, 1);
  transform-origin: right;
}

header h1 a::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--hili-color);
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scale(0, 1);
  transform-origin: left;
}

header h1 a:hover::before {
  transform: scale(0, 1);
}

header h1 a:hover::after {
  transform: scale(1, 1);
}

header h1 a:hover::before,
header h1 a:hover::after,
header h1 a::before,
header h1 a::after {
  transition: transform 0.5s ease;
}


header ul#lang {
  padding: 1rem;
}

header ul#lang>li {
  display: inline-block;
  cursor: pointer;
  padding: 0 1em 0 0;
}
header ul#lang>li:hover{
  color:var(--title-color);
}

header ul#lang>li::before {
  content: attr(data-lang);
}

header ul#lang .active {
  color: var(--hili-color);
}

.item {
  display: flex;
  margin: 2rem 0;
}

.item>* {
  height: 100%;
}

.item>*:first-child {
  margin-right: 2rem;
  max-width: 30vw;
}

.panel {
  background-color: var(--panel-color);
  border: solid 1px var(--panel-color);
  padding: 0 1rem 1rem;
  margin-bottom: 1rem;

}

.panel:hover {
  border: solid 1px var(--hili-color);
}

.lighten{
  mix-blend-mode: lighten;
}

#items dl.scriptDescribe{
  cursor: pointer;
}
dl.scriptDescribe>dt>h1 {
  font-size: 2rem;
  line-height: var(--line-height);
}

dl.scriptDescribe>dt>h1,
dl.scriptVersion>dt>h1 {
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--title-color);
  display: inline-block;
  position: relative;
  margin-bottom: 1rem;
}

dl.scriptDescribe>dt>h1::after,
dl.scriptVersion>dt>h1::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--title-color);
}


dl.scriptDescribe>dt>div,
dl.scriptVersion>dt>div {
  margin: 1em 0;
}

dl.scriptDescribe>dt>div>p,
dl.scriptVersion>dt>div>p {
  font-weight: 400;
  letter-spacing: 0.1em;
  opacity: 0.8;
  position: relative;
  padding-right: var(--line-height);
  text-align: justify;
  flex-grow: 2;
}

dl.scriptDescribe>dt>div>p span,
dl.scriptVersion>dt>div>p span {
  line-height: var(--line-height);
  height: calc(2 * var(--line-height));
  overflow: hidden;
  display: block;
  position: relative;
}

dl.scriptDescribe>dt>div>p span::after,
dl.scriptVersion>dt>div>p span::after {
  content: ' ';
  position: absolute;
  right: 1px;
  bottom: 0;
  background:  linear-gradient(to right, var(--panel-color-alpha), var(--panel-color));
  display: block;
  width: 4em;
  height: var(--line-height);
}

dl.scriptDescribe>dt>div>p a,
dl.scriptVersion>dt>div>p a {
  text-decoration: underline;

  float: right;
  height: var(--line-height);
  text-align: right;
  position: relative;
  /* background: linear-gradient(to right,var(--panel-color-alpha), var(--panel-color) 30%, var(--panel-color)); */
  background-color: var(--panel-color);
  right: 0;
  line-height: var(--line-height);
  margin-top: calc(0px - var(--line-height));
  /* padding-left: 5em; */
}

dl.scriptDescribe>dt>div>p a::before,
dl.scriptVersion>dt>div>p a::before {
  background: linear-gradient(to right, var(--panel-color-alpha), var(--panel-color));
  content: '';
  width: 4em;
  height: 100%;
  position: absolute;
  left: 0;
  transform: translate(-100%, 0);
  pointer-events: none;
}





dl.scriptDescribe>dd>img {
  max-width: 25vw;
  object-fit: contain;
  width: 100%;
}

.scriptVersions{
  flex-grow:2;
  width: 100%;
}
dl.scriptVersion>dt>h1 {
  font-size: 1.5rem;
  line-height: calc(var(--line-height) /3 * 4);

}

dl.scriptVersion{
  position: relative;
}
dl.scriptVersion[data-date]::after {
  content: attr(data-date);
  position: absolute;
  right: 1em;
  bottom: 1em;
  line-height: 1em;
  opacity: 0.8;
}

dl.scriptDescribe>dt>div,
dl.scriptVersion>dt>div {
  display: flex;
  justify-content: space-between;
}

dl.scriptDescribe>dt>div>a.download,
dl.scriptVersion>dt>div>a.download {
  padding: 0.5em 0.75em;
  border: solid 1px var(--text-color);
  height: 100%;
  margin-top: calc((var(--line-height) - 1em) / 2);
  position: relative;
  z-index: 999;
}

a.download[alt]{
  box-shadow: 0 0 4px var(--bg-color);
  transition: box-shadow 0.2s ease;
}
a.download[alt]:hover{
  box-shadow: 0 4px 8px var(--bg-color);
}

a.download[alt]::before {
  content: attr(alt);
  position: absolute;
  font-size: 0.8em;
  padding: 0.5em;
  left: 0;
  bottom: -4px;
  /* width: 200%; */
  transform: translate(0, 0);
  opacity: 0;
  transition:all 0.2s ease;
  background: var(--panel-color);
  box-shadow: inherit;
}
a.download[alt]:hover::before {
  box-shadow: inherit;
  transform: translate(0, 100%);
  opacity: 1;
}


dl.scriptVersion dd>img{
  max-height: 150px;
  max-width: 100%;
}

a.readmore{
  cursor: pointer;
}

/* detail page */
.detailPage dl.scriptDescribe>dt>div>p span{
height: auto!important;
text-align: left;
}
.detailPage dl.scriptDescribe>dt>div>p span::after{
  display: none;
}
#content{
  display: block;
  width: 100%;
}

#content.markdown-body h2{
margin-bottom: 0;
padding: 0 2em;
background-color: var(--panel-color);
box-sizing:border-box;
}

#content.markdown-body h2::after{
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--hili-color);
  left: 50%;
  transform: translate(-50%,0);
}
#content.markdown-body h1,#content.markdown-body h1>*{
  color:var(--title-color);
letter-spacing: 0.1em;
}

#content .downloadBlock{
  padding: 1em;
}
#content .downloadBlock ul{
  text-align: center;
  margin: 0 !important;
}
#content .downloadBlock ul li{
display: inline-block;

margin: 0 1em;
}
#content .downloadBlock ul li a{
  padding: 1em;
  line-height: 4em;
}
@media screen and (max-width: 800px) {
  .item {
    display: block;
  }

  .item>*:first-child {
    margin-right: 0;
    max-width: none;
    /* width: 100%; */
  }

  dl.scriptDescribe>dd>img {
    max-width: 60vw;
  }

  #content{
    width: auto;
  }
}