@font-face {
    font-family: "Inter";
    src: url("../fonts/InterVariable.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/InterVariable-Italic.ttf") format("truetype");
    font-weight: 100 900;
    font-style: italic;
}
@font-face {
    font-family: "Mononoki";
    src: url("../fonts/MononokiNerdFont-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "Mononoki";
    src: url("../fonts/MononokiNerdFont-Bold.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: "Mononoki";
    src: url("../fonts/MononokiNerdFont-Italic.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: "Mononoki";
    src: url("../fonts/MononokiNerdFont-BoldItalic.ttf") format("truetype");
    font-weight: bold;
    font-style: italic;
}

/* old layout rules
#content { max-width: 1000px; }
p { max-width: 800px; }
li { max-width: 800px; }
*/

#content {
    max-width: none;
    width: auto;
    margin-left: 320px;
    margin-right: 1rem;
    padding: 1rem;
    box-sizing: border-box;
}

#search-description {
    display: none;
}

p,
li {
    max-width: none;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    #content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        padding: 0.5rem;
    }
    p,
    li {
        max-width: 100%;
    }
}

html,
body,
#content,
.content {
    background: #282a36 !important;
    color: #f8f8f2 !important;
    color-scheme: dark light !important;
    font-family: "Inter", sans-serif !important;
}

a {
    color: #8be9fd !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #bd93f9 !important;
}

/* inline code: compact pill */
code {
    background: #1e1f29 !important;
    color: #ffb86c !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 0.2rem 0.4rem !important;
    font-family: "Mononoki", monospace !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
}

/* block code: scrollable */
pre,
pre.src,
.org-src-container,
.src {
    background: #1e1f29 !important;
    color: #ffb86c !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 0.4rem 0.6rem !important;
    margin: 0.75rem 0 !important;
    font-family: "Mononoki", monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
    max-width: min(140ch, 100%) !important;
    overflow-x: auto !important;
    white-space: pre !important;
    display: block !important;
}

pre code,
pre.src code,
.org-src-container code {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    font-size: 0.9rem !important;
    white-space: pre !important;
}

table,
table th,
table td,
.org-table {
    background: transparent !important;
    color: #f8f8f2 !important;
    border-collapse: collapse !important;
}

table {
    display: block !important;
    overflow-x: auto !important;
    width: 100% !important;
    max-width: min(140ch, 100%) !important;
    border: none !important;
}

table th,
table td {
    padding: 0.4rem 0.6rem !important;
    border: 1px solid #44475a !important;
}

table thead th {
    background: #44475a !important;
    color: #f8f8f2 !important;
}

table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02) !important;
}

.org-ul,
.org-ol,
p,
li {
    color: #f8f8f2 !important;
}

img,
svg {
    filter: none !important;
}
html,
body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* break long unbreakable tokens */
p,
li,
td,
th,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}

/* inline code can wrap on mobile */
@media (max-width: 768px) {
    code {
        white-space: normal !important;
        word-break: break-all !important;
    }
}
td code,
th code {
    white-space: nowrap !important;
    word-break: keep-all !important;
}
.org-src-container,
.src {
    padding: 0 !important;
    margin: 0.5rem 0 !important;
}

pre.src {
    padding: 0.4rem 0.6rem !important;
    margin: 0 !important;
}

/* readtheorg copy button container */
.org-src-container > pre {
    margin: 0 !important;
}
