/* NOTE: Font imports taken from following the link in the `@import` block from
 * <https://fonts.google.com/selection/embed> */

@font-face {
  font-family: "inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/inter/v20/UcCo3FwrK3iLTcviYwY.woff2) format(woff2);
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "sharetech-mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/sharetechmono/v16/J7aHnp1uDWRBEqV98dVQztYldFcLowEF.woff2) format(woff2);
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJtEtq.woff2) format(woff2);
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "ibm-plex-mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1i8q1w.woff2) format(woff2);
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "ibm-plex-mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgg.woff2) format(woff2);
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "ibm-plex-mono";
  font-style: bold;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3pQPwlBFgg.woff2) format(woff2);
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Disable scrollbar */
@-moz-document url-prefix() {
    html{
        scrollbar-width: none;
    }
}

/* Disable scrollbar */
body::-webkit-scrollbar pre::-webkit-scrollbar {
    display: none;
}

/* Disable scrollbar */
html body pre {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow: auto;
}

:root {
    --fg: #FBFBFE;
    --bg: #17161A;
    --light-bg: #232129;
    --dark-fg: #dddded;

    --md-opacity: 20%;

    --primary: #EBB894;
    --secondary: #E2B2EB;
    --tertiary: #B2C0EB;
}

blockquote {
    font-family: "outfit";
    text-align: left;
    background-color: #17161A;
    color: var(--tertiary);
    border-left: 2px solid var(--tertiary);
    margin: 0.5em 10px;
    padding: 0em 15px;
}

body {
    background-color: var(--bg);
    color: var(--dark-fg);

    font-size: 16px;
    line-height: 1.2;

    margin: 0;
    margin-left: 1.5em;
    margin-right: 1.5em;

    min-height: 100vh;
    display: flex;
    flex-direction: column;

    font-family: "outfit";
}

@media only screen and (max-width: 800px) {
    main {
        flex: 1;
        width: 90vh;
        margin: 0 auto;
        text-align: left;
    }
}

@media only screen and (min-width: 800px) {
    main {
        flex: 1;
        width: 800px;
        margin: 0 auto;
        text-align: left;
    }
}

a {
    color: var(--tertiary);
    white-space: nowrap;
    cursor: pointer;
}

a:visited {
    color: var(--secondary);
}

a:active {
    color: #dddded;
}

p a {
    text-decoration-line: underline;
    text-decoration-color: #dddded;
    text-decoration-offset: 10%;
    text-decoration-thickness: 10%;
}

:is(h1, h2, h3, h4, h5, h6) a {
    text-decoration-line: underline;
    text-decoration-color: #dddded;
    text-decoration-offset: 10%;
    text-decoration-thickness: 10%;
}

h1, h2 {
    font-family: "outfit", sans-serif;
    font-style: bold;
}

a:hover {
    &, & code {
        color: #dddded;
    }
}

/* a:not(.anchor):not([data-footnote-ref]) { */
/*     &::before { content: '['; opacity: var(--md-opacity); } */
/*     &::after  { content: ']'; opacity: var(--md-opacity); } */
/* } */

a[data-footnote-ref] {
    &::before { content: '[^'; opacity: var(--md-opacity); }
    &::after  { content: ']';  opacity: var(--md-opacity); }
}

code {
    font-family: "ibm-plex-mono", monospace;
    font-weight: 500;
    font-size: 80%;

    background-color: var(--light-bg);
    word-wrap: break-word;
    box-decoration-break: clone;
    padding: .05rem .3rem .05rem;
    border-radius: .1rem;
}

pre code {
    font-family: "ibm-plex-mono", monospace;
    font-size: 80%;
    font-weight: 500;
    display: inline-block;
    overflow: clip;
    text-overflow: ellipsis;

    background-color: color-mix(in srgb, var(--bg) 70%, var(--light-bg) 30%);
    border-left: 2px solid var(--secondary);
    border-right: 2px solid var(--secondary);
    border-radius: 0px;

    padding: .5em .5em;
    margin: 0 0em 0em 0em;
    width: calc(100% - 1.5em);
}

.markdown-alert-title {
    &::before { content: '[i] '; color: var(--fg); }
    color: var(--primary);
}

.markdown-alert-note {
    font-weight: bold;
    line-height: 1em;
    display: inline-block;
    padding: .5em .5em;
    margin: 0 0em 0em 0em;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: bold;
    line-height: 1em;
}

b, strong {
    color: var(--fg);
    font-weight: bold;
    line-height: 1em;
}

em {
    color: var(--fg);
    font-style: italic;
}

h1 {
    font-size: 196%;
    text-align: center;
}

h2 {
    font-size: 144%;
}

h3 {
    font-size: 120%;
}

h4 {
    font-size: 110%;
}

.package h4, h5, h6 {
    font-size: 100%;
    font-style: italic;
}

ul {
    list-style-type: none;
    padding-left: 1rem;
}

ul li::before {
    content: '* ';
    font-family: monospace;
    opacity: var(--md-opacity);
}

section.footnotes li:target {
    animation-name: highlight;
    animation-duration: 2s;
}

/* @keyframes highlight { */
/*     10%, 90% { */
/*         background-color: oklch(from var(--bg) calc(l - 0.1) c h; */
/*     } */
/**/
/*     100% { */
/*         background-color: inherit; */
/*     } */
/* } */

.nav-prev {
    position: absolute;
    top: 0;
    left: 0;
    padding: 16px;

    a { text-decoration: none }
}

.nav-next {
    position: absolute;
    top: 0;
    right: 0;
    padding: 16px;

    a { text-decoration: none }
}

h2 .anchor, h3 .anchor {
    &::before {
        content: ' ;; ';
        color: var(--fg);
        opacity: var(--md-opacity);
    }
}

a.anchor {
    text-decoration: none;
}

.quote-attribution {
    &::before {
        content: '-- ';
        color: var(--fg);
        opacity: var(--md-opacity);
    }

    text-align: right;
    font-style: italic;
}

hr {
    border: none;
    height: 2px;
    background-color: var(--light-bg);
    width: 90%;
    margin: 20px auto;
}

img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1em;
    padding-bottom: 1em;
}

table {
    table-layout: fixed;
    width: 80%;
    margin: 8px auto;
    border-collapse: collapse;
    border-top: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
}

.rating-table table {
    table-layout: fixed;
    width: 80%;
    margin: 8px auto;
    border-collapse: collapse;
    border-top: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
}

.rating-table th:nth-child(1) { width: 18%; } /* rank  */
.rating-table th:nth-child(2) { width: 18%; } /* score */
.rating-table th:nth-child(3) { width: 64%; } /* song  */

tfoot {
    border-top: 1px solid var(--primary);
}

th, td {
    padding: 0.1em;
    font-style: normal;
}

footer p {
    font-family: "outfit";
}

footer {
    text-align: center;
    color: #EBB894;
    padding: 0;
}

.logo {
    font-family: "outfit", sans-serif;
    font-style: bold;
    margin: 0;
    line-height: 0.8;
}

::selection, ::-moz-selection {
    background: var(--primary);
    color: var(--bg);
}
