@font-face {
    font-family: "Space Mono";
    src: url("/_global/fonts/spacemono_bold.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Averia";
    src: url("/_global/fonts/averia_bold.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: "Averia";
    src: url("/_global/fonts/averia_regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Averia";
    src: url("/_global/fonts/averia_italic.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: "Averia";
    src: url("/_global/fonts/averia_bolditalic.ttf") format("truetype");
    font-weight: bold;
    font-style: italic;
}


/* =========== GLOBAL STYLES =========== */

:root {
    line-height: 1.7;
    color: #222;
    background-color: #ffffff;

    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    border-collapse: separate;

    font-family: "Averia", sans-serif;

    --c-base: #fff7f6;
    --c-accent: #de4335;
    --c-success: #28a745;
    --c-warning: #ffc107;
    --c-error: #dc3545;

    --g-border-radius: 0.5rem;
    --g-border-width: 1px;

    --c-context-back: #fff7f6;
    --c-context-front: #222;
    --c-context-border: #d2d2d2;
}

html {
    scroll-behavior: smooth;
}

*,
*:before,
*:after {
    box-sizing: inherit;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    border-color: inherit;
    color: inherit;
    flex-shrink: 0;
}

:root,
body {
    background-color: #fff7f6;
}

body {
    margin: 0;
    display: block;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =========== LAYOUT =========== */

.row {
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 1rem;
}

.column {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: stretch;
    gap: 1rem;
}

.gap-0 {
    gap: 0;
}

.gap-025 {
    gap: .25rem;
}

.gap-05 {
    gap: .5rem;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.gap-3 {
    gap: 3rem;
}

.flex {
    flex: 1 1 auto;
}

.flex-2 {
    flex: 2 1 auto;
}

.flex-3 {
    flex: 3 1 auto;
}

.flex-4 {
    flex: 4 1 auto;
}

.flex-5 {
    flex: 5 1 auto;
}

.flex-6 {
    flex: 6 1 auto;
}

.cross-start {
    align-items: flex-start;
}

.cross-center {
    align-items: center;
}

.cross-end {
    align-items: flex-end;
}

.cross-stretch {
    align-items: stretch;
}

.main-start {
    justify-content: flex-start;
}

.main-center {
    justify-content: center;
}

.main-end {
    justify-content: flex-end;
}

.main-space-between {
    justify-content: space-between;
}

.main-space-around {
    justify-content: space-around;
}

.main-space-evenly {
    justify-content: space-evenly;
}

/* =========== AU COMPONENTS =========== */

._au_header {
    position: sticky;
    width: min(calc(100% - 2rem), 50rem);
    top: 1rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffffa5;
    border: 1px solid #d2d2d2;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 1rem -.125rem #00000020;
    padding: .5rem;
    padding-left: 1rem;
    border-radius: 1rem;
    margin-bottom: 2rem;

    z-index: 1001;
}

._au_footer {
    width: min(calc(100% - 2rem), 50rem);
    margin-top: auto;
    padding: 1rem;
    font-size: 0.9rem;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    background-color: white;
    color: #555;
    border: 1px solid #d2d2d2;
    border-bottom: none;
    overflow: hidden;
}

@media screen and (max-width: 30rem) {
    ._au_footer .row {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
        text-align: center;
    }
}

._au_header ._au_header_logo {
    font-size: 1.4rem;
    font-weight: bold;
}

._au_header ._au_header_action {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

._au_header ._au_header_action img {
    width: 1.3rem;
    height: 1.3rem;
    transition: filter .3s ease;
}

._au_header ._au_header_action img:hover {
    filter: drop-shadow(0 0 0.25rem #00000030);
}


/* =========== TYPOGRAPHY =========== */

h1 {
    font-size: 2.0rem;
    font-weight: bold;
    margin-top: 1.8rem;
    margin-bottom: 1.3rem;
}

h2 {
    font-size: 1.7rem;
    font-weight: bold;
    margin-top: 1.6rem;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 1.4rem;
    margin-bottom: 1.1rem;
}

h4 {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 1.2rem;
    margin-bottom: 1.0rem;
}

h5 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 1.1rem;
    margin-bottom: 0.9rem;
}

h6 {
    font-size: 1.0rem;
    font-weight: bold;
    margin-top: 1.0rem;
    margin-bottom: 0.8rem;
}

large {
    font-size: 1.25rem;
}

small {
    font-size: 0.875rem;
}


a {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

a[accent] {
    color: var(--c-accent);
}

a:hover {
    text-decoration: none;
    filter: brightness(0.8);
}

em {
    font-style: italic;
}

strong,
b {
    font-weight: bold;
}

/* =========== TABLES =========== */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1rem 0;
}

th,
td {
    padding: .5rem 1rem;
    border: 1px solid #d2d2d2;
    text-align: left;
}

th {
    background-color: #f5f5f5;
    font-weight: bold;
}

/* =========== COLOR =========== */

.card {
    padding: 1rem;
    border: var(--g-border-width) solid var(--c-context-border);
    background-color: var(--c-context-back);
    color: var(--c-context-front);
    border-radius: var(--g-border-radius);
}

.primary {
    --c-context-back: var(--c-base);
    --c-context-front: #222;
    --c-context-border: #d2d2d2;
    background-color: var(--c-base);
    color: var(--c-accent);
    border-color: #d2d2d2;
}

.secondary {
    --c-context-back: #ffffff;
    --c-context-front: #222;
    --c-context-border: #d2d2d2;
    background-color: #ffffff;
    color: #222;
    border-color: #d2d2d2;
}

.success {
    --c-context-back: #204028;
    --c-context-front: var(--c-success);
    --c-context-border: #294e32;
    background-color: #204028;
    color: var(--c-success);
    border-color: #294e32;
}

.warning {
    --c-context-back: #66520a;
    --c-context-front: var(--c-warning);
    --c-context-border: #7a6212;
    background-color: #66520a;
    color: var(--c-warning);
    border-color: #7a6212;
}

.error {
    --c-context-back: #601010;
    --c-context-front: var(--c-error);
    --c-context-border: #7a1212;
    background-color: #601010;
    color: var(--c-error);
    border-color: #7a1212;
}

.bordered {
    border: var(--g-border-width) solid var(--c-context-border);
}

.raised {
    box-shadow: 0 0 1rem -.125rem #00000035;
}

.no-margin {
    margin: 0;
}

.no-top-margin {
    margin-top: 0;
}


/* =========== CITATION =========== */

sources {
    display: none;
}

._au_references {
    margin-top: 2rem;
    padding-left: 1.5rem;
    border-top: 1px solid var(--c-context-border);
    padding-top: 1rem;
}

._au_references li {
    margin-bottom: .5rem;
}

._au_references li a {
    text-decoration: none;
}

._au_references li a:hover {
    text-decoration: none;
    cursor: default
}

._au_references li a[href]:hover {
    text-decoration: underline;
    cursor: pointer
}

._au_cite {
    font-style: normal;
    font-weight: 900;
    text-decoration: none;
    opacity: 0.8;
    margin: 0 .1rem;

    vertical-align: auto;
    font-size: 0.8rem;
}

._au_cite:hover {
    opacity: 1.0;
}

/* =========== HTML COMPONENTS =========== */

main {
    position: relative;
    width: min(calc(100% - 2rem), 48rem);
    margin-bottom: 2rem;
}

code,
codeblock,
pre {
    font-size: 0.9rem;
    font-family: "Space Mono", Courier, monospace;
    border: 1px solid var(--c-context-border);
    background-color: #f5f5f5;
    border-radius: .3rem;
}

code {
    word-break: break-all;
    white-space: pre-wrap;
    padding: .1rem .2rem;
}

codeblock {
    display: block;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    padding: .5rem;
    margin: 1rem 0;
}

codeblock[file]::before {
    content: attr(file);
    display: block;
    font-size: 0.85rem;
    font-family: "Space Mono", Courier, monospace;
    font-weight: bold;
    width: auto;
    color: #444;
    background-color: #00000009;
    border-bottom: 1px solid var(--c-context-border);
    padding: .25rem .5rem;
    margin: -.5rem -.5rem .5rem -.5rem;
}


blockquote {
    border-left: 4px solid #d2d2d2;
    margin: 1rem 0;
    padding-left: 1rem;
    color: #555;
    font-style: italic;
    transition: background-color .3s ease;
}

blockquote:hover {
    background-color: #f9f9f9;
}

address {
    font-style: normal;
    color: #555;
    margin: 1rem 0;
}

aside {
    position: absolute;
    width: 10rem;
    left: calc(100% + 1rem);
    z-index: 1;
    pointer-events: auto;
    padding-left: .5rem;
    border-left: 1px solid var(--c-context-border);
}

@media only screen and (max-width: calc(48em + 10em * 2 + 2rem)) {
    aside {
        position: inherit;
        left: unset;
    }
}

*[tooltip] {
    position: relative;
    cursor: help;
}

span[tooltip] {
    border-bottom: 1px dotted var(--c-context-front);
}

*[tooltip]:hover::after {
    content: attr(tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    color: #fff;
    padding: .25rem .5rem;
    border-radius: var(--g-border-radius);
    white-space: nowrap;
    z-index: 1002;
    font-size: 0.8rem;
    white-space: pre;
    box-shadow: 0 0 1rem -.125rem #00000040;
}

span[source] {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    color: #555;
}

span[source]::after {
    content: "[" attr(source) "]";
    display: inline-block;
    font-size: 0.8rem;
    color: #888;
}

figure {
    max-width: 100%;
    width: 20rem;
    margin: 1rem 0;
    text-align: center;
}

main img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--g-border-radius);
}

/* =========== RICH PREVIEWS =========== */

._au_rich_preview {
    border: 1px solid var(--c-context-border);
    border-radius: var(--g-border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    margin: 1rem 0;
    transition: box-shadow .3s ease;
    min-height: 7rem;
    max-height: 10rem;
    gap: 1rem;
}

._au_rich_preview:hover {
    box-shadow: 0 0 1rem -.125rem #00000020;
    filter: none;
}

._au_rich_preview_text {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
}

._au_rich_preview_title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

._au_rich_preview_description {
    font-size: .9rem;
    margin: 0;

    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: .125rem;
}

._au_rich_preview_url {
    font-size: .9rem;
    font-weight: bold;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-top: .5rem;
}

._au_rich_preview_image {
    display: block;
    flex-shrink: 0;
    width: 6rem;
    object-fit: cover;
    border: none;
    border-radius: 0;
    background-color: white;
    border-left: 1px solid var(--c-context-border);
    box-shadow: none;
    filter: none;
}

@media screen and (max-width: 40rem) {
    ._au_rich_preview_image {
        display: none;
    }
}


/* =========== POST CHIPS =========== */

._au_postchips {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

._au_postchip {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    text-decoration: none;
    transition: box-shadow .3s ease;
    padding: 0;
    overflow: hidden;
}

._au_postchip:hover {
    box-shadow: 0 0 1rem -.125rem #00000020;
    filter: none;
}

._au_postchip_image {
    width: 10rem;
    object-fit: cover;
    border: none;
    border-radius: 0;
    border-right: 1px solid var(--c-context-border);
}

@media screen and (max-width: 50rem) {
    ._au_postchip_image {
        display: none;
    }
}

._au_postchip_text {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    flex: 1 1 auto;
    justify-content: space-between;
}

._au_postchip_title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    overflow: hidden;
    white-space: wrap;
    text-overflow: ellipsis;
}

._au_postchip_date {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

._au_postchip_description {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* =========== ARTICLE SHARING =========== */

._au_article_sharing {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

._au_article_sharing_link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border-radius: 5rem;
    transition: box-shadow .3s ease;
    text-decoration: none;
    color: inherit;
    padding: .5rem .75rem;
}

._au_article_sharing_link img {
    width: 1.2rem;
    height: 1.2rem;
}

._au_article_sharing_link:hover {
    filter: brightness(.95);
    box-shadow: 0 0 1rem -.125rem #00000020;
}

/* =========== LIKE ELEMENTS =========== */

._au_react_likebtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    padding: .5rem .5rem;
    border-radius: var(--g-border-radius);
    transition: background-color .3s ease, filter .3s ease;
}

._au_react_likebtn:hover {
    background-color: #00000010;
}

._au_react_likebtn img {
    width: 1.3rem;
    height: 1.3rem;
}

._au_react_likebtn:disabled {
    cursor: not-allowed;
}