/* ===================================================================
   3. TYPOGRAPHY
================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: 'Public Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	font-weight: 800;
	line-height: 1.2;
}

/* Inline badge styling */
.inline-badge {
	display: inline-block;
	vertical-align: middle;
	margin-left: 0.5em;
}

.inline-badge img {
	vertical-align: middle;
	border-radius: 0 !important;
}

/* Links */
a:link,
a:visited {
	color: #cc241d;
	/* fallback */
	color: var(--link);
	text-decoration: underline;
	text-decoration-thickness: 0.12em;
	text-underline-offset: 0.2em;
	text-decoration-color: #cc241d;
	/* fallback */
	text-decoration-color: var(--link);
	transition: color 140ms ease, text-decoration-thickness 140ms ease, text-decoration-color 140ms ease;
	position: relative;
}

a:link::before,
a:visited::before {
	content: '';
	position: absolute;
	top: 0;
	left: -2px;
	right: -2px;
	bottom: -2px;
	background: transparent;
	border-radius: 4px;
	transition: background 200ms ease;
	z-index: -1;
}

a:visited {
	color: #b16286;
	/* fallback */
	color: var(--visited);
}

a:hover,
a:active {
	color: #9d0006;
	/* fallback */
	color: var(--link-hover);
	text-decoration-thickness: 0.18em;
	text-decoration-color: #076678;
	/* fallback */
	text-decoration-color: var(--accent-secondary);
}

a:hover::before {
	background: rgba(204, 36, 29, 0.05);
}

a:active {
	text-decoration-thickness: 0.2em;
}

/* External links */
a[href^="http://"],
a[href^="https://"] {
	position: relative;
}

a[href^="http://"]:not([href*="brennan.day"]):not(.no-external-icon)::after,
a[href^="https://"]:not([href*="brennan.day"]):not(.no-external-icon)::after {
	content: "➚";
	font-size: 0.75em;
	line-height: 1;
	margin-left: 0.2em;
	vertical-align: super;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
	outline: 2px solid #cc241d;
	/* fallback */
	outline: 2px solid var(--accent-primary);
	outline-offset: 2px;
}

/* Code */
code {
	font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
	font-size: 0.9em;
	background: #f2e5bc;
	/* fallback */
	background: var(--panel);
	padding: 0.15em 0.4em;
	border-radius: 4px;
	border: 1px solid #7c6f64;
	/* fallback */
	border: 1px solid var(--border);
	/* Prevent inline code from overflowing viewport */
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	max-width: 100%;
}

pre {
	font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
	font-size: 0.875em;
	line-height: 1.5;
	border: 1px solid #7c6f64;
	/* fallback */
	border: 1px solid var(--border);
	background: #f2e5bc;
	/* fallback */
	background: var(--panel);
	padding: 1.25rem;
	overflow-x: auto;
	overflow-y: hidden;
	border-radius: 8px;
	margin: 1.5rem 0;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
	word-wrap: normal;
	white-space: pre;
}

pre code {
	background: none;
	border: none;
	padding: 0;
	font-size: inherit;
	display: block;
	overflow-x: auto;
}



/* Syntax highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: #928374;
	font-style: italic;
}

.token.punctuation {
	color: #504945;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
	color: #b16286;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: #98971a;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
	color: #d65d0e;
}

.token.atrule,
.token.attr-value,
.token.keyword {
	color: #458588;
}

.token.function,
.token.class-name {
	color: #d79921;
}

.token.regex,
.token.important,
.token.variable {
	color: #cc241d;
}

.token.important,
.token.bold {
	font-weight: 700;
}

.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}

/* Override .tag styles in code blocks to prevent hashtag prefix */
pre .tag,
code .tag {
	background: none;
	color: inherit;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
	display: inline;
}

pre .tag::before,
code .tag::before {
	content: none;
}

/* Blockquotes */
blockquote {
	margin: 1.5rem 0;
	padding: 0.5rem 0 0.5rem 1.5rem;
	border-left: 4px solid #076678;
	/* fallback */
	border-left: 4px solid var(--accent-secondary);
	color: #000000;
	background: #e2e2e2;
	font-style: italic;
	font-size: 1.2em;
}

blockquote p {
	margin: 0.5rem 0;
}

/* Tables */
table {
	border-collapse: collapse;
	width: 100%;
	margin: 1.5rem 0;
}

td,
th {
	padding: 0.75rem;
	text-align: left;
	border: 1px solid #7c6f64;
	/* fallback */
	border: 1px solid var(--border);
}

th {
	background: #f2e5bc;
	/* fallback */
	background: var(--panel);
	font-weight: 700;
}

/* Horizontal rule */
hr {
	border: 0;
	border-top: 2px solid #7c6f64;
	/* fallback */
	border-top: 2px solid var(--border);
	margin: 2rem 0;
}
