/* ===================== COLOURS ===================== */

/* On screen the text is a very dark blue and backgrounds a light grey
   (print keeps the values of variables.css). --green and --yellow come from
   the panel (book colours 1 and 2). */
body.toolkitweb,
body.toolkitmap {
	--grey: #2A1F3D;
	--paper: rgb(250, 250, 250);
	color: var(--grey);
}

/* Titles in the colour of the text (theme titles keep their theme colour) */
body.toolkitmap h1,
body.toolkitmap h2,
body.toolkitmap h3,
body.toolkitweb h1,
body.toolkitweb h2,
body.toolkitweb h3,
body.toolkitweb h4,
body.toolkitweb .cover h1 span,
body.toolkitweb #toc #toc-heading {
	color: var(--grey);
}

/* The light colour: underlines, separators, selection */
body.toolkitweb ::selection,
body.toolkitmap ::selection {
	background: var(--yellow);
	color: var(--grey);
}

body.toolkitweb a,
body.toolkitmap a {
	text-decoration-color: var(--yellow);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* ===================== SKIP LINK ===================== */

.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	background: var(--green);
	color: #fff;
	padding: 10px 20px;
	text-decoration-line: none;
	font-size: 16px;
	z-index: 9999;
	border-radius: 0 0 6px 0;
}

.skip-link:focus {
	top: 0;
}

/* ===================== FOCUS VISIBLE ===================== */

body.toolkitweb a:focus-visible,
body.toolkitweb button:focus-visible {
	outline: 3px solid var(--yellow);
	outline-offset: 3px;
	border-radius: 3px;
}

/* ===================== SCROLL BEHAVIOUR ===================== */

html {
	scroll-behavior: smooth;
}

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

/* ===================== VISIBILITY UTILITIES ===================== */

.hide-for-small-only {
	display: block;
}

.show-for-small-only {
	display: none;
}

.show-for-large-only {
	display: block;
}

/* ===================== LANGUAGE NAV ===================== */

nav.languages {
	position: fixed;
	top: 30px;
	right: 30px;
	z-index: 100;
}

nav.languages ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
}

nav.languages li {
	margin-right: 5px;
	font-size: 16px;
}

nav.languages li.active a {
	color: #FFF;
	background: var(--green);
	border: 1px solid #FFF;
}

nav.languages a {
	text-decoration-line: none;
	white-space: normal;
	background: #FFF;
	text-align: center;
	line-height: 1.2;
	border-radius: 20px;
	padding: 5px 10px;
	display: block;
	width: 20px;
	border: 1px solid var(--green);
	transition: background 0.2s ease, color 0.2s ease;
}

/* ===================== BASE ===================== */

body.toolkitweb {
	font-size: 22px;
}

body.toolkitweb img {
	display: block;
}

body.toolkitweb .layout {
	display: flex;
	margin-top: 20px;
}

body.home a::after, body.toolkitweb a::after {
	content: none;
}

/* ===================== SIDEBAR ===================== */

body.toolkitweb header {
	padding: 10px 10px 10px 20px;
	margin-bottom: 50px;
	width: 18%;
	min-width: 200px;
	position: sticky;
	left: 0;
	top: 20px;
	height: calc(100vh - 40px);
	overflow-y: auto;
}

body.toolkitweb header h1 {
	font-size: 1.1em;
	letter-spacing: 0.03em;
	line-height: 1.3;
}

body.toolkitweb header h1 a {
	text-decoration-line: none;
}

.dl-pdf {
	margin-top: 30px;
	margin-bottom: 40px;
}

.dl-pdf a {
	background: var(--green);
	color: #FFF;
	text-decoration-line: none;
	padding: 8px 20px;
	border-radius: 30px;
	display: inline-block;
	transition: opacity 0.2s ease;
}

.dl-pdf a:hover {
	opacity: 0.8;
}

/* ===================== TOC ===================== */

body.toolkitweb #toc {
	font-size: 1em;
	margin-top: 20px;
}

body.toolkitweb #toc #toc-heading {
	border-bottom: 2px solid var(--yellow);
	margin-bottom: 20px;
	font-size: 1em;
	margin-top: 0;
	letter-spacing: 0.05em;
	padding-bottom: 2px;
	text-transform: none;
	font-family: var(--textfont);
	color: var(--green);
}

body.toolkitweb #toc li {
	list-style: none;
	margin-bottom: 10px;
	text-align: left;
	font-size: 15px;
	hyphens: none;
	text-transform: none;
}

body.toolkitweb #toc li a {
	color: var(--green);
	text-decoration-line: none;
	transition: opacity 0.2s ease;
}

body.toolkitweb #toc li a:hover {
	text-decoration-line: underline;
}

body.toolkitweb #toc li a.active {
	text-decoration-line: underline;
}

body.toolkitweb #toc ul {
	list-style: none;
	padding-left: 0;
}

body.toolkitweb #toc .toc-sublist {
	padding-left: 1.2em;
	margin-top: 0.5em;
}

/* Part header row: link + toggle button side by side */
body.toolkitweb #toc .toc-part-header {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

body.toolkitweb #toc .toc-part-header > a {
	flex: 1;
	font-weight: bold;
}

/* Toggle button */
body.toolkitweb #toc .toc-part-toggle {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 0 2px;
	cursor: pointer;
	color: var(--green);
	font-size: 0.75em;
	line-height: 1;
	transition: transform 0.2s ease;
}

body.toolkitweb #toc .toc-part--open > .toc-part-header .toc-part-toggle {
	transform: rotate(90deg);
}

/* Sublist hidden by default (controlled via hidden attr + JS) */
body.toolkitweb #toc .toc-sublist[hidden] {
	display: none;
}

body.toolkitweb #toc .toc-part > a,
body.toolkitweb #toc .toc-part-header > a {
	font-weight: bold;
}

body.toolkitweb #toc .toc-chapter > a {
	font-weight: normal;
}

/* Active states */
body.toolkitweb #toc a[aria-current="page"],
body.toolkitweb #toc a.active {
	color: var(--green, #000);
	text-decoration-line: underline;
}

body.toolkitweb #toc .toc-simple--active > a {
	font-weight: bold;
}

/* ===================== COVER ===================== */

body.toolkitweb .cover {
	position: relative;
	height: 48vh;
	min-height: 300px;
	width: 100%;
	top: -21px;
	overflow: hidden;
	text-align: center;
}

body.toolkitweb .cover figure {
	position: absolute;
	width: 100%;
	height: 48vh;
	min-height: 300px;
	top: 0;
	left: 0;
	overflow: hidden;
}

body.toolkitweb .cover h2 {
	top: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	position: relative;
	background: #FFF;
	border-radius: 18px;
	padding: 5px 20px;
	display: inline-block;
	text-align: center;
}

body.toolkitweb .cover h2 span {
	position: relative;
	left: 0 !important;
}

body.toolkitweb .cover h1 {
	position: absolute;
	transform: none;
	width: 70%;
	min-width: min(500px, 92%);
	margin: auto;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: clamp(1.5em, 6vw, 50px);
	z-index: 20;
}

body.toolkitweb .cover h1 span{
	display: inline-block;
	margin-bottom: 0.2em;
	color: var(--green);
}

/* ===================== MAIN CONTENT ===================== */

body.toolkitweb main {
	max-width: 900px;
	margin: auto;
	margin-left: 6%;
	margin-top: 9px;
	flex-grow: 1;
	width: 100%;
}

body.toolkitweb .chapter {
	margin-top: 0;
	margin-bottom: 40px;
	padding-bottom: 40px;
}

body.toolkitweb .chapter-nav{
	margin-bottom: 80px;
}

body.toolkitweb .spread-interval-image {
	background: var(--green);
}

body.toolkitweb main .logbook-content p,
body.toolkitweb main .story-content p,
body.toolkitweb .content p,
body.toolkitweb main .logbook-content li,
body.toolkitweb main .story-content li,
body.toolkitweb .content li,
body.toolkitweb .chapter blockquote,
body.toolkitweb .chapter blockquote p {
	font-size: var(--textsizetoolkitweb);
	text-align: left;
	hyphens: none;
	line-height: 1.65;
	margin-bottom: 1.1em;
	margin-top: 0;
}

body.toolkitweb .logbook figure {
	width: 100%;
}

body.toolkitweb figcaption p, body.toolkitweb figcaption {
	font-size: 15px !important;
	line-height: 1.5;
	margin-top: 5px;
}

/* ===================== HEADINGS ===================== */

body.toolkitweb .part-title {
	font-size: clamp(1.1em, 2.5vw, 1.5em);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.8em 1em;
	margin-bottom: 2em;
	margin-top: 0;
	line-height: 1.3;
	border: 2px solid var(--yellow);
  border-radius: 100%;
  text-align: center;
}

body.toolkitweb .chapter .chapter-subsection h2,
body.toolkitweb .chapter h1 {
	font-size: clamp(1.5em, 4vw, 1.6em);
	line-height: 1.15;
	letter-spacing: 0.02em;
	margin-bottom: 0.5em;
	font-family: var(--textfont);
	text-transform: none;
}

body.toolkitweb .chapter h2 {
	font-size: clamp(1.1em, 2.5vw, 1.5em);
	letter-spacing: 0.02em;
	font-family: var(--textfont);
	text-transform: none;
}

body.toolkitweb .logbook h2 {
	font-size: 1.4em;
	margin-top: 40px;
	border-top: 2px dotted var(--yellow);
	padding-top: 40px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: none;
}

/* ===================== CONTENT ===================== */

body.toolkitweb .table-grid {
	font-size: 0.85em;
}

body.toolkitweb .table-cell {
	padding: 8px 6px;
}

body.toolkitweb .table-title {
	font-size: 0.85em;
}

body.toolkitweb .chapter .content {
	margin-top: 0;
}

body.toolkitweb h3 + .content {
	margin-top: 2em !important;
}

body.toolkitweb .chapter .content figure {
	margin-left: auto;
	margin-right: auto;
	margin-top: 2em;
	margin-bottom: 2.5em;
	width: 80%;
}

body.toolkitweb .chapter .content figure.spread-image {
	margin-top: 4em;
	width: 100%;
}


body.toolkitweb .chapter blockquote {
	margin-left: 40px;
	margin-right: 40px;
	text-align: left;
	border-left: 2px solid var(--yellow);
	padding-left: 20px;
	line-height: 1.65;
}

body.toolkitweb .chapter .content h2:first-child {
	margin-top: 48px;
}

/* --- Gallery --- */

body.toolkitweb .images-gallery ul {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.toolkitweb .images-gallery ul {
  position: relative;
  margin: 0;
}

body.toolkitweb .images-gallery ul li {
  padding-right: 0.5cm;
  width: 100%;
  margin: 0;
  margin-top: 0.5cm;
  list-style: none;
}

body.toolkitweb .images-gallery ul li img {
  max-width: 100%;
}

/* ===================== BURGER MENU ===================== */

body.toolkitweb .burger-menu {
	position: fixed;
	top: 3px;
	left: 0px;
	border: none;
	font-size: 30px;
	padding: 0px 6px 6px;
	background-color: var(--green);
	color: white;
	cursor: pointer;
	z-index: 1100;
	display: none;
}

body.toolkitweb .chapter-subsection {
	position: relative;
	margin-bottom: 100px;
}

/* ===================== FOOTNOTES ===================== */

body.toolkitweb .footnote-wrapper {
	display: none;
	position: absolute;
	width: 260px;
	background-color: #fff;
	padding: 12px 15px 10px 15px;
	z-index: 1000;
	border: 1px solid var(--green);
	border-radius: 10px;
	margin-top: 0;
}

body.toolkitweb .footnote-wrapper.active {
	display: flex;
}

body.toolkitweb .footnote-wrapper span{
	font-size: 0.7em;
}

body.toolkitweb .footnote-wrapper span.url{
	font-size: 1em;
}


body.toolkitweb .footnote-wrapper .footnote-number {
	margin-right: 5px;
}

body.toolkitweb .footnote-ref {
	display: inline-block;
	vertical-align: top;
	font-size: 0.5em;
	cursor: pointer;
	text-decoration-line: none;
	background: #FFF;
	border: 1px solid var(--green);
	color: var(--green);
	padding: 1px 6px 1px;
	border-radius: 15px;
	transition: background 0.2s ease, color 0.2s ease;
}

body.toolkitweb .footnote-ref:hover {
	color: var(--grey);
	background: var(--yellow);
	border-color: var(--yellow);
}

body.toolkitweb .footnote-ref.active {
	color: #FFF;
	background: var(--green);
}


/* ===================== GLOSSARY TERMS ===================== */

/* (term: …) in the text: a pill, definition in a pop-up.
   box-decoration-break: clone closes the pill on each line when the term
   wraps (border, radius and padding are repeated on every fragment). */
body.toolkitweb a.glossary-term,
body.toolkitmap a.glossary-term {
	color: var(--green);
	border: 1px solid var(--green);
	padding: 0 10px;
	border-radius: 50px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	/* wrap between words, not inside them (links break anywhere, for URLs) */
	white-space: normal;
	overflow-wrap: normal;
	word-break: normal;
	text-decoration-line: none;
	cursor: help;
}

body.toolkitweb a.glossary-term:hover,
body.toolkitweb a.glossary-term.active {
	background: color-mix(in srgb, var(--yellow) 35%, transparent);
}

.glossary-popup {
	position: absolute;
	z-index: 1000;
	width: min(340px, calc(100vw - 20px));
	max-height: 50vh;
	overflow-y: auto;
	padding: 12px 15px 12px;
	background: #fff;
	border: 1px solid var(--green);
	border-radius: 10px;
	font-family: var(--textfont), sans-serif;
	font-size: 0.8em;
	line-height: 1.45;
	color: var(--grey);
}

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

.glossary-popup-term {
	margin: 0 1.5em 0.5em 0;
	font-family: var(--titlefont), monospace;
	font-size: 0.9em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.glossary-popup-def p {
	margin: 0 0 0.6em;
}

.glossary-popup-close {
	position: absolute;
	top: 6px;
	right: 8px;
	border: 0;
	background: none;
	font-size: 1.3em;
	line-height: 1;
	color: var(--grey);
	cursor: pointer;
}

.glossary-popup-more {
	font-family: var(--titlefont), monospace;
	font-size: 0.85em;
	color: var(--green);
}

/* chapters a term appears in, under its entry in the glossary */
body.toolkitweb .content .glossary-uses {
	margin: -0.8em 0 1.6em;
	font-family: var(--titlefont), monospace;
	font-size: 0.8em;
	line-height: 1.5;
}

body.toolkitweb .glossary-uses-label {
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-right: 0.4em;
}

/* the entry a term links to, in the glossary */
body.toolkitweb .content .glossary dt:target {
	background: color-mix(in srgb, var(--yellow) 35%, transparent);
}

/* ===================== CHAPTER NAVIGATION (prev / next) ===================== */

.chapter-nav {
	display: flex;
	justify-content: space-between;
	align-items: stretch;
	gap: 16px;
	margin-top: 80px;
	padding-top: 40px;
	border-top: 2px solid var(--yellow);
}

.chapter-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 46%;
	text-decoration-line: none;
	color: var(--green);
	font-size: 0.8em;
	line-height: 1.3;
	transition: opacity 0.2s ease;
}

.chapter-nav-item:hover {
	opacity: 0.7;
}

.chapter-nav-empty {
	flex: 1;
}

.chapter-nav-prev {
	text-align: left;
}

.chapter-nav-next {
	margin-left: auto;
	text-align: right;
}

.chapter-nav-arrow {
	font-size: 1.4em;
	flex-shrink: 0;
}

.chapter-nav-title {
	display: block;
}

/* ===================== PRINT OVERRIDES ===================== */

/* style.css applique grayscale sur les figures logbook/story pour le print */
body.toolkitweb .logbook figure,
body.toolkitweb .story-content figure {
	filter: none;
}

/* ===================== TOC BACKDROP ===================== */

.toc-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 10;
}

.toc-backdrop.active {
	display: block;
}

/* ===================== BACK TO TOP ===================== */

#back-to-top {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 35px;
  height: 35px;
	border-radius: 50%;
	border: 1px solid var(--green);
	background: #fff;
	color: var(--green);
	font-size: 16px;
	cursor: pointer;
	z-index: 500;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

#back-to-top.visible {
	opacity: 1;
	visibility: visible;
}

#back-to-top:hover {
	background: var(--yellow);
	color: var(--grey);
	border-color: var(--yellow);
}

@media (prefers-reduced-motion: reduce) {
	#back-to-top { transition: none; }
}

/* ===================== LIGHTBOX ===================== */

#lightbox {
	visibility: hidden;
	opacity: 0;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 40px;
	box-sizing: border-box;
	cursor: zoom-out;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

#lightbox.active {
	visibility: visible;
	opacity: 1;
}

#lightbox img {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	display: block;
	cursor: default;
	width: auto;
}

#lightbox-caption {
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	margin-top: 16px;
	text-align: center;
	max-width: 700px;
	line-height: 1.5;
}

#lightbox-close {
	position: fixed;
	top: 16px;
	right: 20px;
	background: none;
	border: none;
	color: #fff;
	font-size: 40px;
	line-height: 1;
	padding: 4px 10px;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s ease;
}

#lightbox-close:hover {
	opacity: 1;
}

body.toolkitweb .content figure img,
body.toolkitweb .story-content figure img,
body.toolkitweb .logbook-content figure img,
body.toolkitweb .logbook figure img {
	cursor: zoom-in;
}

@media (prefers-reduced-motion: reduce) {
	#lightbox { transition: none; }
}

/* ===================== RESPONSIVE ===================== */

@media only screen and (max-width: 1080px) {
	.hide-for-small-only {
		display: none;
	}

	.show-for-small-only {
		display: block;
	}

	body.toolkitweb nav.languages {
		max-width: 40%;
		right: 10px;
		top: 10px;
    z-index: 9999;
	}

	nav.languages li {
		margin-right: 3px;
		font-size: 12px;
	}

	nav.languages a {
		padding: 5px 6px;
		width: 14px;
	}

	body.toolkitweb .layout {
		display: block;
	}

	body.toolkitweb .cover {
		top: 48px;
	}

	body.toolkitweb .cover h1 {
		font-size: clamp(22px, 4vw, 40px);
		width: 97%;
		min-width: 0;
		line-height: 1.8;
	}

	body.toolkitweb .cover h2 {
		font-size: 20px;
		top: 0px;
	}

	body.toolkitweb .burger-menu {
		display: block;
	}

	body.toolkitweb header {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		width: 100% !important;
		height: auto;
		min-height: 30px;
		padding-left: 0;
		padding-right: 0;
		padding-top: 10px;
		background-color: var(--green);
		color: white;
		z-index: 1000;
	}

	body.toolkitweb header h1 {
		font-size: 15px;
		/*text-align: center;*/
		color: #FFF;
		width: calc(100% - 180px);
		padding-left: 40px;
		padding-right: 40px;
		padding-top: 3px;
	}

	body.toolkitweb header h1 span{
		color: var(--green);
	}

	body.toolkitweb #toc.open {
		transform: translateX(0);
		transition: transform 0.5s ease;
	}

	body.toolkitweb #toc {
		position: fixed;
		top: 28px;
		left: 0;
		transform: translateX(-100%);
		transition: transform 0.5s ease;
		height: calc(100vh - 80px) !important;
		padding: 20px !important;
		background-color: #FFF;
		z-index: 9999;
		overflow-y: auto;
	}

	body.toolkitweb main {
		margin-left: 0;
		margin-top: 80px;
		padding: 0px 24px;
		width: calc(100% - 48px);
	}

	body.toolkitweb .content h2 {
		font-size: 1.3em;
	}

	body.toolkitweb h3,
	body.toolkitweb h3 p {
		font-size: 0.9em;
	}

	body.toolkitweb .chapter blockquote{
		margin-left: 20px;
		margin-right: 0;
	}

	body.toolkitweb .chapter-subsection {
		margin-bottom: 60px;
	}
}

@media only screen and (max-width: 768px) {

	body.toolkitweb main .logbook-content p,
	body.toolkitweb main .story-content p,
	body.toolkitweb .content p,
	body.toolkitweb main .logbook-content li,
	body.toolkitweb main .story-content li,
	body.toolkitweb .content li, 
	body.toolkitweb .chapter blockquote,
	body.toolkitweb .chapter blockquote p {
		font-size: 0.8em;
	}

	body.toolkitweb figcaption p, body.toolkitweb figcaption {
		font-size: 12px !important;
	}

	body.toolkitweb .content li p{
		font-size: 1em;
	}

	body.toolkitweb nav.languages {
		right: 5px;
	}

	body.toolkitweb .cover{
		height: 25vh;
	}

	body.toolkitweb header h1 {
		font-size: 12px;

	}

	body.toolkitweb .cover h1 {
		font-size: clamp(16px, 5vw, 22px);
		line-height: 1.8;
	}

	.cover h1 span{
		padding: 4px 15px;
	}

	body.toolkitweb .cover h2 {
		font-size: 13px;
	}

	body.toolkitweb .chapter .content figure {
		width: 100%;
	}

}

/* ===================== MAP EMBED BLOCK ===================== */

body.toolkitweb .mapembed {
	margin: 30px 0;
}

body.toolkitweb .mapembed-intro {
	margin-bottom: 12px;
}

body.toolkitweb .mapembed-heading {
	margin: 0 0 6px;
	font-family: var(--titlefont), monospace;
	font-size: 1.15rem;
	line-height: 1.25;
}

body.toolkitweb .mapembed-caption {
	font-size: 0.9rem;
	line-height: 1.5;
	color: color-mix(in srgb, var(--grey) 75%, transparent);
}

body.toolkitweb .mapembed-caption p {
	margin: 0;
}

body.toolkitweb .mapembed-frame {
	height: var(--mapembed-height, 480px);
	border: 1px solid color-mix(in srgb, var(--grey) 14%, transparent);
	border-radius: 12px;
	overflow: hidden;
	background: color-mix(in srgb, var(--yellow) 55%, #fff);
}

body.toolkitweb .mapembed-frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

body.toolkitweb .mapembed-cta {
	display: inline-block;
	margin-top: 20px;
	text-decoration-line: none;
	font-family: var(--titlefont), monospace;
	font-size: var(--textsizetoolkitweb);;
	color: var(--green);
	border: 1px solid var(--green);
	padding: 5px 10px;
  border-radius: 15px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: normal;
}

body.toolkitweb .mapembed-cta:hover {
	background: var(--yellow);
}

@media only screen and (max-width: 768px) {
	body.toolkitweb .mapembed-frame {
		height: min(var(--mapembed-height, 480px), 70vh);
	}
}

/* ===================== THEMES & KEY-POINT CARDS ===================== */
/* See snippets/toolkit/webblocks.php. --theme is the colour of
   the map theme a section belongs to; it falls back to the book colour. */

body.toolkitweb .themesection {
	margin-top: 64px;
	/*padding-top: 20px;*/
	/*border-top: 6px solid var(--theme, var(--green));*/
}

body.toolkitweb .themesection-theme {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 0.6em;
	font-family: var(--titlefont), monospace;
	font-size: 0.85em;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--theme, var(--green));
}

body.toolkitweb .themeicon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background: var(--theme, var(--green));
	color: #fff;
	font-family: var(--iconfont);
	font-size: 1.6em;
	line-height: 1;
}

/* The character redrawn as SVG, its ink centred on the disc (icon-center.js) */
body.toolkitweb .themeicon svg {
	display: block;
	width: 100%;
	height: 100%;
}

body.toolkitweb .chapter .themesection h2,
body.toolkitweb .chapter .content .themesection h2:first-child {
	margin-top: 0;
	color: var(--theme, var(--green));
}

body.toolkitweb .content h2[id] {
	scroll-margin-top: 20px;
}

/* Links across the toolkit: this aim's finding, story and places on the map */
body.toolkitweb .content .themelinks {
	list-style: none;
	margin: 1.2em 0 2em;
	padding: 0;
	border-top: 1px solid var(--theme, var(--green));
}

body.toolkitweb .content .themelinks li {
	display: flex;
	gap: 1em;
	margin: 0;
	padding: 0.55em 0;
	border-bottom: 1px solid var(--theme, var(--green));
	font-size: 0.95em;
	line-height: 1.4;
}

body.toolkitweb .themelinks-kind {
	flex: 0 0 5.5em;
	padding-top: 0.2em;
	font-family: var(--titlefont), monospace;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--theme, var(--green));
}

body.toolkitweb .themelinks a {
	color: inherit;
	text-decoration-line: none;
}

body.toolkitweb .themelinks a:hover {
	color: var(--theme, var(--green));
	text-decoration-line: underline;
}

/* Key-point card */
body.toolkitweb .actioncard {
	margin: 0 0 1.5em;
	padding: 1.3em 1.5em 1.4em;
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--theme, var(--green)) 45%, transparent);
	border-radius: 10px;
}

body.toolkitweb .content .actioncard-title {
	margin: 0 0 0.9em;
	font-family: var(--textfont);
	font-size: 1.25em;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
}

body.toolkitweb .content .actioncard-label {
	margin: 0 0 0.5em;
	font-family: var(--titlefont), monospace;
	font-size: 0.78em;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--theme, var(--green));
}

body.toolkitweb .content .keypoints {
	list-style: none;
	margin: 0 0 1.2em;
	padding: 0;
}

body.toolkitweb .content .keypoints li {
	position: relative;
	margin: 0;
	padding: 0.55em 0 0.55em 2em;
	border-top: 1px solid color-mix(in srgb, var(--theme, var(--green)) 35%, transparent);
	line-height: 1.5;
}

body.toolkitweb .content .keypoints li::before {
	content: "→";
	position: absolute;
	left: 0;
	font-family: var(--titlefont), monospace;
	color: var(--theme, var(--green));
}

/* Resources as pills, echoing the cover title */
body.toolkitweb .content .pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.toolkitweb .content .pills li {
	margin: 0;
	font-family: var(--titlefont), monospace;
	font-size: 0.8em;
	line-height: 1.3;
}

body.toolkitweb .pills a,
body.toolkitweb .pills span {
	display: inline-block;
	padding: 0.45em 1em;
	background: #fff;
	border: 1px solid var(--theme, var(--green));
	border-radius: 999px;
	color: var(--theme, var(--green));
	text-decoration-line: none;
}

body.toolkitweb .pills a::after {
	content: " ↗";
}

body.toolkitweb .pills a:hover {
	background: var(--theme, var(--green));
	color: #fff;
}

/* Participants' quotes: the chapter's blockquote, in the theme's colour */
body.toolkitweb .chapter .themequote blockquote {
	margin: 0.5em 0 2em;
	padding: 0.2em 0 0.2em 1.5em;
	border-left: 2px solid var(--theme, var(--green));
	font-size: 1em;
	line-height: 1.5;
}

body.toolkitweb .chapter .themequote blockquote p {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

body.toolkitweb .themequote footer {
	margin-top: 0.8em;
	font-family: var(--titlefont), monospace;
	font-size: 0.65em;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--theme, var(--green));
}

/* Theme list: a list with one item per theme (summary, research questions) */
body.toolkitweb .content .themelist {
	list-style: none;
	margin: 1.5em 0 2em;
	padding: 0;
}

body.toolkitweb .content .themelist li {
	display: flex;
	gap: 1em;
	align-items: flex-start;
	margin: 0;
	padding: 0.9em 0;
	border-top: 1px solid var(--theme);
}

body.toolkitweb .content .themelist li:last-child {
	border-bottom: 1px solid var(--theme);
}

body.toolkitweb .themelist .themeicon {
	margin-top: 0.05em;
}

body.toolkitweb .content .themelist p {
	margin: 0;
}

body.toolkitweb .themelist-link {
	display: inline-block;
	margin-top: 0.35em;
	font-family: var(--titlefont), monospace;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--theme);
	text-decoration-line: none;
}

body.toolkitweb .themelist-link:hover {
	text-decoration-line: underline;
}

/* Glossary as a definition list */
body.toolkitweb .content .glossary {
	margin: 0;
}

body.toolkitweb .content .glossary dt {
	margin: 0 0 0.5em;
	padding-top: 1.2em;
	border-top: 2px solid var(--yellow);
	font-family: var(--titlefont), monospace;
	font-size: 0.95em;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--grey);
	scroll-margin-top: 20px;
}

body.toolkitweb .content .glossary dd {
	margin: 0 0 1.6em;
	font-size: var(--textsizetoolkitweb);
	line-height: 1.65;
}

/* Toolkit resources as cards (table blocks) */
body.toolkitweb .themesection--tools {
	margin-top: 48px;
}

body.toolkitweb .content .resourcecards-title {
	margin: 0 0 1em;
	font-family: var(--textfont);
	font-size: 1.25em;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
	color: var(--theme, var(--green));
}

body.toolkitweb .content .resourcecards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1em;
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

body.toolkitweb .content .resourcecard {
	margin: 0;
	padding: 1em 1.1em 1.1em;
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--theme, var(--green)) 45%, transparent);
	border-radius: 10px;
	font-size: 0.85em;
	line-height: 1.45;
}

body.toolkitweb .content .resourcecard-name {
	margin: 0 0 0.8em;
	font-family: var(--titlefont), monospace;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
}

body.toolkitweb .resourcecard-name a {
	color: var(--theme, var(--green));
	text-decoration: none;
}

body.toolkitweb .resourcecard dl {
	margin: 0;
}

body.toolkitweb .resourcecard dt {
	margin-top: 0.8em;
	font-family: var(--titlefont), monospace;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--theme, var(--green));
}

body.toolkitweb .resourcecard dd {
	margin: 0.15em 0 0;
}

@media (max-width: 700px) {
	body.toolkitweb .actioncard {
		padding: 1em 1em 1.1em;
	}

	body.toolkitweb .content .themelinks li {
		flex-direction: column;
		gap: 0.1em;
	}
}
