@use 'mixins/function';
@use 'common/var';

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

html,
body,
div,
span,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
abbr,
address,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
samp,
small,
strong,
sub,
sup,
var,
b,
i,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
summary,
time,
mark,
audio,
video {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
}

html {
	height: 100%;
	width: 100%;
}

body {
	height: 100%;
	width: 100%;
	overscroll-behavior: none;
	line-height: 1;
	font-size: var(--font-size--md);
	font-weight: var(--font-weight--regular);
	color: var(--color--text--shade-1);
	background-color: var(--color--background--light-2);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
textarea {
	font-family: var(--font-family);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

input {
	font-weight: var(--font-weight--regular);
}

button {
	font-weight: var(--font-weight--bold);
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
	display: block;
}

nav ul {
	list-style: none;
}

blockquote,
q {
	quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
	content: '';
	content: none;
}

a {
	margin: 0;
	padding: 0;
	text-decoration: none;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
	cursor: pointer;
	color: var(--color--primary);

	&:active {
		color: function.saturation(
			--color--primary--h,
			--color--primary--s,
			--color--primary--l,
			-(30%)
		);
	}
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--color--text--shade-1);
	font-weight: inherit;

	&:first-child {
		margin-top: 0;
	}

	&:last-child {
		margin-bottom: 0;
	}
}

h4,
h5,
h6,
p {
	font-size: inherit;
}

p {
	line-height: 1.8;

	&:first-child {
		margin-top: 0;
	}

	&:last-child {
		margin-bottom: 0;
	}
}

ins {
	background-color: var(--color--success);
	color: var(--color--text--shade-1);
	text-decoration: none;
}

mark {
	background-color: var(--text-highlight--color--background);
	color: var(--color--text--shade-1);
	font-style: italic;
	font-weight: var(--font-weight--bold);
}

del {
	text-decoration: line-through;
}

abbr[title],
dfn[title] {
	border-bottom: 1px dotted;
	cursor: help;
}

hr {
	display: block;
	height: 1px;
	border: 0;
	border-top: 1px solid var(--color--foreground--tint-1);
	margin: 0;
	padding: 0;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

input,
select {
	vertical-align: middle;
}
