@charset 'utf-8';
@use '../global' as *;

/* Elements
--------------------------------------------- */
html {
	font-size: var(--html-font-size, 100%);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	overflow-x: clip;
	background-color: var(--ap-color-base, #fff);
	color: var(--ap-color-text);
	font-family: var(--body-font-family, var(--font-family));
	font-size: var(--body-font-size);
	font-weight: var(--body-font-weight);
	font-style: var(--body-font-style);
	line-height: var(--body-line-height);
	letter-spacing: var(--body-letter-spacing, normal);
	text-transform: var(--body-text-transform, none);
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object {
	max-width: 100%;
}

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

table {
	border-collapse: collapse;
	width: 100%;
}

th,td {
	padding: .5em;
	background-color: var(--table-cell-bg-color, transparent);
	text-align: start;
}

thead th {
	background-color: var(--thead-th-bg-color, var(--table-cell-bg-color, transparent));
}

dfn,
cite,
em,
i {
	font-style: italic;
}

blockquote {
	border-left: 3px solid var(--ap-color-primary);
	padding: 1.5em;
	background: #f5f5f5;
	cite {
		display: block;
		font-size: 80%;
		margin-top: 1em;
	}
}

address {
	margin: 0 0 1.5em;
}

dd {
	margin: 0 1em 1em;
}

pre {
	background: #f5f5f5;
	font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
	line-height: 1.6;
	max-width: 100%;
	overflow: auto;
	padding: 1em;
}

code:where(:not(pre *)) {
	display: inline-block;
	background: #f5f5f5;
	font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
	padding: .2em .4em;
}

abbr,
acronym {
	border-bottom: 1px dotted #666;
	cursor: help;
}

figcaption {
	font-size: 80%;
	margin-top: .5em;
	text-align: center;
	color: var(--ap-color-subtle, #666);
}

// h1~h6
@for $i from 1 through 6 {
	h#{$i} {
		clear: both;
		color: var(--h#{$i}-color, var(--headings-color, inherit));
		font-family: var(--h#{$i}-font-family, var(--headings-font-family, inherit));
		font-size: var(--h#{$i}-font-size, var(--headings-font-size));
		font-style: var(--h#{$i}-font-style, var(--headings-font-style));
		font-weight: var(--h#{$i}-font-weight, var(--headings-font-weight));
		line-height: var(--h#{$i}-line-height, var(--headings-line-height, 1.2));
		letter-spacing: var(--h#{$i}-letter-spacing, var(--headings-letter-spacing, normal));
	}
}
