:root {
    --html-brand-orange-primary: #e44d26;
    --html-brand-orange-secondary: #F16529;

    --html-brand-orange-highlight: #f6c173;

    --padding-medium: 1em;
    --padding-clearance: calc(var(--padding-medium) * 3);

    --legibility-clamp: 80ch;
}
        *,
*::after,
*::before {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    margin: 0;
    color: #232323;
    background-color: var(--html-brand-orange-primary);
    background: linear-gradient(233deg, var(--html-brand-orange-primary) 50%, var(--html-brand-orange-secondary) 50%);
    background-attachment: fixed;
    scroll-behavior: smooth;
    height: fit-content;
    padding-block-end: 5em;
}

header {
    position: fixed;
    top: 0;
    padding-block: 0.35em 0.5em;
    background-color: rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    filter: drop-shadow(2px 0 10px rgba(51,51,51,0.5));
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1em;
    z-index: 5;
}

header > * {
    margin-block: 0;
}

main {
    margin-block-start: 8em;
    padding-inline: min(1em, 100%);
    max-width: 120ch;
    margin-inline: auto;
}

main * {
    margin-block: 0;
}

main > * {
    border-start-start-radius: 0.25em;
    border-start-end-radius: 0.25em;
}

h1 {
    font-family: 'Stick No Bills', sans-serif;
    font-weight: 600;
    background-color: #fff;
    width: fit-content;
    height: min-content;
    white-space: nowrap;
    padding-inline: 0.75em 1em;
    padding-block: 0.15em 0.25em;
    border-start-end-radius: 99em;
    border-end-end-radius: 99em;
    filter: drop-shadow(0 0 4px rgba(51,51,51,0.25));
    user-select: none;
}

h1 > a {
    vertical-align: middle;
}


h2 {
    font-size: 3rem;
    line-height: 0.75;
}

h3 {
    padding: 0.15em 1em 0.25em;
    font-size: 2.75rem;
    line-height: 1.25;
}

figure {
    max-width: var(--legibility-clamp);
    margin-inline: auto;
    margin-block: 1em;
}

figcaption {
    text-align: center;
}

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

blockquote {
    max-width: 90ch;
    margin-block: 2em 4em;
    padding-inline: 2em;
    margin-inline: auto;
}

blockquote p {
    position: relative;
    font-size: clamp(0.75em, calc(1em + 0.7vw), 1.55em);
}

blockquote p::before {
    position: absolute;
    content: '\201C';
    font-size: 5em;
    transform: translateX(-0.75ch) translateY(-0.85ch);
}

blockquote p::after {
    content: '\201D';
    font-size: 5em;
    position: absolute;
    transform: translateX(0.15ch) translateY(-0.85ch);
}

blockquote cite {
    float: right;
    margin-inline-end: 4ch;
}

blockquote cite::before {
    content: '\2014\00A0';
    color: var(--html-brand-orange-secondary);
}

code {
    background: var(--html-brand-orange-highlight);
}

p {
    font-size: 1.1em;
    line-height: 1.75;
}

a:hover {
    text-decoration: underline;
}

a.brand-link {
    text-decoration: none;
    color: currentColor;
}

a.brand-link:hover {
    text-decoration: underline;
    color: var(--html-brand-orange-secondary);
}

a.brand-link:visited {
    color: currentColor;
}

footer {
    position: fixed;
    bottom: 0;
    padding-block: 1em;
    background: #232323;
    color: #adadad;
    width: 100%;
    text-align: center;
}

footer a {
    color: #fff;
    text-decoration: none;
}

p:has(small) {
    line-height: 1.25;
}

[data-tooltip] {
    position: relative;
    cursor: help;
    text-decoration: underline;
}

.html-elements {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(min(100%,30ch),1fr));
    grid-auto-rows: minmax(calc(30ch * 0.95), min-content);
    gap: 1em;
    list-style-type: none;
    padding-inline-start: 0;
    padding-block-end: 20vh;
}

.html-elements li {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1em 0;
    padding: 1em;
    position: relative;
}

.html-elements li:hover {
    outline: 4px solid #000;
    box-shadow: 0 0 20px rgba(51,51,51,0.75);
    transform: scale(1.025);
    transition: transform 0.20s;
}

.html-elements li:nth-child(2n) {
    border-radius: 0 1em;
}

.html-elements li[data-disabled] {
    opacity: 0.5;
    pointer-events: none;
    filter: blur(1.5px);
}

.html-elements a {
    font-family: 'Stick No Bills', sans-serif;
    font-weight: 200;
    color: #000;
    padding-inline: 0;
    text-decoration: none;
    font-size: clamp(2em, calc(1em + 2vw), 2.45em);
}

.html-elements a:before {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.html-elements sup {
    display: inline-block;
    transform: translateX(-0.25em) translateY(0.25em);
}

.html-elements p {
    margin: 0;
}

.mhd-post {
    width: clamp(200px, calc(100% - 2em), 120ch);
    padding-block: max(2em, 2vw);
    border-radius: 1em;
    background: #fff;
    min-height: 55vh;
    display: grid;
    grid-template-columns: minmax(1em, 1fr) minmax(280px, 80em) minmax(1em, 1fr);
}

.mhd-post > * {
    grid-column: 2;
}

.mhd-post > * + * {
    padding-block-start: 1em;
}

.mhd-post nav {
    width: 100%;
}

.mhd-post nav * {
    width: auto;
}

.mhd-post a {
    color: var(--html-brand-orange-primary);
    font-weight: 600;
    text-decoration: none;
}

.mhd-post a:hover {
    text-decoration: underline;
}

.mhd-post dl {
    display: grid;
    grid-template-columns: min-content 1fr;
    gap: 0.25em;
    max-width: var(--legibility-clamp);
    margin-inline: auto;
    background: #dadada;
    padding-block-start: 0;
    margin-block-start: 1em;
    border-radius: 0;
    overflow: hidden;
    font-size: 0.875em;
}

.mhd-post dt,
.mhd-post dd {
    padding: 0.25em;
    background: #fff;
}

.mhd-post dd {
    margin: 0;
}

.mhd-post h2 {
    font-family: 'Stick No Bills', sans-serif;
    font-size: clamp(2em, calc(2em + 4vw), 5.5em);
    text-align: center;
    margin-block-end: 0.25em;
}

.mhd-post h3 {
    padding: 0;
    text-align: center;
    font-size: clamp(1.4375rem,1.11rem + 1.65vw,2.5rem);
}

.mhd-post p {
    max-width: 70ch;
    margin-inline: auto;
}

.mhd-post-end {
    margin-block-start: 2em;
    border: 0;
    border-top: 2px dashed #000;
    opacity: 0.5;
    max-width: var(--legibility-clamp);
}

.post-navigation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
    width: clamp(200px, calc(100% - 2em), 120ch);
    margin-inline: auto;
    margin-block-start: 1em;
    margin-block-end: 10em;
}

.post-navigation a {
    flex: 1 1 auto;
    padding: 0.5em 1.5em;
    color: #000;
    background: #fff;
    border: 3px solid #fff;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
}

.post-navigation a:hover {
    border-color: #000;
}

.post-navigation a {
    border-radius: 99em 0 0 99em;
}

.post-navigation a + a {
    text-align: right;
    border-radius: 0 99em 99em 0;
}

.post-navigation a[href="#0"] {
    opacity: 0.5;
}

.post-navigation a[href="#0"]:hover {
    cursor: not-allowed;
    border-color: #fff;
}
