/* Self-hosted fonts for the Chhankitek docs. Linked as an external stylesheet
   so the pages stay free of inline <style> blocks. */

/* ---- Baloo 2 (Latin display + body) ---- */
@font-face {
    font-family: 'Baloo 2';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('fonts/Baloo_2/Baloo2-latin.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Baloo 2';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('fonts/Baloo_2/Baloo2-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Kantumruy Pro (Khmer + Latin) ---- */
@font-face {
    font-family: 'Kantumruy Pro';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url('fonts/Kantumruy_Pro/KantumruyPro-khmer.woff2') format('woff2');
    unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
}
@font-face {
    font-family: 'Kantumruy Pro';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url('fonts/Kantumruy_Pro/KantumruyPro-latin.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Kantumruy Pro';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url('fonts/Kantumruy_Pro/KantumruyPro-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Kantumruy Pro';
    font-style: italic;
    font-weight: 100 700;
    font-display: swap;
    src: url('fonts/Kantumruy_Pro/KantumruyPro-Italic-khmer.woff2') format('woff2');
    unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
}
@font-face {
    font-family: 'Kantumruy Pro';
    font-style: italic;
    font-weight: 100 700;
    font-display: swap;
    src: url('fonts/Kantumruy_Pro/KantumruyPro-Italic-latin.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Kantumruy Pro';
    font-style: italic;
    font-weight: 100 700;
    font-display: swap;
    src: url('fonts/Kantumruy_Pro/KantumruyPro-Italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Dank Mono (code) ---- */
@font-face {
    font-family: 'Dank Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Dank Mono Regular.otf') format('opentype');
}
@font-face {
    font-family: 'Dank Mono';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Dank Mono Italic.otf') format('opentype');
}

body {
    font-family: 'Baloo 2', 'Kantumruy Pro', sans-serif;
}

.grid-spotlight {
    background-color: white;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(75, 85, 99, 0.08) 19px, rgba(75, 85, 99, 0.08) 20px, transparent 20px, transparent 39px, rgba(75, 85, 99, 0.08) 39px, rgba(75, 85, 99, 0.08) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(75, 85, 99, 0.08) 19px, rgba(75, 85, 99, 0.08) 20px, transparent 20px, transparent 39px, rgba(75, 85, 99, 0.08) 39px, rgba(75, 85, 99, 0.08) 40px),
        radial-gradient(circle at 20px 20px, rgba(55, 65, 81, 0.12) 2px, transparent 2px),
        radial-gradient(circle at 40px 40px, rgba(55, 65, 81, 0.12) 2px, transparent 2px);
    background-size: 40px 40px, 40px 40px, 40px 40px, 40px 40px;
}

/* Grid/flex children default to min-width: auto, so a wide code block would
   stretch its column past the viewport instead of scrolling. Allowing them to
   shrink keeps the layout within the screen and lets the <pre> scroll. */
.grid > *,
.flex > * {
    min-width: 0;
}

/* Code blocks: keep long lines on one line and scroll horizontally
   within the <pre> itself rather than wrapping or overflowing the page. */
pre {
    overflow-x: auto;
    white-space: pre;
}
