/*  dev.css v6 - https://tangled.org/devins.page/dev.css
    0. background image
	1. configurable variables
	2. typography
	3. document
	4. blockquotes
	5. buttons and inputs
	6. code and keyboards
	7. details
	8. description lists
	9. horizontal rules
	10. fieldsets
	11. tables
	12. lists
	13. media
    14. font
    15. footnotes
*/

/* 0. background image */
@media (prefers-color-scheme: dark) {
    body {
        background-image: url('img/darkbg.gif')
    }
}

@media (prefers-color-scheme: light) {
    body {
        background-image: url('img/lightbg.gif')
    }
}

/* 1. configurable variables */
:root {
    --dc-font: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, sans-serif;
    --dc-font-mono: ui-monospace, monospace;

    color-scheme: light dark;

    /* primary text */
    --dc-tx-1: light-dark(#cb4377, #8d85d6);
    /* secondary text */
    --dc-tx-2: light-dark(#ca313e, #d1b1bc);
    /* primary background */
    --dc-bg-1: light-dark(rgba(252, 189, 209, 0.275), rgba(19, 15, 32, 0.164));
    /* secondary background */
    --dc-bg-2: light-dark(rgba(255, 149, 183, 0.253), rgba(4, 7, 34, 0.247));
    /* border */
    --dc-bg-3: light-dark(#cb4377, #1f1a3d);
    /* link text */
    --dc-lk: light-dark(#982a54, #95aece);
    /* button */
    --dc-btn: light-dark(#cb4377, #aa9e70dc);
    /* button hover */
    --dc-btn-hover: light-dark(#813251, #8b8153);
    /* text over buttons */
    --dc-btn-tx: light-dark(#25151b, #25151b);
    /* accent color */
    --dc-ac: light-dark(#fa6989, #caa84a);

    /* max width */
    --dc-width: 48rem
}

/* 2. typography */
p {
    overflow-wrap: break-word;
    text-wrap: pretty
}

h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    text-wrap: balance;
    color: var(--dc-tx-1)
}

h1,
h2,
h3 {
    padding-block-end: 0.125rem;
    border-block-end: 1px solid var(--dc-bg-3);
    line-height: 1
}

header>h1 {
    font-family: 'TheGoodMonolith', ui-sans-serif, system-ui, sans-serif;
    text-shadow: 1px 1px 4px #eeb741
}

section>h1 {
    font-family: 'Kristi', ui-sans-serif, system-ui, sans-serif;
}

a {
    color: var(--dc-lk);
    cursor: crosshair
}

mark {
    border-radius: 0.375rem;
    padding: 0.125rem 0.25rem;
    background: var(--dc-ac);
    color: var(--dc-btn-tx)
}

::selection {
    background: rgba(56, 38, 45, 0.404);
    text-shadow: 1px 1px 4px #eeb741
}

code,
pre,
kbd,
samp {
    font-family: var(--dc-font-mono);
    font-size: 0.875rem
}

/* 3. document */
body {
    font-family: var(--dc-font);
    color: var(--dc-tx-2);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: var(--dc-width);
    margin: 0 auto;
    padding: 1rem;
    overflow-x: hidden
}

header * {
    padding: 0;
    margin: 0
}

header>*:not(:last-child) {
    margin-block-end: 0.25rem
}

header h1,
header h2,
header h3 {
    border-block-end: none
}

header nav ul,
footer nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0
}

header nav ul li,
footer nav ul li {
    margin: 0;
    display: flex;
    align-items: center
}

header nav ul li:not(:first-child)::before,
footer nav ul li:not(:first-child)::before {
    content: "⋅";
    margin: 0 0.25em
}

aside {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

main,
body>article,
aside article {
    padding-inline: 1.5rem;
    background: var(--dc-bg-1);
    border: 1px solid var(--dc-bg-3);
    border-radius: 0.375rem;
    backdrop-filter: blur(10px);
}

main article {
    margin-block: 1rem;
    padding-inline: 1.5rem;
    background: var(--dc-bg-2);
    border: 1px solid var(--dc-bg-3);
    border-radius: 0.375rem;
}

article h1,
article h2,
article h3 {
    border-block-end: none
}

aside article details {
    margin-block: 1rem
}

@media (max-width: 48rem) {
    main {
        margin-inline: -1rem;
        background: none;
        border: none
    }

    main article,
    aside article,
    main code,
    main samp,
    main kbd,
    main pre,
    main blockquote,
    main details:not(aside details) {
        background: var(--dc-bg-1)
    }

    main tr:nth-child(even),
    main th {
        background: var(--dc-bg-1)
    }

    main,
    body>article,
    aside article,
    main article {
        padding-inline: 1rem
    }
}

@media (min-width: 82rem) {
    body:has(main):has(aside) {
        display: grid;
        grid-template-columns: minmax(0, 16rem) minmax(0, var(--dc-width)) minmax(0,
                16rem);
        grid-template-areas:
            ". header ."
            "aside-l main aside-r"
            ". footer .";
        max-width: 80rem
    }

    body:has(main):has(aside) header {
        grid-area: header
    }

    body:has(main):has(aside) main {
        grid-area: main
    }

    body:has(main):has(aside) aside:nth-of-type(1) {
        grid-area: aside-l
    }

    body:has(main):has(aside) aside:nth-of-type(2) {
        grid-area: aside-r
    }

    body:has(main):has(aside) footer {
        grid-area: footer
    }
}

/* 4. blockquotes */
blockquote {
    padding: 1rem;
    margin-inline: 0;
    background: var(--dc-bg-2);
    border: 1px solid var(--dc-bg-3);
    border-inline-start: 5px solid var(--dc-bg-3);
    border-radius: 0.375rem
}

/* 5. buttons and inputs */
input,
button,
textarea,
select {
    font: inherit
}

button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
    padding: 0.25rem 0.75rem;
    text-align: center;
    text-decoration: none;
    background: var(--dc-btn);
    color: var(--dc-btn-tx);
    border: 0;
    border-radius: 0.375rem;
    cursor: pointer
}

button[disabled],
input[type="submit"][disabled],
input[type="reset"][disabled],
input[type="button"][disabled] {
    cursor: not-allowed;
    opacity: 0.5
}

:is(.button,
    button,
    input[type="submit"],
    input[type="reset"],
    input[type="button"]):is(:focus, :enabled:hover) {
    background: var(--dc-btn-hover)
}

textarea,
select,
input {
    padding: 0.25rem 0.5rem;
    background: var(--dc-bg-2);
    color: var(--dc-tx-2);
    border: 1px solid var(--dc-bg-3);
    border-radius: 0.375rem;
    box-shadow: none;
    box-sizing: border-box
}

textarea {
    max-width: 100%
}

input,
progress {
    accent-color: var(--dc-ac)
}

/* 6. code and keyboards */
code,
samp,
kbd,
pre {
    background: var(--dc-bg-2);
    border: 1px solid var(--dc-bg-3);
    border-radius: 0.375rem;
    padding: 0.125rem 0.25rem;
    tab-size: 4
}

kbd {
    border-block-end: 3px solid var(--dc-bg-3)
}

pre {
    padding: 1rem;
    max-width: 100%;
    overflow: auto
}

pre code {
    padding: 0;
    border: 0
}

/* 7. details */
details:not(aside details) {
    margin-block: 1rem;
    padding: 1rem 1.5rem;
    background: var(--dc-bg-2);
    border: 1px solid var(--dc-bg-3);
    border-radius: 0.375rem
}

summary {
    cursor: pointer;
    font-weight: bold
}

details[open]> :last-child {
    margin-block-end: 0
}

/* 8. description lists */
dt {
    font-weight: bold
}

dd::before {
    content: "⋅ "
}

/* 9. horizontal rules */
hr {
    border: 0;
    border-block-end: 2px solid var(--dc-bg-3)
}

/* 10. fieldsets */
fieldset {
    padding: 1rem;
    border: 1px solid var(--dc-bg-3);
    border-radius: 0.375rem
}

legend {
    padding-inline: 0.5rem
}

/* 11. tables */
table {
    border-collapse: collapse;
    width: 100%
}

td,
th {
    border: 1px solid var(--dc-bg-3);
    text-align: left;
    padding: 0.5rem
}

th {
    background: var(--dc-bg-2)
}

tr:nth-child(even) {
    background: var(--dc-bg-2)
}

table caption {
    font-weight: bold
}

/* 12. lists */
ol,
ul {
    padding-inline-start: 2rem
}

li {
    margin-block-start: 0.375rem
}

/* 13. media */
img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    height: auto
}

/* 14. fonts */
@font-face {
    font-display: swap;
    font-family: 'Kristi';
    font-style: normal;
    font-weight: 400;
    src: url(fonts/kristi-v21-latin-regular.woff2) format('woff2'),
        url(fonts/kristi-v21-latin-regular.ttf) format('truetype')
}

@font-face {
    font-family: 'TheGoodMonolith';
    font-style: normal;
    font-weight: 400;
    src: local(TheGoodMonolith), url(fonts/TheGoodMonolith.woff) format('woff')
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url(fonts/Atkinson-Hyperlegible-Regular-102a.woff2) format("woff2"),
        url(fonts/Atkinson-Hyperlegible-Regular-102.woff) format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url(fonts/Atkinson-Hyperlegible-Bold-102a.woff2) format("woff2"),
        url(fonts/Atkinson-Hyperlegible-Bold-102.woff) format("woff");
    font-weight: bold;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url(fonts/Atkinson-Hyperlegible-Italic-102a.woff2) format("woff2"),
        url(fonts/Atkinson-Hyperlegible-Italic-102.woff) format("woff");
    font-weight: normal;
    font-style: italic;
    font-display: swap
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url(fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2) format("woff2"),
        url(fonts/Atkinson-Hyperlegible-BoldItalic-102.woff) format("woff");
    font-weight: bold;
    font-style: italic;
    font-display: swap
}

/* 15. footnotes */
hr.footnotes {
    width: 40%
}

a.footnote {
    text-decoration: none;
    margin-right: 0.4rem
}
