/* Base: reset and element typography.
   Everything here is a bare element selector (specificity 0,0,1) so that any class, including
   Elementor's and the block library's, wins without a fight. */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--lbs-space-6);
}

body {
	margin: 0;
	font-family: var(--lbs-font);
	font-size: var(--lbs-fs-md);
	font-weight: 400;
	line-height: var(--lbs-lh-body);
	color: var(--lbs-text);
	background: var(--lbs-white);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--lbs-space-2);
	font-weight: 700;
	line-height: var(--lbs-lh-heading);
	/* Icelandic compounds are long; lang="is" on <html> makes this work. */
	hyphens: auto;
	text-wrap: balance;
}
h1 { font-size: var(--lbs-fs-2xl); }
h2 { font-size: var(--lbs-fs-xl); }
h3 { font-size: var(--lbs-fs-lg); }
h4, h5, h6 { font-size: var(--lbs-fs-md); }

p, ul, ol, dl, blockquote, pre, table, figure, address, details { margin: 0 0 var(--lbs-space-4); }
ul, ol { padding-left: var(--lbs-space-5); }
li > ul, li > ol { margin-bottom: 0; }
dt { font-weight: 700; }
dd { margin: 0 0 var(--lbs-space-2); }
address { font-style: normal; }

/* Links in the chrome are plain and turn red on hover (the house style). Links inside running
   text are underlined as well: see content.css. A link that WordPress draws as a button (the Button
   block, the File block's download button: class wp-element-button, or only wp-block-button__link in
   Button blocks saved before WordPress 6.1) is left to the button's own hover colours from theme.json,
   which WordPress writes as ":root :where(...)", lighter than "a:hover": this rule beat them and turned
   the text red on the dark red hover ground. :where keeps this rule's weight as it was. */
a {
	color: inherit;
	text-decoration: none;
	transition: color var(--lbs-transition);
}
a:where(:not(.wp-element-button, .wp-block-button__link)):hover { color: var(--lbs-red); }

b, strong { font-weight: 700; }
small { font-size: var(--lbs-fs-xs); }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
abbr[title] { text-decoration: underline dotted; cursor: help; }
mark { background: none; color: var(--lbs-red); font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--lbs-border); margin: var(--lbs-space-6) 0; }

img, svg, video, canvas, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
img { vertical-align: middle; border-style: none; }
figure { margin-left: 0; margin-right: 0; }

code, kbd, samp, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
}
pre {
	overflow: auto;
	padding: var(--lbs-space-4);
	background: var(--lbs-panel);
	border: 1px solid var(--lbs-border);
}

table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 700; }

/* Without weight (":where"), so that any rule for a control, however light, outweighs it. */
:where(button, input, select, textarea) {
	font: inherit;
	color: inherit;
	margin: 0;
}
button, [type="button"], [type="submit"], [type="reset"] { cursor: pointer; }
[hidden] { display: none !important; }

/* Focus: always visible, never removed. Blue, so it never reads as a hover or "current page" mark
   (both red); white on red and dark surfaces, where blue would not show. */
:focus-visible {
	outline: var(--lbs-focus-ring) solid var(--lbs-focus);
	outline-offset: 2px;
}
:is(.has-accent-background-color, .has-accent-dark-background-color, .has-dark-background-color) :focus-visible { outline-color: var(--lbs-white); }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
