:root {
  --code-bg-color: #f3f3f9;
  --width: calc(100% - 200px);
  --max-width: 1024px;
}

/** from basic.css **/
a.headerlink {
    margin-left: .2em;
    visibility: hidden;
}

h1, h2, h3, h4, h5, h6, dt, caption, p.caption, div.code-block-caption {
    &:hover > a.headerlink {
      visibility: visible;
    }
}

ol.simple, ul.simple {
  & p {
    margin: 0;
  }
}

dl.field-list {
    display: grid;
    grid-template-columns: fit-content(30%) auto;

    & > dt {
      font-weight: bold;
      word-break: break-word;
      padding: 5px;
      border: solid #CCC;
      border-width: 1px 1px 0 1px;
    }
    & > dd {
        margin: 0;
        padding: 5px;
        border: solid #CCC;
        border-width: 1px 1px 0 0;

        & > p {
            margin: 0;
        }
    }
    & > dt:nth-last-child(2), & > dd:last-child {
        border-bottom: 1px solid #CCC;
    }
}

p.rubric {
  margin-top: 30px;
  font-weight: bold;
}

.admonition {
  margin: 1em 0;
  padding: 0.5em;
  & p.admonition-title {
    font-weight: bold;
    margin-bottom: 0.5em;
  }
  & p {
    margin: 0;
  }
}

aside.footnote {
  display: flex;
  & > span.label {
    display: block;
    margin: 0 0 0.5em 0;
  }
  & > p {
    margin: 0 0 0.5em 1em;
  }
}
/** [end] basic.css */

body {
    margin: 0 auto;
    width: var(--width);
    max-width: var(--max-width);
    font-size: 17px;
    font-family: "Hiragino Mincho Pro", "ヒラギノ明朝 Pro W3", Meiryo, "メイリオ", serif;
    color: #222;
    overflow-wrap: break-word; /* anywhere is not support several browsers at 2020-02-07 */
    box-sizing: border-box;
}

a {
    color: #005B98;
    text-decoration: none;
    border-bottom: 1px dotted #005B98;
}

a:hover {
    color: #4B0D43;
    text-decoration: none;
    border-bottom: 1px solid #4B0D43;
}

h1, h2, h3, h4, h5, h6 {
    margin: 1.5em 0 0 0;
    padding: 2px 0;
    font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", Meiryo, "メイリオ", sans-serif;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  border-bottom: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
  border-bottom: none;
}

h1 { font-size: 1.7em; margin: 0.5em 0 0 0; }
h2 { font-size: 1.5em; border-bottom: 1px solid #5c8199; }
h3 { font-size: 1.2em; }

/* local toc */
nav.contents, aside.topic, div.topic {
  border: 1px solid #ccc;
  padding: 7px;
  margin: 10px 0 10px 0;
}

pre {
    margin: 0;
    font-family: Menlo, Consolas, sans-serif;
    padding: 7px 30px;
    overflow: scroll;
    overflow-wrap: normal;
}

blockquote {
  border-left: 3px solid #AAA;
  padding-left: 10px;
}

/* 本文で ``foo`` と書いた時にcodeが使われる */
code {
    padding: 0 6px;
    border-radius: 3px;
    background-color: var(--code-bg-color);
    color: #222;
}

.highlight {
  padding: 1em 0;
  border-radius: 0.5em;
  background-color: var(--code-bg-color);
}

header {
    text-align: center;
    font-family: Georgia, serif;
    border-bottom: 2px solid #005B98;
}
header .site-name {
    font-size: 2em;
    font-weight: bold;
}
header nav ul {
    margin: 10px 0;
    padding: 0;
}
header nav ul li {
    display: inline-block;
    font-size: 1.2em;
    margin-right: 0.8em;
}
header nav ul li a {
    border-bottom: none;
}
header nav ul li a:hover {
    border-bottom: 1px solid #4B0D43;
}

footer {
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: right;
    font-size: 0.9em;
    color: #666;
    border-top: 2px solid #005B98;
}

footer a {
    border-bottom: none;
}
footer a:hover {
    border-bottom: 1px solid #4B0D43;
}

a.brackets, a.fn-backref, a.headerlink {
    border: none;
}
a.brackets:hover, a.fn-backref:hover, a.headerlink:hover {
    border-bottom: 1px solid #4B0D43;
}

div.note, div.tip {
    background-color: #F6F6F6;
    border-left: 7px solid #3A4;
}
div.attention {
    background-color: #F6F6F6;
    border-left: 7px solid #D56;
}
div.warning {
    background-color: #F6F6F6;
    border-left: 7px solid #F6E60C;
}
/* table */
table.docutils {
  border: 1px solid #AAA;
  border-collapse: collapse;
  margin: 1em auto;

  & th {
    background-color: #EFEFEF;
  }

  & th, & td {
    border-bottom: 1px solid #AAA;
    border-left: 1px solid #AAA;
    padding: 5px;

    & p {
      margin: 0;
    }
  }
}

/* align in table */
table.align-default {
    text-align: left;
}


/* mobile */
@media screen and (max-width: 800px) {
  :root {
    --width: 90%;
  }
}

/* ablog */
ul.ablog-archive {list-style: none; overflow: auto; margin-left: 0px}
ul.ablog-archive li {float: left; margin-right: 5px; font-size: 80%}
ul.postlist a {font-style: italic;}
ul.postlist-style-disc {list-style-type: disc;}
ul.postlist-style-none {list-style-type: none;}
ul.postlist-style-circle {list-style-type: circle;}

/* page.html */
.page-docinfo-pre {
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 10px;
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", Meiryo, "メイリオ", sans-serif;
}
.page-docinfo-post {
  margin: 20px 0;
}
.page-docinfo-post a {
  border-bottom: none;
}
.page-share {
  margin: 10px 0 20px 0;
  padding: 10px;
  background-color: #EEE;
  font-size: 0.8em;
  color: #111;
}


/* postnavy.html */
.postnavy {
  display: flex;
  align-items: center;
}
.postnavy div {
  flex: 1;
  font-size: 0.9em;
}
.postnavy .nav-icon {
  flex: 0 20px;
  margin: 0 5px;
}
.recommends {
  font-size: 0.9em;
}

/* mermaid */
pre.mermaid {
  text-align: center;
}
