/*!
Theme Name: Asustus
Theme URI: 
Author: Andres Väiko
Author URI: 
Description: underscores.me baasil loodud teema teadusartikli avaldamiseks. 
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: asustus
Tags: 

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

Asustus is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Design Tokens (Colors + Typography)
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Design Tokens — Colors & Typography
--------------------------------------------------------------*/

:root {
	/* Primary Blues
	   #E5EFFE on white = decorative only (1.1:1)
	   #5396FB on white = 3.2:1 — AA large text only
	   #0062F5 on white = 4.6:1 — AA normal text
	   #004DBF on white = 6.5:1 — AA / AAA large text
	   #323334 on white = 12.6:1 — AAA
	*/

	/* --- Brand palette --- */
	--color-primary-50:  #E5EFFE; /* hsl(216, 93%, 95%) — light background tint */
	--color-primary-300: #5396FB; /* hsl(216, 96%, 65%) — decorative, large text */
	--color-heading-blue: #5396FB;
	--color-primary-500: #0062F5; /* hsl(216, 100%, 48%) — links, buttons, CTA */
	--color-primary-700: #004DBF; /* hsl(216, 100%, 37%) — hover / pressed */
	--color-primary-900: #003A91; /* hsl(216, 100%, 28%) — active states */

	--color-accent-500:  #964542; /* hsl(2, 38%, 42%) — accent, alerts (5.2:1 on white) */
	--color-accent-600:  #7A3836; /* hsl(2, 38%, 35%) — accent hover */
	--color-accent-700:  #5F2B2A; /* hsl(1, 38%, 27%) — accent active */

	--color-neutral-900: #323334; /* hsl(220, 2%, 20%) — body text, headings */
	--color-neutral-700: #4A4B4D; /* hsl(220, 2%, 30%) — secondary text */
	--color-neutral-500: #6B6C6E; /* hsl(220, 2%, 42%) — captions, muted text */
	--color-neutral-300: #A0A1A3; /* hsl(220, 2%, 63%) — disabled, placeholders */
	--color-neutral-200: #D0D1D3; /* hsl(220, 2%, 82%) — borders */
	--color-neutral-100: #EDEDEE; /* hsl(240, 4%, 93%) — subtle backgrounds */
	--color-neutral-50:  #F7F7F8; /* hsl(240, 7%, 97%) — lightest background */
	--color-white:       #FFFFFF;

	/* --- Semantic tokens --- */
	--color-text:            var(--color-neutral-900);
	--color-text-secondary:  var(--color-neutral-700);
	--color-text-muted:      var(--color-neutral-500);

	--color-link:            var(--color-primary-500);
	--color-link-hover:      var(--color-primary-700);
	--color-link-visited:    var(--color-accent-500);

	--color-bg:              var(--color-white);
	--color-bg-alt:          var(--color-primary-50);
	--color-bg-code:         var(--color-neutral-100);

	--color-border:          var(--color-neutral-200);
	--color-border-focus:    var(--color-primary-300);

	--color-btn-bg:          var(--color-primary-500);
	--color-btn-bg-hover:    var(--color-primary-700);
	--color-btn-bg-active:   var(--color-primary-900);
	--color-btn-text:        var(--color-white);

	--color-focus-ring:      var(--color-primary-300);
	--color-figure-accent:   var(--color-accent-500);
	--color-list-accent:     var(--color-primary-300);
	--color-quote-border:    var(--color-primary-300);
	--color-quote-text:      var(--color-accent-500);
	--color-quote-bg:        #F0F6FF;

	/* ===================================================
	   Typography
	   =================================================== */

	/* --- Font families --- */
	--font-heading:    "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-body:       "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen-Sans, Ubuntu, sans-serif;
	--font-body-flex:  "Roboto Flex", "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
	--font-condensed:  "Roboto Condensed", "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
	--font-mono:       "Courier 10 Pitch", Consolas, Monaco, monospace;

	/* --- Modular scale (major third ×1.25, base 1rem = 16px) --- */
	--font-size-xs:    0.75rem;   /* 12px — fine print, captions */
	--font-size-sm:    0.875rem;  /* 14px — small text, labels */
	--font-size-base:  1rem;      /* 16px — body text */
	--font-size-md:    1.125rem;  /* 18px — B intro / B1 */
	--font-size-lg:    1.25rem;   /* 20px — lead text, B2 */
	--font-size-xl:    1.563rem;  /* 25px — H5 */
	--font-size-2xl:   1.953rem;  /* 31px — H4 */
	--font-size-3xl:   2.441rem;  /* 39px — H3 */
	--font-size-4xl:   3.052rem;  /* 49px — H2 */
	--font-size-5xl:   3.815rem;  /* 61px — H1 */

	/* --- Line heights --- */
	--leading-tight:   1.2;
	--leading-snug:    1.35;
	--leading-normal:  1.6;
	--leading-relaxed: 1.75;

	/* --- Font weights --- */
	--weight-regular:  400;
	--weight-medium:   500;
	--weight-bold:     700;

	/* --- Letter spacing --- */
	--tracking-tight:  -0.02em;
	--tracking-normal:  0;
	--tracking-wide:    0.02em;
	--tracking-wider:   0.05em;
}

/*--------------------------------------------------------------
# Theme Modes — Dim & Dark overrides
--------------------------------------------------------------*/

/* Dim mode — warm, reduced-contrast, sepia-tinted */
html[data-theme="dim"] {
	--color-primary-50:  #f0e8d8;
	--color-primary-300: #7a8fa8;
	--color-heading-blue: #3a6d9e;
	--color-primary-500: #2a6496;
	--color-primary-700: #1e4f78;
	--color-primary-900: #163a5a;

	--color-accent-500:  #8a4038;
	--color-accent-600:  #703530;
	--color-accent-700:  #582a25;

	--color-neutral-900: #3b3228;
	--color-neutral-700: #5c4f3d;
	--color-neutral-500: #7a6e5d;
	--color-neutral-300: #a89c8c;
	--color-neutral-200: #d4c9b8;
	--color-neutral-100: #e8dfce;
	--color-neutral-50:  #f0e8d8;
	--color-white:       #f4ead5;

	--color-bg:          #f4ead5;
	--color-bg-alt:      #ebe1cc;
	--color-bg-code:     #e4d9c4;
	--color-border:      #d4c9b8;
	--color-quote-bg:    #ebe1cc;
	--color-list-accent: var(--color-primary-500);
}

/* Dark mode — true dark palette */
html[data-theme="dark"] {
	--color-primary-50:  #1e2a3a;
	--color-primary-300: #6ea8f0;
	--color-heading-blue: #6ea8f0;
	--color-primary-500: #4d94e8;
	--color-primary-700: #6ea8f0;
	--color-primary-900: #8abcf8;

	--color-accent-500:  #d4837f;
	--color-accent-600:  #c07270;
	--color-accent-700:  #e09a97;

	--color-neutral-900: #e8e8e8;
	--color-neutral-700: #c0c0c0;
	--color-neutral-500: #999999;
	--color-neutral-300: #666666;
	--color-neutral-200: #3a3a4a;
	--color-neutral-100: #252535;
	--color-neutral-50:  #1e1e2e;
	--color-white:       #1a1a2e;

	--color-bg:          #1a1a2e;
	--color-bg-alt:      #1e2a3a;
	--color-bg-code:     #252535;
	--color-border:      #3a3a4a;
	--color-quote-bg:    #1e2a3a;

	--color-focus-ring:  rgba(77, 148, 232, 0.5);
}

/* Dark mode — hardcoded color overrides */
html[data-theme="dark"] .search-overlay__input,
html[data-theme="dark"] .search-overlay__item,
html[data-theme="dark"] .mobile-search__form,
html[data-theme="dark"] .ref-popover {
	background: var(--color-neutral-100);
	color: var(--color-neutral-900);
}

html[data-theme="dark"] .search-overlay__input {
	border-color: var(--color-border);
}

html[data-theme="dark"] .search-overlay__input:focus {
	box-shadow: 0 0 0 3px rgba(77, 148, 232, 0.3);
}

html[data-theme="dark"] .search-page-highlight {
	background: #5c4e00;
	color: #fef08a;
}

html[data-theme="dark"] .site-footer {
	background: #111122;
}

html[data-theme="dark"] {
	background: #111122;
}

html[data-theme="dark"] .footer-widgets {
	border-bottom-color: #2a2a3a;
}

html[data-theme="dark"] .footer-related__eyebrow,
html[data-theme="dark"] .footer-related__title,
html[data-theme="dark"] a.footer-related__title:visited {
	color: #c8cdd6;
}

html[data-theme="dark"] a.footer-related__title:hover,
html[data-theme="dark"] a.footer-related__title:focus-visible {
	color: #e8ecf2;
}

/* Dim mode — hardcoded color overrides */
html[data-theme="dim"] .search-overlay__input,
html[data-theme="dim"] .search-overlay__item,
html[data-theme="dim"] .mobile-search__form,
html[data-theme="dim"] .ref-popover {
	background: var(--color-white);
	color: var(--color-neutral-900);
}

html[data-theme="dim"] .search-page-highlight {
	background: #f5e6a3;
	color: #3b3228;
}

html[data-theme="dim"] .site-footer {
	background: #3b3228;
}

html[data-theme="dim"] .footer-widgets {
	border-bottom-color: #5c4f3d;
}

/* Theme toggle button in header */
.theme-toggle {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0.5rem;
	color: var(--color-neutral-500);
	cursor: pointer;
	transition: color 0.2s ease;
	margin-left: 0.25rem;
}

.theme-toggle:hover {
	color: var(--color-white);
}

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
	 ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */
html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
	overflow-anchor: auto;
}

/* Sections
	 ========================================================================== */

/**
 * Remove the margin in all browsers.
 */
body {
	margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */
main {
	display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 * (Font size now controlled by typography system.)
 */
h1 {
	margin: 0.67em 0;
}

/* Grouping content
	 ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
	box-sizing: content-box;
	height: 0;
	overflow: visible;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
pre {
	font-family: monospace, monospace;
	font-size: 1em;
}

/* Text-level semantics
	 ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */
a {
	background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
	border-bottom: none;
	text-decoration: underline;
	text-decoration: underline dotted;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
	font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code,
kbd,
samp {
	font-family: monospace, monospace;
	font-size: 1em;
}

/**
 * Add the correct font size in all browsers.
 */
small {
	font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

/* Embedded content
	 ========================================================================== */

/**
 * Remove the border on images inside links in IE 10.
 */
img {
	border-style: none;
}

/* Forms
	 ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
button,
input {
	overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
button,
select {
	text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
	outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */
fieldset {
	padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *		`fieldset` elements in all browsers.
 */
legend {
	box-sizing: border-box;
	color: inherit;
	display: table;
	max-width: 100%;
	padding: 0;
	white-space: normal;
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
	vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */
textarea {
	overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */
[type="checkbox"],
[type="radio"] {
	box-sizing: border-box;
	padding: 0;
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
[type="search"] {
	-webkit-appearance: textfield;
	outline-offset: -2px;
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */
[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */
::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

/* Interactive
	 ========================================================================== */

/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */
details {
	display: block;
}

/*
 * Add the correct display in all browsers.
 */
summary {
	display: list-item;
}

/* Misc
	 ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */
template {
	display: none;
}

/**
 * Add the correct display in IE 10.
 */
[hidden] {
	display: none;
}

/* Box sizing
--------------------------------------------- */

/* Inherit box-sizing to more easily change it's value on a component level.
@link http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box;
	overflow-x: hidden;
}

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/

/* Typography
--------------------------------------------- */
body,
button,
input,
select,
optgroup,
textarea {
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--font-size-base);
	line-height: var(--leading-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	clear: both;
	font-family: var(--font-heading);
	color: var(--color-neutral-900);
	line-height: var(--leading-tight);
	scroll-margin-top: calc(var(--header-h) + 1rem);
	letter-spacing: var(--tracking-tight);
	margin-top: 0;
	margin-bottom: 0.5em;
}

h1 {
	font-size: var(--font-size-5xl);
	font-weight: var(--weight-bold);
	color: var(--color-heading-blue, #5396FB);
}

h2 {
	font-size: var(--font-size-4xl);
	font-weight: var(--weight-bold);
}

h3 {
	font-size: var(--font-size-3xl);
	font-weight: var(--weight-medium);
	margin-top: 2em;
	color: var(--color-heading-blue, #5396FB);
}

h4 {
	font-size: var(--font-size-2xl);
	font-weight: var(--weight-bold);
	color: var(--color-heading-blue, #5396FB);
}

h5 {
	font-size: var(--font-size-xl);
	font-weight: 400;
	color: var(--color-accent-500);
}

h6 {
	font-size: var(--font-size-md);
	font-weight: var(--weight-bold);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: var(--color-neutral-900);
}

p {
	margin-bottom: 1.5em;
}

.lead {
	font-family: var(--font-heading);
	font-weight: var(--weight-bold);
	font-size: var(--font-size-lg);
	line-height: var(--leading-snug);
}

.body-intro {
	font-family: var(--font-body-flex);
	font-size: var(--font-size-md);
	line-height: var(--leading-normal);
}

.body-lead {
	font-family: var(--font-body);
	font-weight: var(--weight-bold);
	font-size: var(--font-size-base);
	line-height: var(--leading-normal);
}

.text-condensed {
	font-family: var(--font-condensed);
	font-weight: var(--weight-regular);
}

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

blockquote {
	margin: 2.5rem 0;
	padding: 1.75rem 2rem 1.75rem 2.25rem;
	border: none;
	border-top: 3px dashed var(--color-quote-border);
	border-bottom: 3px dashed var(--color-quote-border);
	background: var(--color-quote-bg);
	font-family: var(--font-body);
	font-size: var(--font-size-xl);
	font-style: normal;
	font-weight: 400;
	line-height: 1.65;
	color: var(--color-quote-text);
}

blockquote p:first-child {
	margin-top: 0;
}

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

/* Gutenberg quote & pull quote blocks */
.entry-content .wp-block-quote,
.page-article__content-inner .wp-block-quote,
.entry-content .wp-block-pullquote,
.page-article__content-inner .wp-block-pullquote {
	margin: 2.5rem 0;
	padding: 1.75rem 2rem 1.75rem 2.25rem;
	border: none;
	border-top: 3px dashed var(--color-quote-border);
	border-bottom: 3px dashed var(--color-quote-border);
	background: var(--color-quote-bg);
	font-size: var(--font-size-xl);
	font-style: normal;
	font-weight: 400;
	line-height: 1.65;
	color: var(--color-quote-text);
}

.entry-content .wp-block-quote p:first-child,
.page-article__content-inner .wp-block-quote p:first-child,
.entry-content .wp-block-pullquote p:first-child,
.page-article__content-inner .wp-block-pullquote p:first-child {
	margin-top: 0;
}

.entry-content .wp-block-quote p:last-child,
.page-article__content-inner .wp-block-quote p:last-child,
.entry-content .wp-block-pullquote p:last-child,
.page-article__content-inner .wp-block-pullquote p:last-child {
	margin-bottom: 0;
}

.entry-content .wp-block-pullquote,
.page-article__content-inner .wp-block-pullquote {
	text-align: left;
}

.entry-content .wp-block-quote cite,
.entry-content .wp-block-pullquote cite,
.page-article__content-inner .wp-block-quote cite,
.page-article__content-inner .wp-block-pullquote cite {
	font-size: var(--font-size-sm);
	font-style: normal;
	color: var(--color-text-secondary);
}

/* Person quote — style variant 2 */
.wp-block-quote.is-style-person-quote {
	display: flex;
	flex-direction: column;
	border: none;
	background: transparent;
	padding: 0;
	margin: 2.5rem 0;
}

.wp-block-quote.is-style-person-quote cite {
	order: -1;
	display: block;
	margin-bottom: 0.5rem;
	font-size: 1.0625rem;
	font-style: normal;
	font-weight: var(--weight-bold);
	color: var(--color-primary-700);
	letter-spacing: 0.02em;
}

.wp-block-quote.is-style-person-quote cite::before {
	content: none;
}

.wp-block-quote.is-style-person-quote p {
	font-size: 1.125rem;
	font-style: italic;
	line-height: 1.65;
	color: var(--color-quote-text);
	background: var(--color-quote-bg);
	padding: 1.5rem 2rem 1.5rem 3rem;
	border-top: 3px dashed var(--color-quote-border);
	border-bottom: 3px dashed var(--color-quote-border);
	position: relative;
}

.wp-block-quote.is-style-person-quote p::before {
	content: '\201C';
	font-family: Georgia, serif;
	font-size: 3.5rem;
	line-height: 1;
	color: var(--color-primary-300);
	position: absolute;
	top: 0.75rem;
	left: 0.5rem;
}

/* Small text quote variant */
.wp-block-quote.is-style-small-text {
	font-size: var(--font-size-md);
	line-height: 1.55;
	color: var(--color-text);
}

address {
	margin: 0 0 1.5em;
}

pre {
	background: var(--color-bg-code);
	font-family: var(--font-mono);
	font-size: var(--font-size-sm);
	line-height: var(--leading-normal);
	margin-bottom: 1.6em;
	max-width: 100%;
	overflow: auto;
	padding: 1.6em;
	border-radius: 0;
}

code,
kbd,
tt,
var {
	font-family: var(--font-mono);
	font-size: 0.9375em;
}

abbr,
acronym {
	border-bottom: 1px dotted var(--color-text-muted);
	cursor: help;
}

mark,
ins {
	background: var(--color-primary-50);
	text-decoration: none;
}

big {
	font-size: 125%;
}

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

.text-xs {
	font-size: var(--font-size-xs);
}

/* Responsive typography */
@media screen and (max-width: 48em) {
	:root {
		--font-size-5xl: 2.5rem;    /* 40px */
		--font-size-4xl: 2rem;      /* 32px */
		--font-size-3xl: 1.75rem;   /* 28px */
		--font-size-2xl: 1.5rem;    /* 24px */
		--font-size-xl:  1.25rem;   /* 20px */
	}
}

@media screen and (max-width: 30em) {
	:root {
		--font-size-5xl: 2rem;      /* 32px */
		--font-size-4xl: 1.75rem;   /* 28px */
		--font-size-3xl: 1.5rem;    /* 24px */
		--font-size-2xl: 1.25rem;   /* 20px */
		--font-size-xl:  1.125rem;  /* 18px */
	}
}

/* Elements
--------------------------------------------- */
body {
	background: var(--color-bg);
}

hr,
hr.wp-block-separator,
.wp-block-separator {
	background: none !important;
	border: none !important;
	border-top: 3px dashed var(--color-figure-accent) !important;
	height: 0 !important;
	margin: 2.5rem 0 !important;
	opacity: 1 !important;
}

ul,
ol {
	margin: 0 0 1.5em 3em;
}

ul {
	list-style: disc;
}

ol {
	list-style: decimal;
}

li > ul,
li > ol {
	margin-bottom: 0;
	margin-left: 1.5em;
}

/* Prevent horizontal overflow inside content (long URLs in bibliography,
   oversized images, etc. that would otherwise force the page wider than
   the viewport and reveal a band of background to the right on mobile). */
.entry-content,
.page-article__content-inner {
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.entry-content a,
.page-article__content-inner a {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.entry-content img,
.entry-content iframe,
.entry-content video,
.page-article__content-inner img,
.page-article__content-inner iframe,
.page-article__content-inner video {
	max-width: 100%;
	height: auto;
}

/* MathJax-rendered equations: keep wide display math from forcing the
   page wider than the viewport. The actual scale-to-fit is done by
   js/math-fit.js so equations shrink to the column width instead of
   scrolling. The CSS just provides a safe baseline. */
.entry-content mjx-container,
.page-article__content-inner mjx-container {
	max-width: 100%;
}

/* Content list styling — blue markers & bold lead-in */
.entry-content ul,
.entry-content ol,
.page-article__content-inner ul,
.page-article__content-inner ol {
	margin-left: 0;
	padding-left: 1.5rem;
}

.entry-content li,
.page-article__content-inner li {
	margin-bottom: 1.125rem;
}

.entry-content li::marker,
.page-article__content-inner li::marker {
	color: var(--color-list-accent);
	font-weight: 700;
}

.entry-content li strong,
.page-article__content-inner li strong {
	color: var(--color-list-accent);
}

/* Plain list style — no bullets or numbers */
.entry-content ul.is-style-plain,
.entry-content ol.is-style-plain,
.page-article__content-inner ul.is-style-plain,
.page-article__content-inner ol.is-style-plain {
	list-style: none;
}

/* Alpha-numeric list styles: A1, A2... / B1, B2... etc. */
.is-style-alpha-num,
.is-style-alpha-num-b,
.is-style-alpha-num-c,
.is-style-alpha-num-d {
	list-style: none !important;
	counter-reset: alpha-list;
	margin-left: 0;
}

.is-style-alpha-num > li,
.is-style-alpha-num-b > li,
.is-style-alpha-num-c > li,
.is-style-alpha-num-d > li {
	counter-increment: alpha-list;
	padding-left: 2.5em;
	position: relative;
}

.is-style-alpha-num > li::before,
.is-style-alpha-num-b > li::before,
.is-style-alpha-num-c > li::before,
.is-style-alpha-num-d > li::before {
	position: absolute;
	left: 0;
	font-weight: var(--weight-bold);
	color: var(--color-list-accent);
}

/* Custom prefix override — applies to any list style */
li[data-prefix] {
	list-style: none !important;
}

li[data-prefix]::before {
	content: attr(data-prefix) !important;
	position: absolute;
	left: 0;
	font-weight: var(--weight-bold);
	color: var(--color-list-accent);
}

li[data-prefix] {
	padding-left: 2.5em;
	position: relative;
}

.is-style-alpha-num > li::before {
	content: "A" counter(alpha-list);
}

.is-style-alpha-num-b > li::before {
	content: "B" counter(alpha-list);
}

.is-style-alpha-num-c > li::before {
	content: "C" counter(alpha-list);
}

.is-style-alpha-num-d > li::before {
	content: "D" counter(alpha-list);
}

/* Numeric prefix list styles: 1.1, 1.2... / 2.1, 2.2... etc. */
[class*="is-style-num-prefix-"] {
	list-style: none !important;
	counter-reset: num-list;
	margin-left: 0;
}

[class*="is-style-num-prefix-"] > li {
	counter-increment: num-list;
	padding-left: 2.5em;
	position: relative;
}

[class*="is-style-num-prefix-"] > li::before {
	position: absolute;
	left: 0;
	font-weight: var(--weight-bold);
	color: var(--color-list-accent);
}

.is-style-num-prefix-1 > li::before { content: "1." counter(num-list); }
.is-style-num-prefix-2 > li::before { content: "2." counter(num-list); }
.is-style-num-prefix-3 > li::before { content: "3." counter(num-list); }
.is-style-num-prefix-4 > li::before { content: "4." counter(num-list); }
.is-style-num-prefix-5 > li::before { content: "5." counter(num-list); }
.is-style-num-prefix-6 > li::before { content: "6." counter(num-list); }
.is-style-num-prefix-7 > li::before { content: "7." counter(num-list); }
.is-style-num-prefix-8 > li::before { content: "8." counter(num-list); }
.is-style-num-prefix-9 > li::before { content: "9." counter(num-list); }

/* Large number list — for conclusions */
.is-style-large-number {
	list-style: none !important;
	counter-reset: large-num var(--start-val, 0);
	margin-left: 0 !important;
	padding-left: 0 !important;
}

.is-style-large-number > li {
	counter-increment: large-num;
	padding-left: 3rem;
	position: relative;
	margin-bottom: 1.5rem;
}

.is-style-large-number > li::before {
	content: counter(large-num) ".";
	position: absolute;
	left: 0;
	top: 0.35em;
	font-size: 2rem;
	font-weight: var(--weight-bold);
	line-height: 1;
	color: var(--color-accent-500);
}

.is-style-large-number > li strong {
	color: var(--color-accent-500);
}

/* Suur number (jätk) — same indent, no numbers */
.is-style-large-number-plain {
	list-style: none !important;
	margin-left: 0 !important;
	padding-left: 3rem !important;
}

.is-style-large-number-plain > li {
	padding-left: 0;
	margin-bottom: 1.5rem;
}

.is-style-large-number-plain > li::before {
	display: none;
}

.is-style-large-number-plain > li strong {
	color: var(--color-accent-500);
}

dt {
	font-weight: 700;
}

dd {
	margin: 0 1.5em 1.5em;
}

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

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

figure {
	margin: 1em 0;
}

table {
	margin: 0 0 1.5em;
	width: 100%;
}

/* Links
--------------------------------------------- */
a {
	color: var(--color-link);
}

a:visited {
	color: var(--color-link-visited);
}

a:hover,
a:focus,
a:active {
	color: var(--color-link-hover);
}

a:focus {
	outline: none;
}

a:hover,
a:active {
	outline: 0;
}

/* Forms
--------------------------------------------- */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border: none;
	border-radius: 0;
	background: var(--color-btn-bg);
	color: var(--color-btn-text);
	line-height: 1;
	padding: 0.6em 1.2em 0.5em;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
	background: var(--color-btn-bg-hover);
}

button:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active {
	background: var(--color-btn-bg-active);
}

button:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
input[type="submit"]:focus {
	outline: none;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
	color: var(--color-text-secondary);
	border: 1px solid var(--color-border);
	border-radius: 0;
	padding: 0.5em 0.75em;
	transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus {
	color: var(--color-text);
	border-color: var(--color-border-focus);
	outline: none;
}

select {
	border: 1px solid var(--color-border);
}

textarea {
	width: 100%;
}

/*--------------------------------------------------------------
# Layouts
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/* Sidebar Navigation
--------------------------------------------- */

:root {
	--sidebar-collapsed-w: 3.5rem;   /* 56px — just the hamburger icon */
	--sidebar-open-w:      18.75rem; /* 300px — full menu */
	--header-h:            4rem;     /* 64px */
}

html {
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

/* Prevent transition flash on page load */
.no-transitions,
.no-transitions *,
.no-transitions .site-wrapper {
	transition: none !important;
}

/* --- The sidebar itself --- */
.sidebar-nav {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--sidebar-collapsed-w);
	background: var(--color-primary-50);
	border-right: 1px solid var(--color-border);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav.is-open {
	width: var(--sidebar-open-w);
	overflow-y: auto;
}

/* Collapsed state: act as a clickable strip */
.sidebar-nav:not(.is-open) {
	cursor: pointer;
}

/* --- Header row (logo + toggle button) --- */
.sidebar-nav__header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	height: var(--header-h);
	padding-right: 0.75rem;
	flex-shrink: 0;
	overflow: visible;
}

/* --- Sidebar Logo --- */
.sidebar-nav__logo-img {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 0.5rem;
	height: calc(var(--header-h) + 1rem);
	width: auto;
	object-fit: contain;
	z-index: 1;
}

.sidebar-nav.is-open .sidebar-nav__menu {
	padding-top: 2rem;
}

/* Collapsed: hide logo to save space */
.sidebar-nav:not(.is-open) .sidebar-nav__logo-img {
	display: none;
}

.sidebar-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
	color: var(--color-neutral-900);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav__toggle:hover {
	background: none;
	color: inherit;
}

.sidebar-nav__toggle:focus {
	outline: none;
}

/* Icon swap: show hamburger when collapsed, X when open */
.sidebar-nav__icon--close {
	display: none;
}

.sidebar-nav.is-open .sidebar-nav__icon--open {
	display: none;
}

.sidebar-nav.is-open .sidebar-nav__icon--close {
	display: block;
}

/* --- Menu area (hidden when collapsed) --- */
.sidebar-nav__menu {
	padding: 0.5rem 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease 0s, visibility 0.2s ease 0s;
}

.sidebar-nav.is-open .sidebar-nav__menu {
	opacity: 1;
	visibility: visible;
	transition-delay: 0.15s;
}

.sidebar-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar-nav__list li {
	margin: 0;
}

.sidebar-nav__list a {
	display: block;
	padding: 0.6rem 1.25rem;
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	font-weight: var(--weight-regular);
	color: var(--color-neutral-700);
	text-decoration: none;
	white-space: normal;
	word-wrap: break-word;
	transition: background-color 0.15s ease, color 0.15s ease;
	border-left: 3px solid transparent;
}

.sidebar-nav__list a:visited {
	color: var(--color-neutral-700);
}

.sidebar-nav__list a:hover {
	background: var(--color-bg-alt);
	color: var(--color-primary-500);
}

.sidebar-nav__list .current-menu-item > a,
.sidebar-nav__list .current-menu-ancestor > a {
	color: var(--color-primary-500);
	font-weight: var(--weight-bold);
	border-left-color: var(--color-primary-500);
	background: var(--color-bg-alt);
}

/* Section headings (add CSS class "menu-heading" to menu items) */
.sidebar-nav__heading {
	display: block;
	padding: 1.25rem 1.25rem 0.4rem;
	font-family: var(--font-heading);
	font-size: var(--font-size-xs);
	font-weight: var(--weight-bold);
	color: var(--color-neutral-500);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wider);
	white-space: nowrap;
}

/* Sub-menus */
.sidebar-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.sidebar-nav__list .submenu-open > .sub-menu {
	max-height: 200rem;
}

.sidebar-nav__list .sub-menu a {
	padding-left: 2.25rem;
	font-size: var(--font-size-xs);
}

.sidebar-nav__list .sub-menu .sub-menu a {
	padding-left: 3.25rem;
}

/* H3 anchor items in sidebar menu */
.menu-item-h3-anchor > a {
	font-size: var(--font-size-2xs, 0.75rem);
	color: var(--color-text-muted);
}

.menu-item-h3-anchor.is-active-section > a {
	color: var(--color-primary-500) !important;
	font-weight: 700;
}

/* Sub-menu toggle button */
.sidebar-nav__submenu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	position: absolute;
	right: 0.75rem;
	top: 0.45rem;
	background: none;
	border: none;
	border-radius: 0;
	color: var(--color-neutral-500);
	cursor: pointer;
	transition: transform 0.2s ease, color 0.15s ease;
}

.sidebar-nav__submenu-toggle:hover {
	color: var(--color-primary-500);
	background: var(--color-bg-alt);
}

.sidebar-nav__submenu-toggle:focus {
	outline: none;
}

.submenu-open > .sidebar-nav__submenu-toggle {
	transform: rotate(180deg);
}

.sidebar-nav__list .menu-item-has-children {
	position: relative;
}

.sidebar-nav__list .menu-item-has-children > a {
	padding-right: 3rem;
}

/* Fallback text */
.sidebar-nav__fallback {
	padding: 1.25rem;
	font-size: var(--font-size-sm);
	color: var(--color-text-muted);
	white-space: nowrap;
}

/* --- Site wrapper offset — pushes with sidebar --- */
.site-wrapper {
	margin-left: var(--sidebar-collapsed-w);
	min-height: 100vh;
	overflow-x: clip;
	transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav.is-open ~ .site-wrapper {
	margin-left: var(--sidebar-open-w);
}

/* Mobile menu toggle (hidden on desktop, visible on mobile) */
.mobile-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	margin-right: 0.5rem;
	background: none;
	border: none;
	color: var(--color-neutral-900);
	cursor: pointer;
	flex-shrink: 0;
}

.mobile-menu-toggle:focus {
	outline: none;
}

.mobile-menu-toggle:hover {
	background: none;
	color: inherit;
}

.mobile-menu-toggle,
.sidebar-nav__toggle {
	-webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle__icon--close {
	display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__icon--open {
	display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__icon--close {
	display: block;
}

/* Site Header
--------------------------------------------- */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-h);
	padding: 0 1.5rem;
	background: var(--color-primary-50);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.site-branding .custom-logo-link {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.site-branding .custom-logo {
	height: 2.5rem;
	width: auto;
	max-width: 12rem;
}

.site-title {
	font-family: var(--font-heading);
	font-size: var(--font-size-lg);
	font-weight: var(--weight-bold);
	line-height: var(--leading-tight);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
}

.site-title a {
	color: var(--color-neutral-900);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--color-primary-500);
}

.site-title a:visited {
	color: var(--color-neutral-900);
}

.site-description {
	display: none;
}

/* Header search toggle button */
.search-toggle {
	flex-shrink: 0;
	margin-left: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0.5rem;
	color: var(--color-neutral-500);
	cursor: pointer;
	transition: color 0.2s ease;
}

.search-toggle:hover {
	color: var(--color-white);
}

/* Search Overlay */
.search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.95));
	display: flex;
	justify-content: center;
	z-index: 9999;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

.search-overlay__container {
	width: 100%;
	max-width: 700px;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}

.search-overlay__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
	flex-shrink: 0;
}

.search-overlay__close {
	background: none;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 6px;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

.search-overlay__close:hover {
	opacity: 1;
}

.search-overlay__title {
	color: #ffffff;
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
	text-align: left;
}

.search-overlay__form {
	display: flex;
	gap: 0.5rem;
	flex-shrink: 0;
}

.search-overlay__input {
	flex: 1;
	width: 100%;
	padding: 1rem 1.5rem;
	font-size: 1.25rem;
	border: 2px solid var(--color-primary-500);
	border-radius: 4px;
	background: #ffffff;
	color: var(--color-neutral-900);
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-overlay__input::placeholder {
	color: var(--color-neutral-300);
}

.search-overlay__input:focus {
	border-color: var(--color-primary-500);
	box-shadow: 0 0 0 3px rgba(0, 98, 245, 0.2);
}

.search-overlay__submit {
	padding: 0 1.25rem;
	background: var(--color-primary-500);
	border: none;
	border-radius: 4px;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.search-overlay__submit:hover {
	background: var(--color-primary-700);
}

.search-overlay__results {
	margin-top: 1.5rem;
	flex: 1;
	overflow-y: auto;
	min-height: 0;
}

.search-overlay__list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.search-overlay__item {
	margin-bottom: 0.5rem;
	background: #ffffff;
	border-radius: 4px;
	overflow: hidden;
}

.search-overlay__link {
	display: block;
	padding: 1rem 1.25rem 0.75rem;
	color: var(--color-neutral-900);
	text-decoration: none;
	transition: background 0.2s ease;
}

.search-overlay__link:hover {
	background: var(--color-neutral-50);
}

.search-overlay__excerpt-link {
	display: block;
	padding: 0.375rem 1.25rem;
	color: var(--color-neutral-900);
	text-decoration: none;
	border-top: 1px solid var(--color-neutral-100);
	transition: background 0.2s ease;
}

.search-overlay__excerpt-link:last-child {
	padding-bottom: 0.75rem;
}

.search-overlay__excerpt-link:hover {
	background: var(--color-neutral-50);
}

.search-overlay__item-type {
	display: inline-block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-neutral-500);
	background: var(--color-neutral-100);
	padding: 0.125rem 0.5rem;
	border-radius: 3px;
	margin-bottom: 0.375rem;
}

.search-overlay__item-title {
	display: block;
	font-weight: 600;
	color: var(--color-primary-500);
	margin-bottom: 0.25rem;
}

.search-overlay__item-excerpt {
	display: block;
	font-size: 0.875rem;
	color: var(--color-neutral-500);
	line-height: 1.5;
	max-height: calc( 1.5em * 3 );
	overflow: hidden;
}

/* Search term highlight (overlay) */
.search-highlight {
	background: var(--color-primary-50);
	color: var(--color-primary-700);
	padding: 0.05em 0.15em;
	border-radius: 2px;
}

/* Search term highlight (on page) */
.search-page-highlight {
	background: #ffcc80;
	color: inherit;
	padding: 0.1em 0.2em;
	border-radius: 2px;
}

.search-overlay__no-results,
.search-overlay__error {
	text-align: center;
	color: rgba(255, 255, 255, 0.8);
	padding: 2rem;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 4px;
}

.search-overlay__loading {
	text-align: center;
	padding: 2rem;
}

.search-overlay__loading .spinner {
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: asustus-spin 0.8s linear infinite;
}

@keyframes asustus-spin {
	to { transform: rotate(360deg); }
}

/* Mobile Search in Sidebar */
.mobile-search {
	display: none;
}

@media (max-width: 768px) {
	.search-overlay__container {
		padding: 1.5rem 1rem;
	}

	.search-overlay__input {
		font-size: 1rem;
		padding: 0.875rem 1rem;
	}

	.sidebar-nav.is-open .mobile-search {
		display: block;
		width: 100%;
		margin-bottom: 1px;
		order: -1;
	}

	.mobile-search__form {
		display: flex;
		align-items: center;
		background: #ffffff;
		padding: 12px 20px;
		gap: 10px;
		width: 100%;
		box-sizing: border-box;
	}

	.mobile-search__form svg {
		color: var(--color-neutral-500);
		flex-shrink: 0;
	}

	.mobile-search__input {
		flex: 1;
		background: transparent;
		border: none;
		color: var(--color-neutral-900);
		font-size: 1rem;
		padding: 5px 0;
		outline: none;
		width: 100%;
	}

	.mobile-search__input::placeholder {
		color: var(--color-neutral-300);
	}

	.mobile-search__results {
		margin-top: 0;
		max-height: 60vh;
		overflow-y: auto;
	}

	.mobile-search__results .search-overlay__list {
		list-style: none;
		padding: 0;
		margin: 0;
	}

	.mobile-search__results .search-overlay__item {
		margin-bottom: 1px;
	}

	.mobile-search__results .search-overlay__link {
		display: block;
		padding: 12px 20px;
		background: var(--color-neutral-50);
		color: var(--color-neutral-900);
		text-decoration: none;
		font-size: 0.9375rem;
		border-radius: 0;
	}

	.mobile-search__results .search-overlay__link:hover,
	.mobile-search__results .search-overlay__link:active {
		background: var(--color-neutral-100);
		transform: none;
	}

	.mobile-search__results .search-overlay__item-type {
		display: inline-block;
		font-size: 0.7rem;
		background: var(--color-primary-50);
		color: var(--color-primary-700);
		padding: 2px 6px;
		border-radius: 3px;
		margin-bottom: 4px;
	}

	.mobile-search__results .search-overlay__item-title {
		display: block;
		font-weight: 600;
		color: var(--color-primary-500);
	}

	.mobile-search__results .search-overlay__item-excerpt {
		display: block;
		font-size: 0.8125rem;
		color: var(--color-neutral-500);
		margin-top: 4px;
	}

	.mobile-search__results .search-overlay__no-results,
	.mobile-search__results .search-overlay__error {
		color: var(--color-neutral-500);
		font-size: 0.875rem;
		padding: 12px 20px;
		background: var(--color-neutral-50);
	}

	.mobile-search__results .search-overlay__loading {
		padding: 12px 20px;
		background: var(--color-neutral-50);
	}

	.mobile-search__results .search-overlay__loading .spinner {
		border-color: rgba(0, 98, 245, 0.2);
		border-top-color: var(--color-primary-500);
	}
}

/* Reading progress bar */
.site-header {
	position: sticky;
	position: -webkit-sticky;
}

.reading-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 6px;
	width: 0%;
	background: var(--color-primary-500);
	z-index: 101;
	pointer-events: none;
	transition: none;
}

.progress-markers {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 6px;
	z-index: 100;
	pointer-events: none;
}

.progress-marker {
	position: absolute;
	bottom: 0;
	width: 0;
	height: 0;
	border-left: 3px solid transparent;
	border-right: 3px solid transparent;
	border-bottom: 6px solid var(--color-accent-500);
	opacity: 0.6;
	transform: translateX(-3px);
}

/* Post navigation */
.site-main
.posts-navigation,
.site-main
.post-navigation {
	margin: 0 0 1.5em;
}

.posts-navigation .nav-links,
.post-navigation .nav-links {
	display: flex;
}

.posts-navigation .nav-previous,
.post-navigation .nav-previous {
	flex: 1 0 50%;
}

.posts-navigation .nav-next,
.post-navigation .nav-next {
	text-align: end;
	flex: 1 0 50%;
}

/* --- Responsive: mobile --- */
@media screen and (max-width: 48em) {
	:root {
		--header-h: 3.5rem;
	}

	.site-title {
		font-size: var(--font-size-sm);
	}

	/* Hide desktop sidebar, show header hamburger */
	.sidebar-nav {
		position: fixed;
		top: var(--header-h);
		left: 0;
		width: 100% !important;
		height: calc(100vh - var(--header-h));
		transform: translateX(-100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		z-index: 200;
		overflow-y: auto;
	}

	.sidebar-nav .sidebar-nav__header {
		display: none;
	}

	.sidebar-nav.is-open {
		transform: translateX(0);
	}

	.sidebar-nav .sidebar-nav__menu {
		opacity: 1;
		visibility: visible;
		padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
	}

	.site-wrapper {
		margin-left: 0 !important;
	}

	.mobile-menu-toggle {
		display: flex;
	}

}

/* Posts and pages
--------------------------------------------- */
.sticky {
	display: block;
}

.post,
.page {
	margin: 0 0 1.5em;
}

.updated:not(.published) {
	display: none;
}

.page-content,
.entry-content,
.entry-summary {
	margin: 1.5em 0 0;
}

.page-links {
	clear: both;
	margin: 0 0 1.5em;
}

/* Page template
--------------------------------------------- */
.page-template {
	padding-bottom: 0;
}

.page-article {
	margin: 0;
}

.page-article__header {
	padding: 2.5rem 2rem 0;
}

.page-article__header-inner {
	max-width: 48rem;
	margin: 0 auto;
}

.page-article__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-4xl);
	font-weight: var(--weight-bold);
	color: var(--color-heading-blue, #5396FB);
	line-height: var(--leading-tight);
	margin: 0.5rem 0 0;
}

.page-article__pdf-download {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-family: var(--font-body, sans-serif);
	font-size: var(--font-size-sm, 0.875rem);
	color: var(--color-text-secondary, #666);
	text-decoration: none;
	margin-top: 0.4rem;
	transition: color 0.15s;
}

.page-article__pdf-download:hover {
	color: var(--color-heading-blue, #5396FB);
	text-decoration: underline;
}

.page-article__pdf-download svg {
	flex-shrink: 0;
}

html[data-theme="dark"] .page-article__pdf-download { color: #999; }
html[data-theme="dark"] .page-article__pdf-download:hover { color: #7ab8ff; }
html[data-theme="dim"] .page-article__pdf-download { color: #777; }
html[data-theme="dim"] .page-article__pdf-download:hover { color: #4a7fc7; }

/* Breadcrumbs */
.breadcrumbs {
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
}

.breadcrumbs a {
	color: var(--color-text-secondary);
	text-decoration: none;
}

.breadcrumbs a:hover {
	color: var(--color-primary-500);
}

.breadcrumbs__sep {
	margin: 0 0.4rem;
	color: var(--color-border);
}

.breadcrumbs__current {
	color: var(--color-neutral-900);
}

.breadcrumbs__toc-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font: inherit;
	font-size: var(--font-size-sm);
	color: var(--color-primary-500);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-decoration: none;
}

.breadcrumbs__toc-btn:hover,
.breadcrumbs__toc-btn:active {
	background: none;
	color: var(--color-primary-700, #2a6dd9);
	text-decoration: underline;
}

.breadcrumbs__toc-btn:focus {
	outline: none;
}

.breadcrumbs__toc-icon {
	flex-shrink: 0;
	transition: transform 0.15s;
}

.breadcrumbs__toc-btn[aria-expanded="true"] .breadcrumbs__toc-icon {
	transform: rotate(180deg);
}

/* TOC Popup */
.page-toc-popup {
	position: fixed;
	inset: 0;
	z-index: 99000;
}

.page-toc-popup[hidden] {
	display: none;
}

.page-toc-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.page-toc-popup__panel {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(640px, 92vw);
	max-height: 80vh;
	background: var(--color-bg, #fff);
	border-radius: 0;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.page-toc-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 32px;
	height: 32px;
	border: none;
	background: none;
	font-size: 22px;
	color: var(--color-text-secondary, #888);
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
}

.page-toc-popup__close:hover {
	background: var(--color-primary-50, #f0f4ff);
	color: var(--color-neutral-900);
}

.page-toc-popup__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-lg, 1.125rem);
	font-weight: var(--weight-bold);
	color: var(--color-neutral-900);
	padding: 1.25rem 3rem 1rem 1.25rem;
	border-bottom: 1px solid var(--color-border);
	flex-shrink: 0;
	line-height: var(--leading-tight);
}

.page-toc-popup__tree {
	overflow-y: auto;
	flex: 1;
	padding: 0.5rem 0;
}

.page-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.page-toc-item {
	margin: 0;
}

.page-toc-row {
	display: flex;
	align-items: baseline;
	gap: 0.35rem;
	padding: 0.15rem 1rem;
}

.page-toc-item--h3 > .page-toc-row {
	padding-left: 1rem;
}


.page-toc-link {
	display: block;
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: var(--color-text-primary);
	text-decoration: none;
	line-height: 1.4;
	padding: 0.2rem 1rem;
}

a.page-toc-link:hover {
	color: var(--color-primary-500);
	text-decoration: underline;
}


.page-toc-children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.page-toc-item--h4 > .page-toc-link {
	display: block;
	padding: 0.15rem 1rem 0.15rem 3.25rem;
	font-size: 0.8125rem;
	color: var(--color-text-secondary);
}

a.page-toc-item--h4 > .page-toc-link:hover,
.page-toc-item--h4 > a.page-toc-link:hover {
	color: var(--color-primary-500);
	text-decoration: underline;
}

.page-toc-popup__footer {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--color-border);
	flex-shrink: 0;
}

.page-toc-popup__nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	text-decoration: none;
	transition: background 0.15s;
}

.page-toc-popup__nav:hover {
	background: var(--color-primary-50);
}

.page-toc-popup__nav--next {
	border-top: 1px solid var(--color-border);
	justify-content: flex-end;
	text-align: right;
}

.page-toc-popup__nav-inner {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.page-toc-popup__nav-label {
	font-family: var(--font-body);
	font-size: 0.75rem;
	color: var(--color-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.page-toc-popup__nav-title {
	font-family: var(--font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--color-primary-500);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.page-toc-popup__nav svg {
	flex-shrink: 0;
	color: var(--color-primary-500);
}

.page-toc-empty {
	padding: 1rem 1.25rem;
	color: var(--color-text-secondary);
	font-size: 0.875rem;
}


/* Dark mode */
html[data-theme="dark"] .page-toc-popup__panel {
	background: #1e2530;
}
html[data-theme="dark"] .page-toc-popup__title {
	border-bottom-color: #3a3f4a;
}
html[data-theme="dark"] .page-toc-link {
	color: #dde4ec;
}
html[data-theme="dark"] .page-toc-close:hover {
	background: #252c38;
}

/* Dim mode */
html[data-theme="dim"] .page-toc-popup__panel {
	background: #f0e8d8;
}
html[data-theme="dim"] .page-toc-popup__title {
	border-bottom-color: #c8c0b0;
}

/* Featured image */
.page-article__thumbnail {
	max-width: 48rem;
	margin: 2rem auto 0;
	padding: 0 2rem;
}

.page-article__featured-img {
	display: block;
	width: 100%;
	height: auto;
}

/* Content area — minimal styling, let the editor handle formatting */
.page-article__content {
	padding: 1rem 2rem 0;
	overflow: visible;
	background: transparent;
}

.page-article__content-inner {
	max-width: 48rem;
	margin: 0 auto;
	font-family: var(--font-body);
	font-size: var(--font-size-md);
	line-height: var(--leading-relaxed);
	color: var(--color-text-primary);
	background: transparent;
}

.page-article__content-inner:empty {
	display: none;
}

.asustus-html-iframe-wrap {
	margin: 1rem -2rem 1.5rem;
	padding: 0 2rem 25px;
	box-sizing: border-box;
	overflow-x: auto;
	contain: layout style;
}

.asustus-html-iframe-wrap[data-lightbox-src] .asustus-html-iframe-caption {
	cursor: pointer;
}
.asustus-html-iframe-wrap[data-lightbox-src] .asustus-html-iframe-caption:hover .caption-label {
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 2px;
}

.asustus-html-iframe-caption {
	font-family: var(--font-body);
	font-style: italic;
	font-size: 0.9375rem;
	line-height: var(--leading-relaxed);
	color: var(--color-figure-accent);
	margin-bottom: 0.5rem;
	max-width: 48rem;
	margin-left: auto;
	margin-right: auto;
}

.asustus-html-iframe-wrap .asustus-html-iframe {
	display: block;
	min-height: 50px;
	will-change: height;
	transition: height 0.15s ease-out;
	margin-left: auto;
	margin-right: auto;
}

.asustus-html-iframe-wrap--limited {
	margin: 1rem 0;
	padding: 0;
	overflow-x: auto;
}

.asustus-html-iframe-wrap--limited .asustus-html-iframe-caption {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* On mobile, ignore "Piira tekstiploki laiusega" — narrow viewports are
   already cramped, so always break out like the wide variant. */
@media screen and (max-width: 48em) {
	.asustus-html-iframe-wrap--limited {
		margin: 1rem -2rem 1.5rem;
		padding: 0 2rem 25px;
	}
	.asustus-html-iframe-wrap--limited .asustus-html-iframe-caption {
		max-width: 48rem;
		margin-left: auto;
		margin-right: auto;
	}
	/* Give iframe room to render its content. Without this, iOS Safari
	   reports body.scrollHeight as the iframe's tiny rendered height
	   (~50px) and the auto-sizer never grows beyond that. */
	.asustus-html-iframe-wrap .asustus-html-iframe {
		min-height: 50vh;
	}
}

/* Footer / edit link */
.page-article__footer {
	padding: 2rem 2rem 0;
}

.page-article__footer-inner {
	max-width: 48rem;
	margin: 0 auto;
}

.page-article__footer .edit-link a {
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
	text-decoration: none;
}

.page-article__footer .edit-link a:hover {
	color: var(--color-primary-500);
}

/* Page template responsive */
@media screen and (max-width: 48em) {
	.page-article__header {
		padding: 2rem 1.5rem 0;
	}

	.page-article__title {
		font-size: var(--font-size-2xl);
	}

	.page-article__thumbnail {
		padding: 0 1.5rem;
	}

	.page-article__content {
		padding: 1.5rem 1.5rem 0;
	}

	.page-article__footer {
		padding: 1.5rem 1.5rem 0;
	}

	.page-template {
		padding-bottom: 0;
	}
}

/* Widgets
--------------------------------------------- */
.widget {
	margin: 0 0 1.5em;
}

.widget select {
	max-width: 100%;
}

/* Media
--------------------------------------------- */
.page-content .wp-smiley,
.entry-content .wp-smiley {
	border: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

/* Make sure logo link wraps around logo image. */
.custom-logo-link {
	display: inline-block;
}

/* Captions
--------------------------------------------- */
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

.wp-caption-text {
	text-align: center;
}

/* Galleries
--------------------------------------------- */
.gallery {
	margin-bottom: 1.5em;
	display: grid;
	grid-gap: 1.5em;
}

.gallery-item {
	display: inline-block;
	text-align: center;
	width: 100%;
}

.gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
	grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
	grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
	grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
	display: block;
}

/* Figures & Captions
--------------------------------------------- */
.entry-content figure,
.page-article__content-inner figure {
	margin: 2.5rem 0 2rem;
	padding: 2rem 0;
	border-top: 3px dashed var(--color-figure-accent);
	border-bottom: 3px dashed var(--color-figure-accent);
}

/* Collapse double dashed borders when two dashed-border blocks are adjacent
   (quote blocks excluded — their blue separators are always kept) */
.entry-content :is(figure, .lede-block, .ref-list) + :is(figure, .lede-block, .ref-list),
.page-article__content-inner :is(figure, .lede-block, .ref-list) + :is(figure, .lede-block, .ref-list) {
	border-top: none;
	margin-top: 0;
	padding-top: 0;
}

/* When a figure/hr sits right before a quote block, hide the figure's bottom border */
.entry-content :is(figure, hr, .wp-block-separator) + :is(blockquote, .wp-block-quote, .wp-block-pullquote),
.page-article__content-inner :is(figure, hr, .wp-block-separator) + :is(blockquote, .wp-block-quote, .wp-block-pullquote) {
	margin-top: 0;
}
.entry-content :has(+ :is(blockquote, .wp-block-quote, .wp-block-pullquote)):is(figure),
.page-article__content-inner :has(+ :is(blockquote, .wp-block-quote, .wp-block-pullquote)):is(figure) {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}
.entry-content :has(+ :is(blockquote, .wp-block-quote, .wp-block-pullquote)):is(hr, .wp-block-separator),
.page-article__content-inner :has(+ :is(blockquote, .wp-block-quote, .wp-block-pullquote)):is(hr, .wp-block-separator) {
	display: none;
}

/* When a figure/hr sits right after a quote block, hide the figure's top border / hr */
.entry-content :is(blockquote, .wp-block-quote, .wp-block-pullquote) + :is(figure),
.page-article__content-inner :is(blockquote, .wp-block-quote, .wp-block-pullquote) + :is(figure) {
	border-top: none;
	margin-top: 0;
	padding-top: 0;
}
.entry-content :is(blockquote, .wp-block-quote, .wp-block-pullquote) + :is(hr, .wp-block-separator),
.page-article__content-inner :is(blockquote, .wp-block-quote, .wp-block-pullquote) + :is(hr, .wp-block-separator) {
	display: none;
}

.entry-content figure figcaption,
.page-article__content-inner figure figcaption {
	margin-bottom: 0;
}

.entry-content figure img,
.page-article__content-inner figure img {
	display: block;
	width: 100%;
	height: auto;
}

.entry-content figcaption,
.page-article__content-inner figcaption {
	font-family: var(--font-body);
	font-style: italic;
	font-size: 0.9375rem;
	line-height: var(--leading-relaxed);
	color: var(--color-figure-accent);
	margin-top: 0.625rem;
	margin-bottom: 1.75rem;
}

.caption-label {
	font-weight: var(--weight-bold);
	font-style: italic;
	color: var(--color-figure-accent);
}

/* Type-specific figure/table styles */
.entry-content .caption-type-table,
.page-article__content-inner .caption-type-table {
	border-top-style: solid;
	border-bottom-style: solid;
}

/* Gallery: column layouts */
.wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.wp-block-gallery.has-nested-images .wp-block-image {
	flex: 0 0 calc(33.333% - 0.667rem);
	max-width: calc(33.333% - 0.667rem);
}

.wp-block-gallery.has-nested-images.columns-1 .wp-block-image {
	flex: 0 0 100%;
	max-width: 100%;
}

.wp-block-gallery.has-nested-images.columns-2 .wp-block-image {
	flex: 0 0 calc(50% - 0.5rem);
	max-width: calc(50% - 0.5rem);
}

.wp-block-gallery.has-nested-images.columns-3 .wp-block-image {
	flex: 0 0 calc(33.333% - 0.667rem);
	max-width: calc(33.333% - 0.667rem);
}

.wp-block-gallery.has-nested-images.columns-default .wp-block-image {
	flex: 1 1 calc(33.333% - 0.667rem);
	min-width: calc(33.333% - 0.667rem);
	max-width: 100%;
}

.wp-block-gallery.has-nested-images > figcaption,
.wp-block-gallery.has-nested-images > .blocks-gallery-caption {
	flex-basis: 100%;
}

.wp-block-gallery.has-nested-images .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wp-block-gallery.has-nested-images:not(.is-cropped) .wp-block-image img {
	height: auto;
	object-fit: contain;
}

@media screen and (max-width: 48em) {
	.wp-block-gallery.has-nested-images.columns-3 .wp-block-image {
		flex-basis: calc(50% - 0.5rem);
		max-width: 100%;
	}
	/* columns-default: single column on all mobile/tablet — avoids lone item at 50% width */
	.wp-block-gallery.has-nested-images.columns-default .wp-block-image {
		flex-basis: 100%;
		max-width: 100%;
	}
	/* Override WordPress global-styles align-items:center on .is-layout-flex galleries */
	figure.wp-block-gallery.has-nested-images {
		align-items: flex-start;
	}
}

@media screen and (max-width: 36em) {
	.wp-block-gallery.has-nested-images .wp-block-image {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}
	/* Galleries with more than 3 images: 2 per row on mobile */
	.wp-block-gallery.has-nested-images:has(> .wp-block-image:nth-child(4)) .wp-block-image {
		flex-basis: calc(50% - 0.5rem) !important;
		max-width: calc(50% - 0.5rem) !important;
	}
}

/* Gallery: a/b/c sub-image labels via CSS counter */
.caption-type-figure.wp-block-gallery.has-nested-images {
	counter-reset: gallery-sub;
}
.caption-type-figure.wp-block-gallery.has-nested-images .wp-block-image {
	counter-increment: gallery-sub;
}
.caption-type-figure.wp-block-gallery.has-nested-images .wp-block-image figcaption.wp-element-caption::before {
	content: counter(gallery-sub, lower-alpha) ") ";
	font-style: normal;
	font-weight: var(--weight-bold);
}

/* Gallery: per-image captions below images */
.wp-block-gallery .wp-block-image,
.wp-block-gallery.has-nested-images .wp-block-image {
	display: flex !important;
	flex-direction: column !important;
}

.wp-block-gallery .wp-block-image img,
.wp-block-gallery.has-nested-images .wp-block-image img {
	height: auto !important;
	object-fit: contain !important;
}

.wp-block-gallery .wp-block-image figcaption.wp-element-caption,
.wp-block-gallery.has-nested-images .wp-block-image figcaption.wp-element-caption {
	display: block !important;
	position: static !important;
	background: none !important;
	text-align: left !important;
	font-size: 0.85em !important;
	color: var(--color-figure-accent) !important;
	text-shadow: none !important;
	padding: 0 0 0.25rem !important;
	margin: 0 !important;
}

.entry-content .wp-block-gallery > figcaption,
.page-article__content-inner .wp-block-gallery > figcaption,
figure.wp-block-gallery > .blocks-gallery-caption {
	text-align: left !important;
}

/* Lightbox */
.entry-content figure img,
.page-article__content-inner figure img,
.entry-content .wp-block-image img,
.page-article__content-inner .wp-block-image img {
	cursor: zoom-in;
}

/* "Ei nummerdada" image style — no dashed borders */
figure.is-style-no-count,
.is-style-no-count > figure,
.entry-content figure.is-style-no-count,
.entry-content .is-style-no-count > figure,
.page-article__content-inner figure.is-style-no-count,
.page-article__content-inner .is-style-no-count > figure {
	border-top: none !important;
	border-bottom: none !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

/* Icon image style — small 250px image, no dashed borders */
.is-style-icon-image {
	max-width: 100% !important;
}

.is-style-icon-image > figure,
.entry-content .is-style-icon-image > figure,
.page-article__content-inner .is-style-icon-image > figure,
figure.is-style-icon-image {
	border: none !important;
	padding: 0 !important;
	margin: 1.5rem 0;
	max-width: 250px;
}

.is-style-icon-image img {
	width: 250px !important;
	max-width: 100% !important;
	height: auto !important;
}

/* Center */
.is-style-icon-image > figure.aligncenter,
figure.is-style-icon-image.aligncenter {
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Left */
.is-style-icon-image > figure.alignleft,
figure.is-style-icon-image.alignleft {
	float: left !important;
	margin-right: 1.5rem !important;
}

/* Right */
.is-style-icon-image > figure.alignright,
figure.is-style-icon-image.alignright {
	float: right !important;
	margin-left: 1.5rem !important;
}

/* Inline text that triggers the lightbox */
.lightbox-trigger {
	cursor: pointer;
	color: var(--color-primary-500);
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 2px;
}
.lightbox-trigger:hover {
	text-decoration-style: solid;
}

.asustus-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.85);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	cursor: default;
}

.asustus-lightbox.is-active {
	opacity: 1;
	visibility: visible;
}

.asustus-lightbox__scroll {
	flex: 1;
	overflow: auto;
	display: flex;
}

.asustus-lightbox__body {
	margin: auto;
	padding: 2rem;
}

.asustus-lightbox__img {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	transform: scale(0.95);
	transition: transform 0.25s ease;
	cursor: zoom-in;
	background: var(--color-bg, #fff);
}


.asustus-lightbox.is-active .asustus-lightbox__img {
	transform: scale(1);
}

/* Controls bar */
.asustus-lightbox__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.75rem 1.5rem;
	background: rgba(0, 0, 0, 0.6);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media screen and (max-width: 48em) {
	.asustus-lightbox__controls {
		display: none;
	}
}

.asustus-lightbox__zoom-icon {
	color: rgba(255, 255, 255, 0.6);
	flex-shrink: 0;
}

.asustus-lightbox__slider {
	width: 200px;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

.asustus-lightbox__slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.asustus-lightbox__slider::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: none;
	cursor: pointer;
}

.asustus-lightbox__zoom-pct {
	color: rgba(255, 255, 255, 0.7);
	font-size: var(--font-size-sm);
	min-width: 3em;
	text-align: center;
}

.asustus-lightbox__caption {
	display: none;
	flex-shrink: 0;
	padding: 0.5rem 2rem;
	color: rgba(255, 255, 255, 0.85);
	font-size: var(--font-size-sm);
	text-align: center;
	line-height: var(--leading-relaxed);
}

.asustus-lightbox__close {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 10001;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-primary-500);
	border: none;
	border-radius: 4px;
	color: #fff;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.asustus-lightbox__close:hover {
	background: var(--color-primary-600, #3a7de0);
}

.asustus-lightbox__close:focus {
	outline: none;
}

/* Prev / Next navigation */
.asustus-lightbox__nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10002;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--color-primary-500, #4a90d9);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.asustus-lightbox__nav:hover {
	background: var(--color-primary-600, #3a7de0);
}

.asustus-lightbox__nav svg {
	display: block;
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	flex-shrink: 0;
}

.asustus-lightbox__nav--prev { left: 1rem; }
.asustus-lightbox__nav--next { right: 1rem; }

@media screen and (max-width: 48em) {
	.asustus-lightbox__nav {
		width: 40px;
		height: 40px;
	}
	.asustus-lightbox__nav svg {
		width: 24px;
		height: 24px;
		min-width: 24px;
		min-height: 24px;
	}
	.asustus-lightbox__nav--prev { left: 0.5rem; }
	.asustus-lightbox__nav--next { right: 0.5rem; }
}

/* Immersive (mobile tap-to-expand): hide nav arrows so the image
   can use the full viewport edge-to-edge. */
.asustus-lightbox.is-immersive .asustus-lightbox__nav {
	display: none !important;
}
.asustus-lightbox.is-immersive .asustus-lightbox__body {
	padding: 0;
	margin: 0;
}

/* Front Page
--------------------------------------------- */
.front-page {
	padding: 0;
}

/* Hero / Logo banner */
.fp-hero {
	position: relative;
	background-color: var(--color-primary-50);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding: 3rem 2rem;
}

.fp-hero[style*="background-image"]::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
}

.fp-hero__inner {
	position: relative;
	z-index: 1;
}

.fp-hero__logos {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	flex-wrap: wrap;
}

.fp-hero__logo-link {
	display: block;
	line-height: 0;
}

.fp-hero__logo {
	width: 190px;
	height: 90px;
	object-fit: contain;
}

/* Introduction */
/* Related link (between hero and intro) */
.fp-related {
	padding: 2.5rem 2.5rem 0;
}

.fp-related__card {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	padding: 1rem 1.25rem;
	max-width: 48rem;
	margin: 0 auto;
	color: var(--color-text-primary, inherit);
}

.fp-related__logo {
	display: block;
	flex-shrink: 0;
	width: auto;
	height: auto;
	max-height: 5rem;
	max-width: 14rem;
	object-fit: contain;
}

.fp-related__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 0 0 auto;
	min-width: 0;
	text-align: center;
	align-items: center;
	justify-content: center;
}

.fp-related__card.has-logo .fp-related__body {
	text-align: left;
	align-items: flex-start;
	padding-left: 1.25rem;
	border-left: 1px solid var(--color-neutral-200, rgba(0, 0, 0, 0.12));
}

.fp-related__eyebrow {
	font-family: var(--font-heading);
	font-size: var(--font-size-xs);
	font-weight: var(--weight-bold);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--color-text-muted, var(--color-text-secondary));
	white-space: nowrap;
}

.fp-related__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-2xl);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	line-height: 1.15;
}

.fp-related__desc {
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
	line-height: var(--leading-relaxed);
}

@media (max-width: 600px) {
	.fp-related__card,
	.fp-related__card.has-logo {
		flex-direction: column;
		align-items: center;
		gap: 0.75rem;
	}
	.fp-related__card.has-logo .fp-related__body {
		text-align: center;
		align-items: center;
		padding-left: 0;
		border-left: none;
	}
	.fp-related__logo {
		max-width: 10rem;
		max-height: 5rem;
	}
}

.fp-intro {
	padding: 4rem 2.5rem;
}

.fp-intro__inner {
	max-width: 48rem;
	margin: 0 auto;
}

.fp-intro__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-4xl);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	margin-bottom: 1.25rem;
}

.fp-intro__text {
	font-family: var(--font-body-flex);
	font-size: var(--font-size-md);
	line-height: var(--leading-relaxed);
	color: var(--color-text-secondary);
}

.fp-intro__text p:last-child {
	margin-bottom: 0;
}

.fp-intro__authors {
	margin-top: 1.5rem;
	font-family: var(--font-body-flex);
	font-size: var(--font-size-md);
	font-style: italic;
	line-height: var(--leading-relaxed);
	color: var(--color-text-secondary);
}

.fp-intro__authors p {
	margin: 0 0 0.35rem;
}

.fp-intro__authors p:last-child {
	margin-bottom: 0;
}

/* Page content (from WP editor) */
.fp-content {
	padding: 0 2.5rem 3rem;
}

.fp-content__inner {
	max-width: 48rem;
	margin: 0 auto;
}

/* Table of Contents */
.fp-toc {
	padding: 3rem 2.5rem 4rem;
}

.fp-toc__inner {
	max-width: 48rem;
	margin: 0 auto;
}

.fp-toc__chapter {
	margin-bottom: 2.5rem;
}

.fp-toc__chapter:last-child {
	margin-bottom: 0;
}

.fp-toc__chapter-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.75rem;
	margin-bottom: 0.25rem;
	border-bottom: 3px dashed var(--color-figure-accent);
}

.fp-toc__chapter-title {
	font-family: var(--font-heading);
	font-size: var(--font-size-xl);
	font-weight: var(--weight-bold);
	margin: 0;
	color: var(--color-primary-500);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.fp-toc__dl-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: var(--font-size-sm);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	transition: color 0.15s ease;
}

.fp-toc__dl-btn:visited {
	color: var(--color-primary-500);
}

.fp-toc__dl-btn:hover {
	color: var(--color-primary-700, var(--color-primary-500));
	text-decoration: underline;
}

.fp-toc__section {
	padding: 0.6rem 0 0.6rem 0;
	border-bottom: 1px solid var(--color-neutral-100);
}

.fp-toc__section:last-child {
	border-bottom: none;
}

.fp-toc__section-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
}

a.fp-toc__section-link {
	font-family: var(--font-heading);
	font-size: var(--font-size-base);
	font-weight: var(--weight-bold);
	color: var(--color-accent-500);
	text-decoration: none;
	transition: color 0.15s ease;
}

a.fp-toc__section-link:hover {
	color: var(--color-primary-500);
}

span.fp-toc__section-link {
	font-family: var(--font-heading);
	font-size: var(--font-size-base);
	font-weight: var(--weight-bold);
	color: var(--color-accent-500);
}

.fp-toc__pdf-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: var(--font-size-xs);
	font-weight: var(--weight-bold);
	color: var(--color-text-muted);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	transition: color 0.15s ease;
}

.fp-toc__pdf-btn:hover {
	color: var(--color-primary-500);
}

.fp-toc__pages {
	font-weight: var(--weight-regular);
	opacity: 0.75;
	margin-left: 0.15rem;
}

.fp-toc__section-summary {
	font-size: var(--font-size-sm);
	font-style: italic;
	color: var(--color-text-secondary);
	line-height: var(--leading-relaxed);
	margin: 0.5rem 0 0;
	padding-left: 1.5rem;
}

/* Allikad uuringust (Sources) */
.fp-sources {
	padding: 2.5rem 2.5rem 3rem;
}

.fp-sources__inner {
	max-width: 48rem;
	margin: 0 auto;
}

.fp-sources__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-xl);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin: 0 0 0.75rem;
	padding-bottom: 0.6rem;
	border-bottom: 3px dashed var(--color-figure-accent);
}

.fp-sources__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fp-sources__item {
	margin: 0.25rem 0;
}

.fp-sources__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font-body-flex);
	font-size: var(--font-size-base);
	color: var(--color-primary-500);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}

.fp-sources__link:hover,
.fp-sources__link:focus-visible {
	color: var(--color-primary-700, var(--color-accent-500));
}

.fp-sources__icon {
	flex-shrink: 0;
	opacity: 0.7;
}

/* Downloads */
.fp-downloads {
	background: var(--color-neutral-50);
	padding: 3rem 2.5rem;
}

.fp-downloads__inner {
	max-width: 48rem;
	margin: 0 auto;
}

.fp-downloads__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-2xl);
	font-weight: var(--weight-bold);
	color: var(--color-neutral-900);
	margin-bottom: 1.5rem;
}

.fp-downloads__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.fp-downloads__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1.25rem;
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	background: var(--color-white);
	border: 1px solid var(--color-primary-500);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fp-downloads__btn:visited {
	color: var(--color-primary-500);
}

.fp-downloads__btn:hover {
	background: var(--color-primary-500);
	color: var(--color-white);
}

/* Uuringumeeskond (Research Team) */
.fp-team {
	padding: 2rem 2.5rem 3rem;
}

.fp-team__inner {
	max-width: 48rem;
	margin: 0 auto;
}

.fp-team__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-xl);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding-bottom: 0.75rem;
	margin-bottom: 1.5rem;
	border-bottom: 3px dashed var(--color-figure-accent);
}

.fp-team__group {
	margin-bottom: 1.25rem;
}

.fp-team__group:last-child {
	margin-bottom: 0;
}

.fp-team__group-title {
	font-family: var(--font-heading);
	font-size: var(--font-size-base);
	font-weight: var(--weight-bold);
	color: var(--color-neutral-900);
	margin: 0 0 0.6rem;
}

.fp-team__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.6rem 1rem;
}

.fp-team__member {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.fp-team__photo {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.fp-team__photo-placeholder {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--color-primary-50);
	color: var(--color-primary-500);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-heading);
	font-size: var(--font-size-base);
	font-weight: var(--weight-bold);
	flex-shrink: 0;
}

.fp-team__info {
	min-width: 0;
}

.fp-team__name {
	font-family: var(--font-heading);
	font-size: var(--font-size-sm);
	font-weight: var(--weight-bold);
	color: var(--color-neutral-900);
	margin: 0 0 0.1rem;
}

.fp-team__position {
	font-size: var(--font-size-xs);
	color: var(--color-text-secondary);
	margin: 0;
}

.fp-team__institution {
	font-size: var(--font-size-xs);
	color: var(--color-text-muted);
	margin: 0;
}

/* Front page responsive */
@media screen and (max-width: 48em) {
	.fp-hero {
		padding: 2rem 1rem;
	}

	.fp-hero__logos {
		gap: 1rem;
		justify-content: center;
	}

	.fp-hero__logo {
		width: 140px;
		height: 65px;
	}

	.fp-intro {
		padding: 2.5rem 1.5rem;
	}

	.fp-content {
		padding: 0 1.5rem 2rem;
	}

	.fp-toc {
		padding: 2rem 1.5rem;
	}

	.fp-toc__chapter-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.fp-toc__section {
		padding-left: 0.5rem;
	}

	.fp-toc__section-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.fp-team {
		padding: 1.5rem 1.25rem 2rem;
	}

	.fp-team__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem 0.75rem;
	}
}

@media screen and (max-width: 30em) {
	.fp-hero__logos {
		gap: 0.75rem;
		justify-content: center;
	}

	.fp-hero__logo {
		width: 120px;
		height: 55px;
	}


}

/* Lede Block
--------------------------------------------- */
.lede-block {
	margin: 2.5rem 0;
	padding: 2rem 0;
	border-top: 3px dashed var(--color-figure-accent);
	border-bottom: 3px dashed var(--color-figure-accent);
}

.lede-block > *:first-child {
	margin-top: 0;
}

.lede-block > *:last-child {
	margin-bottom: 0;
}

.lede-block > p,
.lede-block > .wp-block-paragraph {
	font-weight: 700;
	font-size: var(--font-size-lg);
	line-height: var(--leading-relaxed);
	color: var(--color-neutral-900);
}

.lede-block ul,
.lede-block ol {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}

.lede-block li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.75rem;
	font-size: var(--font-size-md);
	line-height: var(--leading-relaxed);
}

.lede-block li strong {
	color: var(--color-list-accent);
}

.lede-block li::before {
	content: "\279C";
	position: absolute;
	left: 0;
	top: 0.15em;
	font-size: 1.4em;
	line-height: 1;
	color: var(--color-list-accent);
}

.lede-block li li::before {
	content: none;
}

/* Next Page Navigation
--------------------------------------------- */
.page-next {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
}

.page-next__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	padding: 1.25rem 1.5rem;
	background: var(--color-primary-50);
	transition: background 0.2s ease;
}

.page-next__link:hover {
	background: var(--color-bg-alt);
}

.page-next__label {
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.page-next__title {
	flex: 1;
	font-family: var(--font-heading);
	font-size: var(--font-size-lg);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
}

.page-next__arrow {
	flex-shrink: 0;
	color: var(--color-primary-500);
}

/* References — Inline Citations
--------------------------------------------- */
.ref-cite {
	font-size: 0.75em;
	line-height: 1;
	vertical-align: super;
	position: relative;
	cursor: pointer;
	margin: 0 1px;
}

.ref-cite__link {
	color: var(--color-primary-500);
	text-decoration: none;
	font-weight: 700;
}

.ref-cite__link:hover {
	color: var(--color-primary-700);
	text-decoration: underline;
}

/* References — Popover */
.ref-popover {
	display: none;
	position: absolute;
	z-index: 9999;
	max-width: 400px;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--color-border);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	line-height: var(--leading-relaxed);
	color: var(--color-text-primary);
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.ref-popover.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.ref-popover__content strong {
	color: var(--color-primary-500);
}

.ref-popover__content a {
	color: var(--color-primary-500);
	word-break: break-all;
}

/* References — Page-bottom List */
.ref-list {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 3px dashed var(--color-figure-accent);
}

.ref-list__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-2xl);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	margin-bottom: 1.25rem;
}

.ref-list__items {
	list-style: decimal;
	margin: 0;
	padding: 0 0 0 2.5rem;
}

.ref-list__item {
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	line-height: var(--leading-relaxed);
	color: var(--color-text-primary);
	padding: 0.5rem 0;
	margin-bottom: 0;
	transition: background-color 0.3s ease;
}

.ref-list__item::marker {
	color: var(--color-primary-500);
	font-weight: 700;
}

.ref-list__item--highlight {
	background-color: var(--color-primary-50);
}

.ref-list__back {
	color: var(--color-primary-500);
	text-decoration: none;
	font-weight: 700;
	margin-right: 0.4rem;
	font-size: var(--font-size-base);
	opacity: 0.5;
	transition: opacity 0.15s ease;
}

.ref-list__back:hover {
	opacity: 1;
}

.ref-list__back:visited {
	color: var(--color-primary-500);
}

.ref-cite--highlight {
	background-color: var(--color-primary-50);
	border-radius: 2px;
	transition: background-color 0.3s ease;
}

.ref-list__text a {
	color: var(--color-primary-500);
	text-decoration: underline;
	word-break: break-all;
}

/* References responsive */
@media screen and (max-width: 48em) {
	.ref-popover {
		max-width: calc(100vw - 2rem);
		left: 1rem !important;
		right: 1rem;
	}
}

/* Footer
--------------------------------------------- */
.site-footer {
	background: var(--color-neutral-900);
	color: var(--color-neutral-300);
	margin-top: 3rem;
	margin-bottom: 0;
}

.site-footer:last-child {
	margin-bottom: 0;
}

html {
	background: var(--color-neutral-900);
}

/* Footer widget columns */
.footer-widgets {
	border-bottom: 1px solid var(--color-neutral-700);
	padding: 3rem 2rem 2rem;
}

.footer-widgets__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	max-width: 72rem;
	margin: 0 auto;
}

.footer-widget__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-sm);
	font-weight: var(--weight-bold);
	color: var(--color-white);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wider);
	margin-bottom: 1rem;
}

.footer-widget {
	font-size: var(--font-size-sm);
	line-height: var(--leading-normal);
}

.footer-widget a {
	color: var(--color-neutral-300);
	text-decoration: none;
	transition: color 0.15s ease;
}

.footer-widget a:visited {
	color: var(--color-neutral-300);
}

.footer-widget a:hover {
	color: var(--color-white);
}

.footer-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-widget li {
	margin-bottom: 0.4rem;
}

/* Footer main row: contact + links + social */
.footer-main {
	padding: 2rem;
}

.footer-main__grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: center;
	gap: 2rem;
	max-width: 72rem;
	margin: 0 auto;
}

.footer-main__col {
	font-size: var(--font-size-sm);
	color: var(--color-neutral-300);
	line-height: var(--leading-relaxed);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.footer-main__col p:first-child { margin-top: 0; }
.footer-main__col p:last-child  { margin-bottom: 0; }

.footer-main__col--center {
	align-items: center;
	text-align: center;
}

.footer-main__col--right {
	align-items: flex-end;
	text-align: right;
}

/* Side-column logos */
.footer-logos {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-logos__link {
	display: inline-flex;
	align-items: center;
}

.footer-logos__img {
	display: block;
	width: auto;
	height: auto;
	max-height: 2.5rem;
	max-width: 7rem;
	object-fit: contain;
}

.footer-logos__img--lg {
	max-height: 4rem;
	max-width: 11rem;
}

.footer-main__col a {
	color: var(--color-neutral-300);
	text-decoration: underline;
	transition: color 0.15s ease;
}

.footer-main__col a:visited { color: var(--color-neutral-300); }
.footer-main__col a:hover   { color: var(--color-white); }

/* Footer related-link block (right column) */
.footer-related {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-top: 0.5rem;
}

.footer-main__col > .footer-related:first-child {
	margin-top: 0;
}

.footer-related__logo {
	display: block;
	flex-shrink: 0;
	width: auto;
	height: auto;
	max-height: 3.5rem;
	max-width: 9rem;
	object-fit: contain;
}

.footer-related__body {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.footer-related__eyebrow {
	font-family: var(--font-heading);
	font-size: var(--font-size-xs);
	font-weight: var(--weight-bold);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-white);
	white-space: nowrap;
}

.footer-related__title {
	font-family: var(--font-heading);
	font-size: var(--font-size-base);
	font-weight: var(--weight-bold);
	color: var(--color-white);
	line-height: 1.2;
	text-decoration: none;
}

a.footer-related__title:visited {
	color: var(--color-white);
}

a.footer-related__title:hover,
a.footer-related__title:focus-visible {
	color: var(--color-white);
	text-decoration: underline;
}

/* Legal / cookie links row */
.footer-main__legal {
	max-width: 72rem;
	margin: 1.5rem auto 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.footer-menu a {
	font-size: var(--font-size-sm);
	color: var(--color-neutral-300);
	text-decoration: none;
	transition: color 0.15s ease;
}

.footer-menu a:visited {
	color: var(--color-neutral-300);
}

.footer-menu a:hover {
	color: var(--color-white);
}

/* Social icons */
.footer-main__social {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.footer-social__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	color: var(--color-neutral-500);
	transition: color 0.15s ease;
}

.footer-social__link:visited {
	color: var(--color-neutral-500);
}

.footer-social__link:hover {
	color: var(--color-white);
}

/* Copyright bar */
.footer-bottom {
	border-top: 1px solid var(--color-neutral-700);
	padding: 1.25rem 2rem;
	text-align: center;
}

.footer-copyright {
	font-size: var(--font-size-xs);
	color: var(--color-neutral-500);
	margin: 0;
}

/* Footer responsive */
@media screen and (max-width: 48em) {
	.footer-widgets__grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.footer-main__grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.footer-main__col,
	.footer-main__col--right,
	.footer-main__col--center {
		align-items: center;
		text-align: center;
	}

	.footer-logos {
		justify-content: center;
	}

	.footer-related {
		flex-wrap: wrap;
		justify-content: center;
	}

	.footer-related__eyebrow {
		white-space: normal;
	}

	.footer-menu {
		flex-direction: column;
		gap: 0.5rem;
	}
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/

/* Jetpack infinite scroll
--------------------------------------------- */

/* Hide the Posts Navigation and the Footer when Infinite Scroll is in use. */
.infinite-scroll .posts-navigation,
.infinite-scroll.neverending .site-footer {
	display: none;
}

/* Re-display the Theme Footer when Infinite Scroll has reached its end. */
.infinity-end.neverending .site-footer {
	display: block;
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/

/* Accessibility
--------------------------------------------- */

/* Text meant only for screen readers. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--color-bg);
	border-radius: 0;
	box-shadow: none;
	clip: auto !important;
	clip-path: none;
	color: var(--color-primary-500);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Do not show the outline on the skip link target. */
#primary[tabindex="-1"]:focus {
	outline: 0;
}

/* Inline Figure/Table References
--------------------------------------------- */
a.inline-ref {
	color: var(--color-primary-500);
	font-weight: var(--weight-bold);
	text-decoration: none;
	border-bottom: 1px dotted var(--color-primary-300);
}

a.inline-ref:hover {
	color: var(--color-primary-700);
	border-bottom-style: solid;
}

@keyframes inline-ref-flash {
	0%   { background-color: var(--color-primary-100); }
	100% { background-color: transparent; }
}

.inline-ref-target--highlight {
	animation: inline-ref-flash 1.5s ease-out;
}

/* H4 sub-navigation list */
.h4-subnav {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin: 0.75rem 0 1.5rem;
	padding: 0;
}

.h4-subnav__link {
	display: block;
	font-size: var(--font-size-sm);
	color: var(--color-accent-500) !important;
	border-bottom: none !important;
}

.h4-subnav__link:hover {
	color: var(--color-accent-700, #703530) !important;
}

.h4-subnav__link::before {
	content: '\25B8\00a0';
	color: var(--color-accent-500);
}

/* Back-to-reading bar */
.inline-ref-back-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	display: flex;
	justify-content: center;
	padding: 0.625rem 1rem;
	background: var(--color-primary-700, #1a4a8a);
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.inline-ref-back-btn {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 4px;
	color: #fff;
	font-family: var(--font-body);
	font-size: 0.9375rem;
	font-weight: var(--weight-bold);
	padding: 0.5rem 1.5rem;
	cursor: pointer;
}

.inline-ref-back-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: #fff;
}

.inline-ref-close-btn {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 4px;
	color: rgba(255, 255, 255, 0.7);
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	padding: 0.5rem 1rem;
	margin-left: 0.5rem;
	cursor: pointer;
}

.inline-ref-close-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.5);
}

/* Alignments
--------------------------------------------- */
.alignleft {

	/*rtl:ignore*/
	float: left;

	/*rtl:ignore*/
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {

	/*rtl:ignore*/
	float: right;

	/*rtl:ignore*/
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}

/* Bookmarks & Notes
--------------------------------------------- */

/* Header button */
.bookmarks-toggle {
	position: relative;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0.5rem;
	color: var(--color-neutral-500);
	cursor: pointer;
	transition: color 0.2s ease;
	margin-left: 0.25rem;
}

.bookmarks-toggle:hover {
	color: var(--color-white);
}

.bkm-badge {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 16px;
	height: 16px;
	line-height: 16px;
	padding: 0 4px;
	font-size: 0.625rem;
	font-weight: 700;
	text-align: center;
	color: #fff;
	background: var(--color-primary-500);
	border-radius: 8px;
}

/* Selection toolbar — [bookmark icon] [textarea] [✓] */
.bkm-sel-toolbar {
	position: absolute;
	z-index: 9997;
	display: none;
	align-items: flex-end;
	gap: 3px;
	background: var(--color-bg, #fff);
	border: 1px solid var(--color-border, #ddd);
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.18);
	padding: 4px;
}

.bkm-sel-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	flex-shrink: 0;
	background: none !important;
	border: none;
	border-radius: 4px;
	color: #aaa;
	cursor: default;
	transition: color 0.15s;
}

.bkm-sel-btn--save {
	font-size: 1.1rem;
	cursor: pointer;
	color: #aaa;
}

.bkm-sel-btn--save:hover {
	color: var(--color-primary-500);
}

.bkm-sel-btn--active {
	color: var(--color-primary-500) !important;
}

.bkm-sel-note {
	width: 200px;
	min-height: 28px;
	max-height: 150px;
	padding: 4px 0.5rem;
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	line-height: 1.4;
	border: 1px solid var(--color-border, #ddd);
	border-radius: 4px;
	background: var(--color-bg-alt, #f5f5f5);
	color: var(--color-text);
	outline: none;
	resize: none;
	overflow: hidden;
}

.bkm-sel-note:focus {
	border-color: var(--color-primary-300);
}

/* Mobile: pin the toolbar/note popup to the bottom of the viewport
   so the native browser selection bar (Copy/Search/Select All) doesn't
   cover the area above the selection. */
@media screen and (max-width: 48em) {
	.bkm-sel-toolbar--top {
		position: fixed !important;
		left: 0 !important;
		right: 0 !important;
		top: 0 !important;
		bottom: auto !important;
		z-index: 99999;
		padding: 8px;
		gap: 6px;
		background: #b7e4be !important;
		border: 2px solid #2e7d32 !important;
		border-top: none !important;
		border-radius: 0 0 10px 10px;
		box-shadow: 0 4px 14px rgba(46, 125, 50, 0.4);
	}

	.bkm-sel-toolbar--top .bkm-sel-note {
		flex: 1;
		width: auto;
		background: #ffffff;
		border-color: #2e7d32;
	}
}

/* Bookmarked element indicator */
.bkm-marked {
	position: relative;
}

/* Inline note label shown to the right of the bookmarked block */
.bkm-inline-note {
	position: absolute;
	left: calc(100% + 1rem);
	top: 0;
	width: 12rem;
	font-size: var(--font-size-xs, 0.75rem);
	line-height: 1.4;
	color: #665d20;
	font-style: italic;
	background: #fef9e7;
	border: 1px solid #f0e6a8;
	border-radius: 0.25rem;
	padding: 0.375rem 0.5rem;
	overflow-wrap: break-word;
	word-break: break-word;
	cursor: pointer;
	transition: transform 0.25s ease;
	display: none;
}

html[data-theme="dark"] .bkm-inline-note {
	background: #2a2a1e;
	border-color: #4a4520;
	color: #e8df5a;
}

html[data-theme="dim"] .bkm-inline-note {
	background: #f5edcf;
	border-color: #ddd0a0;
	color: #665d20;
}

@media (min-width: 52rem) {
	.bkm-inline-note {
		display: block;
	}
}

mark.bkm-highlight {
	background: rgba(255, 152, 0, 0.45);
	color: inherit;
	padding: 0.1em 0;
}

html[data-theme="dark"] mark.bkm-highlight {
	background: rgba(255, 152, 0, 0.3);
}

html[data-theme="dim"] mark.bkm-highlight {
	background: rgba(255, 152, 0, 0.35);
}

mark.bkm-highlight[data-bkm-id] {
	cursor: pointer;
}

/* Side panel */
.bkm-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 22rem;
	max-width: 90vw;
	background: var(--color-bg);
	border-left: 1px solid var(--color-border);
	color: var(--color-text);
	z-index: 9998;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.bkm-panel.is-open {
	transform: translateX(0);
}

.bkm-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--color-border);
	flex-shrink: 0;
}

.bkm-panel__title {
	margin: 0;
	font-size: var(--font-size-lg);
	font-weight: var(--weight-bold);
}

.bkm-panel__close {
	background: none !important;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--color-text-secondary);
	cursor: pointer;
	padding: 0.25rem;
}

.bkm-panel__close:hover {
	background: none !important;
	color: var(--color-text);
}

.bkm-panel__list {
	flex: 1;
	overflow-y: auto;
	padding: 0.75rem 1.25rem;
}

.bkm-panel__empty,
.bkm-panel__hint {
	color: var(--color-text-secondary);
	font-style: italic;
	font-size: var(--font-size-base);
}

.bkm-panel__hint {
	margin-top: 0.75rem;
}

.bkm-panel__page-title {
	font-size: var(--font-size-sm);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	margin-top: 1rem;
	margin-bottom: 0.5rem;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid var(--color-border);
}

.bkm-panel__page-title:first-child {
	margin-top: 0;
}

.bkm-panel__item {
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--color-border);
}

.bkm-panel__link {
	display: block;
	font-size: var(--font-size-sm);
	color: var(--color-text);
	text-decoration: none;
	line-height: 1.4;
}

.bkm-panel__link:hover {
	color: var(--color-primary-500);
}

.bkm-panel__meta {
	font-size: 0.75rem;
	color: var(--color-text-secondary);
	margin-top: 0.125rem;
}

.bkm-panel__note {
	font-size: var(--font-size-sm);
	font-style: italic;
	color: var(--color-text-secondary);
	margin-top: 0.375rem;
	padding-left: 0.5rem;
	border-left: 2px solid var(--color-primary-300);
}

.bkm-panel__item-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.375rem;
}

.bkm-panel__delete {
	background: none !important;
	border: none;
	padding: 0;
	font-family: var(--font-body);
	font-size: 0.75rem;
	color: var(--color-text-secondary);
	cursor: pointer;
}

.bkm-panel__delete:hover {
	background: none !important;
	color: var(--color-primary-500);
}

.bkm-panel__note-edit {
	margin-top: 0.5rem;
}

.bkm-panel__note-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.5rem;
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	border: 1px solid var(--color-border);
	border-radius: 4px;
	background: var(--color-bg-alt, #f5f5f5);
	color: var(--color-text);
	resize: vertical;
}

.bkm-panel__note-save {
	margin-top: 0.375rem;
	padding: 0.25rem 0.75rem;
	font-family: var(--font-body);
	font-size: var(--font-size-sm);
	font-weight: var(--weight-bold);
	background: var(--color-primary-500);
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.bkm-panel__note-save:hover {
	background: var(--color-primary-700);
}

/* 404 page */
.fp-404 {
	padding: 0;
}

.fp-404__stage {
	position: relative;
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.fp-404__image {
	display: block;
	width: 100%;
	max-width: 60rem;
	height: auto;
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.fp-404__image {
		width: 60rem;
		max-width: none;
	}
}

.fp-404__dialog {
	position: absolute;
	left: 50%;
	bottom: 2rem;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	min-width: 18rem;
	max-width: calc(100% - 2rem);
	padding: 1.75rem 2rem;
	background: var(--color-white, #fff);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	text-align: center;
}

.fp-404__message {
	font-family: var(--font-heading);
	font-size: var(--font-size-lg);
	font-weight: var(--weight-bold);
	color: var(--color-primary-500);
	margin: 0;
	line-height: 1.3;
}

.fp-404__btn,
.fp-404__btn:visited {
	display: inline-block;
	min-width: 6rem;
	padding: 0.55rem 1.5rem;
	background: var(--color-primary-500);
	color: var(--color-white, #fff);
	font-family: var(--font-heading);
	font-size: var(--font-size-base);
	font-weight: var(--weight-bold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.fp-404__btn:hover,
.fp-404__btn:focus-visible {
	background: var(--color-primary-700, var(--color-accent-500));
	color: var(--color-white, #fff);
}

/*--------------------------------------------------------------
# Sitemap shortcode [sitemap]
--------------------------------------------------------------*/

.sitemap-container {
	margin: 2rem 0;
}

.sitemap-list {
	list-style: none !important;
	padding-left: 20px !important;
	margin: 0 !important;
	position: relative;
}

/* Vertical line for top level */
.sitemap-list::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 0.5em;
	bottom: 12px;
	width: 1px;
	background-color: var(--color-border);
}

/* Level 1 — page titles */
.sitemap-level-1 {
	margin-bottom: 16px !important;
	position: relative;
	padding-left: 14px !important;
}

.sitemap-level-1::before {
	content: '';
	position: absolute;
	left: -14px;
	top: 0.9em;
	width: 14px;
	height: 1px;
	background-color: var(--color-border);
}

.sitemap-container .sitemap-level-1 > a {
	color: var(--color-primary-500);
	text-decoration: none;
	font-weight: var(--weight-bold);
	font-size: 1.05em;
	transition: color 0.2s;
}

.sitemap-container .sitemap-level-1 > a:hover {
	color: var(--color-primary-700);
	text-decoration: underline;
}

/* Level 2 — h3 equivalent */
.sitemap-level-2 {
	list-style: none !important;
	margin: 8px 0 0 0 !important;
	padding-left: 20px !important;
	position: relative;
}

.sitemap-level-2::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 0;
	bottom: 8px;
	width: 1px;
	background-color: var(--color-border);
}

.sitemap-level-2 > li {
	position: relative;
	margin-bottom: 8px !important;
	margin-left: 20px !important;
	padding-left: 0 !important;
}

.sitemap-level-2 > li::before {
	content: '';
	position: absolute;
	left: -34px;
	top: 0.9em;
	width: 30px;
	height: 1px;
	background-color: var(--color-border);
}

.sitemap-container .sitemap-level-2 > li > a {
	color: var(--color-text);
	text-decoration: none;
	font-weight: var(--weight-regular);
	transition: color 0.2s;
}

.sitemap-container .sitemap-level-2 > li > a:hover {
	color: var(--color-primary-500);
	text-decoration: underline;
}

/* Level 3 — h4 equivalent */
.sitemap-level-3 {
	list-style: none !important;
	margin: 8px 0 0 0 !important;
	padding-left: 20px !important;
	position: relative;
}

.sitemap-level-3::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 0;
	bottom: 8px;
	width: 1px;
	background-color: var(--color-border);
}

.sitemap-level-3 > li {
	position: relative;
	margin-bottom: 6px !important;
	margin-left: 20px !important;
	padding-left: 0 !important;
}

.sitemap-level-3 > li::before {
	content: '';
	position: absolute;
	left: -34px;
	top: 0.9em;
	width: 30px;
	height: 1px;
	background-color: var(--color-border);
}

.sitemap-level-3 > li > a {
	font-size: 0.95em;
	color: var(--color-text-secondary);
	text-decoration: none;
	transition: color 0.2s;
}

.sitemap-level-3 > li > a:hover {
	color: var(--color-primary-500);
	text-decoration: underline;
}

/* Level 4 — x.x.x pages not in the nav menu */
.sitemap-level-4 {
	list-style: none !important;
	margin: 6px 0 0 0 !important;
	padding-left: 20px !important;
	position: relative;
}

.sitemap-level-4::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 0;
	bottom: 6px;
	width: 1px;
	background-color: var(--color-border);
}

.sitemap-level-4 > li {
	position: relative;
	margin-bottom: 4px !important;
	margin-left: 20px !important;
	padding-left: 0 !important;
}

.sitemap-level-4 > li::before {
	content: '';
	position: absolute;
	left: -34px;
	top: 0.9em;
	width: 30px;
	height: 1px;
	background-color: var(--color-border);
}

.sitemap-level-4 > li > a {
	font-size: 0.875em;
	color: var(--color-text-muted);
	text-decoration: none;
	transition: color 0.2s;
}

.sitemap-level-4 > li > a:hover {
	color: var(--color-primary-500);
	text-decoration: underline;
}

/* Strip any border-left that theme adds to nested lists */
.sitemap-sublist {
	border-left: none !important;
}

.sitemap-sublist li {
	padding-left: 0;
}
