/* ==========================================================================
   Base: reset, typography, forms, accessibility primitives
   ========================================================================== */

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

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	background: var(--tbe-white);
	color: var(--tbe-slate);
	font-family: var(--tbe-font);
	font-size: var(--tbe-text-md);
	line-height: var(--tbe-leading);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--tbe-space-3);
	color: var(--tbe-ink);
	font-family: var(--tbe-font-head);
	font-weight: 700;
	line-height: var(--tbe-leading-snug);
	letter-spacing: -0.015em;
	text-wrap: balance;
}

h1 {
	line-height: var(--tbe-leading-tight);
}

p {
	margin: 0 0 var(--tbe-space-4);
}

a {
	color: var(--tbe-accent-strong);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color var(--tbe-fast) var(--tbe-ease);
}

a:hover,
a:focus-visible {
	color: var(--tbe-ink);
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

img {
	display: block;
	border-radius: inherit;
}

figure {
	margin: 0 0 var(--tbe-space-5);
}

strong,
b {
	color: var(--tbe-ink);
	font-weight: 700;
}

small {
	font-size: var(--tbe-text-sm);
}

hr {
	height: 1px;
	margin: var(--tbe-space-6) 0;
	border: 0;
	background: var(--tbe-line);
}

ul,
ol {
	margin: 0 0 var(--tbe-space-4);
	padding-left: 1.25rem;
}

li + li {
	margin-top: var(--tbe-space-1);
}

blockquote {
	margin: var(--tbe-space-6) 0;
	padding: var(--tbe-space-4) 0 var(--tbe-space-4) var(--tbe-space-5);
	border-left: 4px solid var(--tbe-accent);
	color: var(--tbe-ink-800);
	font-size: var(--tbe-text-lg);
}

blockquote p:last-child {
	margin-bottom: 0;
}

code,
kbd,
pre {
	font-family: var(--tbe-font-mono);
	font-size: 0.9em;
}

code {
	padding: 0.15em 0.4em;
	border-radius: 6px;
	background: var(--tbe-mist);
	color: var(--tbe-ink-800);
}

pre {
	overflow-x: auto;
	padding: var(--tbe-space-4);
	border-radius: var(--tbe-radius-sm);
	background: var(--tbe-ink);
	color: #e9eef5;
}

pre code {
	background: none;
	color: inherit;
}

/* Figures & media inside content ---------------------------------------- */
.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	margin-top: var(--tbe-space-2);
	color: var(--tbe-slate);
	font-size: var(--tbe-text-sm);
}

.alignleft {
	float: left;
	margin: 0 var(--tbe-space-5) var(--tbe-space-4) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--tbe-space-4) var(--tbe-space-5);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

/* Forms ----------------------------------------------------------------- */
input,
select,
textarea,
button {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="number"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: 0.72rem 0.9rem;
	border: 1px solid var(--tbe-line);
	border-radius: var(--tbe-radius-sm);
	background: var(--tbe-white);
	color: var(--tbe-ink);
	font-size: var(--tbe-text-md);
	transition: border-color var(--tbe-fast) var(--tbe-ease), box-shadow var(--tbe-fast) var(--tbe-ease);
}

input::placeholder,
textarea::placeholder {
	color: #99a2b0;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	border-color: var(--tbe-accent);
	box-shadow: var(--tbe-ring);
}

textarea {
	min-height: 140px;
	resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
	width: 1.05rem;
	height: 1.05rem;
	margin-right: 0.5rem;
	accent-color: var(--tbe-accent-strong);
	vertical-align: -2px;
}

label {
	display: block;
	margin-bottom: var(--tbe-space-2);
	color: var(--tbe-ink);
	font-size: var(--tbe-text-sm);
	font-weight: 600;
}

/* Focus visibility ------------------------------------------------------ */
:focus-visible {
	outline: 2px solid var(--tbe-accent-strong);
	outline-offset: 2px;
}

/* Selection ------------------------------------------------------------- */
::selection {
	background: var(--tbe-accent);
	color: var(--tbe-ink);
}

/* Skip link & screen-reader text ---------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed !important;
	top: var(--tbe-space-3);
	left: var(--tbe-space-3);
	z-index: 999;
	width: auto;
	height: auto;
	padding: var(--tbe-space-3) var(--tbe-space-5);
	clip: auto;
	clip-path: none;
	border-radius: var(--tbe-radius-sm);
	background: var(--tbe-ink);
	color: var(--tbe-white);
	box-shadow: var(--tbe-shadow-md);
	font-weight: 600;
	text-decoration: none;
}

/* WordPress core alignment classes -------------------------------------- */
.wp-block-image img {
	border-radius: var(--tbe-radius-sm);
}

.sticky {
	position: relative;
}

.bypostauthor > .comment-body {
	border-left: 3px solid var(--tbe-accent);
	padding-left: var(--tbe-space-4);
}
