/* Typography and generic Markdown-rendered content. */
body {
    font-family: "document-text-font", "Open Sans", system-ui, sans-serif;
    line-height: 1.58;
    font-size: 16px;
    color: var(--ctp-text);
}

* {
    box-sizing: border-box;
}

::selection {
    color: var(--ctp-crust);
    background: var(--ctp-lavender);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "document-heading-font", "Fira Code", ui-monospace, monospace;
    color: var(--ctp-lavender);
    margin: 1.15em 0 0.7em;
    line-height: 1.22;
    letter-spacing: 0;
}

h1 {
    margin-top: 0;
    font-size: clamp(1.85rem, 1.35rem + 1.2vw, 2.55rem);
}

h2 {
    font-size: clamp(1.35rem, 1.1rem + 0.6vw, 1.75rem);
}

h3 {
    font-size: 1.18rem;
}

a {
    color: var(--ctp-sapphire);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color 140ms ease, text-shadow 140ms ease;
}

a:visited {
    color: var(--ctp-lavender);
}

a:hover {
    color: var(--ctp-teal);
    text-shadow: 0 0 12px color-mix(in srgb, var(--ctp-teal) 28%, transparent);
}

p {
    margin: 1em 0;
}

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

div.sections-highlight,
blockquote {
    border-radius: var(--radius-card);
    background: var(--ctp-surface0);
    border: 1px solid var(--ctp-overlay1);
    border-left-width: 5px;
    padding: 0.75rem 1rem;
    color: var(--ctp-text);
    margin: 1.5rem 0;
}

:root[data-theme="latte"] div.sections-highlight,
:root[data-theme="latte"] blockquote {
    background: var(--ctp-surface1);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) div.sections-highlight,
    :root:not([data-theme]) blockquote {
        background: var(--ctp-surface1);
    }
}

blockquote p:first-child {
    margin-top: 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

hr {
    border: 0;
    height: 1px;
    background: var(--border-subtle);
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
}

table th,
table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ctp-overlay1) 35%, transparent);
    vertical-align: top;
}

table tr {
    transition: background-color 140ms ease;
}

table tbody tr:hover {
    background: color-mix(in srgb, var(--ctp-surface0) 44%, transparent);
}

table th {
    text-align: left;
    color: var(--ctp-lavender);
    background: color-mix(in srgb, var(--ctp-surface0) 82%, transparent);
}

table tr:last-child td {
    border-bottom: 0;
}

pre {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    padding: 0.85rem 1rem;
    background: var(--ctp-mantle);
    color: var(--ctp-green);
    margin: 1rem 0;
    font-family: "Fira Code", ui-monospace, monospace;
    font-size: 0.92rem;
    line-height: 1.45;
    transition: border-color 160ms ease;
}

pre:hover {
    border-color: color-mix(in srgb, var(--ctp-green) 46%, var(--ctp-overlay1));
}

code {
    background: color-mix(in srgb, var(--ctp-surface0) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--ctp-overlay1) 42%, transparent);
    border-radius: var(--radius-card);
    padding: 0.08rem 0.32rem;
    color: var(--ctp-green);
    font-family: "Fira Code", ui-monospace, monospace;
    font-size: 0.92em;
}

pre code {
    background: transparent;
    border: 0;
    padding: 0;
}

.link-columns {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.link-column {
    flex: 1 1 100px;
}

.tip {
    border-left: 5px solid var(--ctp-sapphire);
    background: color-mix(in srgb, var(--ctp-surface0) 82%, transparent);
    border-radius: var(--radius-card);
    padding: 1rem;
}

.tip p {
    margin: 0 0 0.5em;
}

.tip p:last-child {
    margin-bottom: 0;
}

.tip h1,
.tip h2,
.tip h3 {
    font-size: 1rem;
    color: var(--ctp-sapphire);
    margin-top: 0;
    margin-bottom: 0.5em;
    text-transform: uppercase;
}

@media only screen and (max-width: 700px) {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        margin: 0.85em 0 0.45em;
    }

    ul,
    ol {
        padding-left: 1.35rem;
    }

    blockquote ul {
        padding-left: 1.1rem;
    }

    .link-columns {
        display: block;
    }
}
