@import url("./themes/terminal.css");
@import url("./themes/halloween.css");

/* Reset */

*,
*::before,
*::after {
  	box-sizing: border-box;
}

body {
  	margin: 0;
}

/* Document */

:root {
  	color-scheme: dark;
  	font-family: var(--font-family);
  	font-size: var(--font-size);
  	line-height: var(--line-height);
  	color: var(--color-text);
  	background: var(--color-background);
}

/* Layout */

body > header,
.theme,
main,
footer {
  	width: min(100% - 2rem, 900px);
  	margin-inline: auto;
}

body > header {
	border-bottom: 1px solid var(--color-border);
	padding-block: 1.5rem;
}

header > nav.main {
  	display: flex;
  	justify-content: space-between;
  	align-items: baseline;
  	gap: 1rem;
}

.theme summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    list-style: none;
	margin-top: 1rem;
}

.theme summary::-webkit-details-marker {
    display: none;
}

.theme .selector label {
	cursor: pointer;
	font-size: 0.8rem;
	white-space: nowrap;
}

.theme .selector div {
	display: flex;
	flex-direction: column;
    align-items: flex-start;
	row-gap: .5rem;
	margin-bottom: 0.8rem;
}

.theme .selector input {
	accent-color: var(--accent-primary);
}

footer {
  	display: flex;
  	justify-content: space-between;
  	gap: 1rem;
  	flex-wrap: wrap;
  	padding-block: 2rem;
	margin-top: 2rem;
	border-top: 1px solid var(--color-border);
}

footer p, fieldset p {
  	margin: 0;
	color: var(--color-muted);
  	font-size: 0.85rem;
}

/* Links */

a {
  	color: var(--accent-primary);
}

/* Headings */

h1,
h2,
h3,
h4 {
  	font-family: var(--heading-font-family);
  	font-weight: var(--heading-font-weight);
  	line-height: var(--heading-line-height);
  	letter-spacing: var(--heading-letter-spacing);
}

h1 {
  	font-size: var(--h1-font-size);
}

h2 {
  	font-size: var(--h2-font-size);
}

h3 {
  	font-size: var(--h3-font-size);
}

h4 {
  	font-size: var(--h4-font-size);
}

/* Text elements */

p,
li,
dd {
  	overflow-wrap: break-word;
}

pre {
  	overflow-x: auto;
  	tab-size: 2;
}

code,
pre {
  	font-family: var(--font-family);
}

button,
input,
select,
textarea {
  	font: inherit;
}

strong,
.accent {
  	color: var(--accent-secondary);
}

/* Releases */

.release time {
  	margin-left: 0.75rem;
  	font-size: 0.8rem;
  	font-weight: 400;
  	color: var(--color-muted);
}

.release ul {
  	margin: 0;
  	padding-left: 1.25rem;
}

.release li {
  	font-size: 0.9rem;
  	line-height: 1.6;
}

.release li + li {
  	margin-top: 0.25rem;
}

/* Emoji */
span.emoji.general::before {
  	content: var(--emoji-general);
  	text-decoration: none;
}

span.emoji.technical::before {
  	content: var(--emoji-technical);
  	text-decoration: none;
}

@media (min-width: 600px) {
    .theme .selector div {
        flex-direction: row;
		flex-wrap: wrap;
        column-gap: 1.5rem;
    }
}