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

	html {
		-webkit-text-size-adjust: 100%;
	}

	body {
		margin: 0;
		min-height: 100dvh;
		text-rendering: optimizeLegibility;
	}

	img,
	picture,
	svg,
	video,
	canvas {
		display: block;
		max-width: 100%;
		height: auto;
	}

	:where(input, button, textarea, select) {
		font: inherit;
		letter-spacing: inherit;
		word-spacing: inherit;
	}

	:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
		margin-block: 0;
	}
}

@layer base {
	body {
		font-family: var(--tb-font-sans, system-ui, -apple-system, sans-serif);
		font-size: var(--tb-text-md, 1rem);
		line-height: 1.6;
		color: var(--tb-color-text, #161616);
		background-color: var(--tb-color-surface, #ffffff);
	}

	:where(h1, h2, h3, h4, h5, h6) {
		font-family: var(--tb-font-heading, inherit);
		color: var(--tb-color-heading, inherit);
		line-height: 1.2;
		font-weight: 700;
	}

	:where(a) {
		color: var(--tb-color-primary, #0f62fe);
		text-decoration-thickness: 1px;
		text-underline-offset: 0.18em;
	}

	:where(:focus-visible) {
		outline: 2px solid var(--tb-color-primary, #0f62fe);
		outline-offset: 2px;
	}

	.screen-reader-text {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.skip-link:focus {
		position: fixed;
		top: 0.75rem;
		left: 0.75rem;
		z-index: 99999;
		width: auto;
		height: auto;
		padding: 0.625rem 1rem;
		clip: auto;
		background: var(--tb-color-surface, #ffffff);
		color: var(--tb-color-text, #161616);
		border: 2px solid var(--tb-color-primary, #0f62fe);
		border-radius: 4px;
		text-decoration: none;
	}

	.tb-container {
		width: min(100% - 2rem, var(--tb-container-max, 1200px));
		margin-inline: auto;
	}

	.tb-site-header {
		border-bottom: 1px solid var(--tb-color-border, #e0e0e0);
		background: var(--tb-color-surface, #ffffff);
	}

	.tb-header-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1.25rem;
		min-height: 4.25rem;
		padding-block: 0.75rem;
	}

	.tb-brand {
		font-weight: 700;
		font-size: 1.25rem;
		text-decoration: none;
		color: var(--tb-color-heading, #161616);
	}

	.tb-nav-list {
		display: flex;
		flex-wrap: wrap;
		gap: 1.25rem;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.tb-nav-list a {
		text-decoration: none;
		color: inherit;
	}

	.tb-nav-details {
		display: none;
	}

	@media (max-width: 768px) {
		.tb-nav-desktop {
			display: none;
		}
		.tb-nav-details {
			display: block;
		}
		.tb-nav-details summary {
			cursor: pointer;
			list-style: none;
			padding: 0.4rem 0.75rem;
			border: 1px solid var(--tb-color-border, #e0e0e0);
			border-radius: 4px;
		}
		.tb-nav-details[open] .tb-nav-list {
			position: absolute;
			left: 0;
			right: 0;
			flex-direction: column;
			padding: 1rem;
			background: var(--tb-color-surface, #ffffff);
			border-bottom: 1px solid var(--tb-color-border, #e0e0e0);
			z-index: 50;
		}
	}

	.tb-editorial-wrap {
		width: min(100% - 2rem, var(--tb-container-content, 760px));
		margin-inline: auto;
		padding-block: 2.5rem;
	}

	.tb-editorial-meta {
		display: flex;
		flex-wrap: wrap;
		gap: 0.75rem 1.25rem;
		font-size: var(--tb-text-sm, 0.875rem);
		color: var(--tb-color-text-muted, #525252);
		margin-block: 0.75rem 1.5rem;
	}

	.tb-editorial-content > * + * {
		margin-top: 1.15em;
	}

	.tb-editorial-grid {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
		gap: 2rem;
		padding-block: 2rem;
	}

	.tb-editorial-card {
		display: flex;
		flex-direction: column;
		gap: 0.65rem;
	}

	.nav-links {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
		padding-block: 1.5rem 3rem;
	}

	.nav-links .page-numbers {
		padding: 0.4rem 0.75rem;
		border: 1px solid var(--tb-color-border, #e0e0e0);
		text-decoration: none;
		border-radius: 4px;
	}

	.nav-links .page-numbers.current {
		background: var(--tb-color-primary, #0f62fe);
		color: #ffffff;
		border-color: transparent;
	}

	.tb-ad-slot {
		contain: layout style;
		min-height: 90px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tb-site-footer {
		border-top: 1px solid var(--tb-color-border, #e0e0e0);
		padding-block: 2.5rem;
		background: var(--tb-color-surface-alt, #f4f6f8);
		font-size: var(--tb-text-sm, 0.875rem);
	}
}
