/* Reset */
* {
    box-sizing: border-box;

    margin: 0;
    padding: 0;

    user-select: none;
    -webkit-tap-highlight-color: transparent;

    scroll-margin-top: 20vh;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
*::-webkit-scrollbar { display: none; }

html {
    width: 100%;
    height: 100%;

    font-family: sans-serif;
    font-size: 16px;

    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;

    color: #2F2F2F;
    background-color: #FFF;
}

main {
    flex: 1;

    padding: 32px 16px;
}

a { color: #2F2F2F; }

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

ul, ol {
    margin-bottom: 18px;
    padding: 0 24px;

    font-size: 12px;
}
/* /Reset */





/* Menu */
.cr-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    z-index: 99999;
    overflow: hidden;

    width: 40px;
    aspect-ratio: 1 / 1;
    position: fixed;
    inset: 10px 10px auto auto;

    background-color: rgba(0, 0, 0, 0.2);

    transition: transform 200ms linear;
    cursor: pointer;

    clip-path: polygon(
      20% 0%,
      80% 0%,
      100% 20%,
      100% 80%,
      80% 100%,
      20% 100%,
      0% 80%,
      0% 20%
    );
}

.cr-menu.active { transform: rotate(-180deg); }

.cr-menu .cr-line {
    display: block;

    width: 30px;
    height: 3px;
    
    border-radius: 999999px;

    background-color: #FFF;
}

html.no-scroll-html { overflow: hidden; }
/* /Menu */



/* Nav */
.cr-nav {
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    z-index: 99998;
    overflow: auto;

    position: fixed;
    inset: 0;
    transform: translateY(-100%);

    padding: 10px;
    
    background-color: #F3F4F8;

    transition: all 200ms ease-out;
}

.cr-nav.active {
    visibility: visible;
    opacity: 1;

    transform: translateY(0);
}

  /* Header Section */
.cr-nav .cr-header {
    display: flex;
    align-items: center;
    gap: 10px;

    width: calc(100% - 50px);
    min-height: 40px;
    max-height: 40px;
}

.cr-nav .cr-header .cr-home-btn,
.cr-nav .cr-header .cr-dark-mode {
    display: block;

    height: 100%;
    aspect-ratio: 1 / 1;

    border: none;
    background-color: transparent;

    transition: transform 200ms ease-in-out;
}

.cr-nav .cr-header .cr-home-btn:active,
.cr-nav .cr-header .cr-dark-mode:active { transform: Scale(0.8); }

.cr-nav .cr-header .cr-home-btn .cr-shape {
    width: 100%;
    height: 100%;

    background-color: #111;

    clip-path: path("M5 35 L5 19 L20 5 L35 19 L35 35 L25 35 L25 27.5 A5 5 0 0 0 15 27.5 L15 35 Z");
}

.cr-nav .cr-header .cr-dark-mode {
    border: 2px solid #111;
    border-radius: 999999px;

    background: linear-gradient(
      to right,
      #FFF 50%,
      #111 50%
    );
}

.cr-nav .cr-header h1 {
    flex: 1;
    overflow: hidden;

    font-size: 24px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

  /* Container */
.cr-nav .cr-container {
    display: flex;
    align-items: center;
    flex-direction: column;

    margin: 10px 0 24px;
    padding: 12px;
    border: 1px solid #EBEBEB;
    border-radius: 8px;

    background-color: #FFF;
}

  /* Title */
.cr-nav .cr-container h3 {
    display: inline-block;

    margin: 10px 0 5px;
    padding: 0 10px;
    border-bottom: 0.5px solid #C0C0C0;

    font-size: 20px;
    font-weight: bold;
    line-height: 0.9;
    text-align: center;

    color: #252525;
}

  /* Code */
.cr-nav .cr-container code {
    display: block;
    overflow: auto;

    width: 100%;

    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.6px;
    white-space: pre;

    color: #252525;

    cursor: text;
    user-select: text;
}

.cr-nav .cr-container code::selection {
    text-shadow: 0 0 4px hsl(200, 100%, 60%);

    color: hsl(200, 100%, 90%);
    background-color: #333;
}

  /* License */
.cr-nav .cr-license {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;

    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.4px;
    word-spacing: 1.6px;

    color: #505050;
}
/* /Nav */



/* Dark Mode */
html.cr-dark,
html.cr-dark body.cr-body-dark,
html.cr-dark .cr-nav {
    color: #FFF;
    background-color: #1C1C1C;
}

  /* Buttons */
html.cr-dark .cr-nav .cr-home-btn .cr-shape { background-color: #FFF; }
html.cr-dark .cr-nav .cr-dark-mode { border-color: #FFF; }

html.cr-dark .cr-container { background-color: #333; }

html.cr-dark .cr-nav .cr-header h1,
html.cr-dark .cr-container h3 { color: #FFF; }

html.cr-dark .cr-container code {
    text-shadow: 0 0 4px hsl(200, 100%, 60%);

    color: hsl(200, 100%, 90%);
}

html.cr-dark .cr-container code::selection {
    color: #252525;
    background-color: #FFF;
}

html.cr-dark .cr-license { color: #EEE; }
/* /Dark Mode */