/*
Theme Name: Mind Architect
Theme URI: https://mind-architect.art
Author: Paradigmatiks
Author URI: https://paradigmatiks.com
Description: Theme for Mind Architect, by Paradigmatiks. The homepage is drawn as a CASA map with a red thread that draws itself on scroll. In English at the site address and in French at ?lang=fr. Every text, link and image of the homepage is editable in Appearance > Customize > Mind Architect · Accueil en anglais / en français.
Version: 1.1.0
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
License: All rights reserved
Text Domain: mind-architect
*/

/* Tokens */

:root {
	--ma-ink: #0D0B09;
	--ma-ink-2: #171411;
	--ma-line-d: #2A2520;
	--ma-line-dd: #3A332C;
	--ma-paper: #F4EFE6;
	--ma-paper-2: #EBE4D8;
	--ma-line-l: #D9D0C1;
	--ma-text-l: #3B352E;
	--ma-muted-l: #5C544A;
	--ma-muted-d: #B3AA9C;
	--ma-soft-d: #D8D0C3;
	--ma-ver: #D9452B;
	--ma-emb: #E5622E;
	--ma-amb: #EC8A30;
	--ma-gold: #E6AF47;
	--ma-bronze: #B07A1C;
	--ma-sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ma-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
	--ma-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--ma-pad: clamp(64px, 7vw, 96px);
	--ma-ring: var(--ma-ink);
	--ma-cta-d-bg: var(--ma-paper);
	--ma-cta-d-fg: var(--ma-ink);
	--ma-cta-l-bg: var(--ma-ink);
	--ma-cta-l-fg: var(--ma-paper);
	--ma-cta-l-bd: var(--ma-ink);
	--ma-cta-arrow: var(--ma-ver);
}

body.ma-cta-ember {
	--ma-cta-d-bg: #C23A22;
	--ma-cta-d-fg: #FFFFFF;
	--ma-cta-l-bg: #C23A22;
	--ma-cta-l-fg: #FFFFFF;
	--ma-cta-l-bd: #C23A22;
	--ma-cta-arrow: currentColor;
}

body.ma-cta-gold {
	--ma-cta-d-bg: var(--ma-gold);
	--ma-cta-d-fg: var(--ma-ink);
	--ma-cta-l-bg: var(--ma-gold);
	--ma-cta-l-fg: var(--ma-ink);
	--ma-cta-l-bd: var(--ma-ink);
	--ma-cta-arrow: currentColor;
}

/* Base */

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

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

body {
	margin: 0;
	background: var(--ma-ink);
	color: var(--ma-paper);
	font-family: var(--ma-sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ma-ver); outline-offset: 3px; }

.ma-skip { position: absolute; left: -9999px; top: auto; }
.ma-skip:focus {
	left: 16px; top: 16px; z-index: 1000;
	padding: 10px 16px; border-radius: 999px;
	background: var(--ma-paper); color: var(--ma-ink);
	font-weight: 600; text-decoration: none;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, .gallery-caption { font-size: 14px; color: var(--ma-muted-l); }
.sticky, .bypostauthor { position: relative; }

.ma-wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.ma-ver { color: var(--ma-ver); }
.ma-gold { color: var(--ma-gold); }
.ma-bronze { color: var(--ma-bronze); }
.ma-serif { font-family: var(--ma-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* Buttons */

.ma-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 56px; padding: 0 26px;
	border: 1.5px solid transparent; border-radius: 999px;
	font-family: var(--ma-sans); font-weight: 600; font-size: 17px; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: transform .25s cubic-bezier(.2,.7,.2,1), background-color .2s ease, color .2s ease;
}
.ma-btn:hover { transform: translateY(-2px); }
.ma-btn .ma-arrow { flex: none; stroke: currentColor; }
.ma-btn--solid-d { background: var(--ma-cta-d-bg); color: var(--ma-cta-d-fg); border-color: var(--ma-cta-d-bg); }
.ma-btn--solid-l { background: var(--ma-cta-l-bg); color: var(--ma-cta-l-fg); border-color: var(--ma-cta-l-bd); }
.ma-btn--solid-d .ma-arrow,
.ma-btn--solid-l .ma-arrow { stroke: var(--ma-cta-arrow); }
.ma-btn--ghost-d { color: var(--ma-paper); border-color: var(--ma-paper); }
.ma-btn--ghost-l { color: var(--ma-ink); border-color: var(--ma-ink); }
.ma-btn--sm { min-height: 44px; padding: 0 18px; gap: 8px; font-size: 15px; white-space: nowrap; }
.ma-btn--lg { min-height: 64px; padding: 0 32px; gap: 12px; font-size: 19px; }
.ma-btn--block { display: flex; width: 100%; margin-top: auto; min-height: 52px; padding: 0 16px; font-size: 16px; text-align: center; }
.ma-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ma-sc { margin: 1.4em 0; }

/* Header */

.ma-header { position: relative; z-index: 20; background: var(--ma-ink); color: var(--ma-paper); }
.ma-nav {
	max-width: 1280px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 48px);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
}
.ma-brand { display: flex; flex-direction: column; gap: 2px; color: var(--ma-paper); text-decoration: none; }
.ma-brand__name { font-weight: 700; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; }
.ma-brand__by { font-family: var(--ma-mono); font-size: 10px; letter-spacing: .06em; color: var(--ma-muted-d); }
.custom-logo-link { display: inline-flex; }
.custom-logo { display: block; max-height: 44px; width: auto; }
.ma-navlinks { display: flex; align-items: center; gap: 32px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.ma-navlinks a, .ma-menu-sm a { color: var(--ma-soft-d); text-decoration: none; transition: color .2s ease; }
.ma-navlinks a:hover, .ma-menu-sm a:hover { color: var(--ma-gold); }
.ma-nav__end { display: flex; align-items: center; gap: 12px; }
.ma-menu-sm { display: none; position: relative; }
.ma-menu-sm summary {
	display: flex; align-items: center; min-height: 44px; padding: 0 16px;
	border: 1.5px solid var(--ma-line-dd); border-radius: 999px;
	font-family: var(--ma-mono); font-size: 12px; letter-spacing: .12em;
	color: var(--ma-paper); list-style: none; cursor: pointer;
}
.ma-menu-sm summary::-webkit-details-marker { display: none; }
.ma-menu-sm ul {
	position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
	margin: 0; padding: 10px; list-style: none;
	display: flex; flex-direction: column; gap: 2px;
	background: var(--ma-ink-2); border: 1px solid var(--ma-line-d); border-radius: 16px;
}
.ma-menu-sm li a { display: block; padding: 12px; border-radius: 10px; }

/* Language switch: EN / FR */
.ma-lang { display: inline-flex; align-items: center; font-family: var(--ma-mono); font-size: 12px; letter-spacing: .12em; color: var(--ma-muted-d); }
.ma-lang__on, .ma-lang__to { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 44px; padding: 0 3px; }
.ma-lang__on { color: var(--ma-paper); }
.ma-lang__to { color: var(--ma-muted-d); text-decoration: none; transition: color .2s ease; }
.ma-lang__to:hover { color: var(--ma-gold); }
.ma-lang__sep { padding: 0 2px; color: var(--ma-line-dd); }

/* Hero */

.ma-hero { background: var(--ma-ink); color: var(--ma-paper); overflow: hidden; }
.ma-hero__inner {
	padding-top: clamp(16px, 3vw, 40px); padding-bottom: clamp(56px, 7vw, 96px);
	display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 4vw, 56px);
}
.ma-hero__text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.ma-kicker {
	margin: 0; display: flex; align-items: flex-start; gap: 10px;
	font-family: var(--ma-mono); font-size: 12px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase;
	color: var(--ma-soft-d);
}
.ma-kicker__dot { flex: none; display: inline-block; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--ma-ver); animation: ma-blink 2.4s ease-in-out infinite; }
.ma-h1 { margin: 0; font-weight: 800; font-size: clamp(52px, 7vw, 108px); line-height: .94; letter-spacing: -.045em; }
.ma-h1 .ma-serif { letter-spacing: -.015em; }
.ma-hero__sub { margin: 0; max-width: 520px; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; color: var(--ma-soft-d); }
.ma-hero__note { margin: 0; font-family: var(--ma-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ma-muted-d); }

.ma-brain { flex: 1 1 440px; min-width: 0; position: relative; }
.ma-brain__label {
	position: absolute; top: 0; z-index: 1; margin: 0;
	font-family: var(--ma-mono); font-size: 11px; line-height: 1.7; letter-spacing: .12em; color: var(--ma-paper);
}
.ma-brain__label span { color: var(--ma-muted-d); }
.ma-brain__label--l { left: 0; }
.ma-brain__label--r { right: 0; text-align: right; }
.ma-brain__tilt { transition: transform .9s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.ma-brain svg { display: block; width: 100%; height: auto; overflow: visible; animation: ma-float 9s ease-in-out infinite; }
.ma-blink { animation: ma-blink 3.2s ease-in-out infinite; }
.ma-blink--2 { animation-duration: 2.6s; animation-delay: .8s; }
.ma-blink--3 { animation-duration: 3.6s; animation-delay: 1.4s; }
.ma-glow { animation: ma-pulse 5s ease-in-out infinite; }
.ma-dash { animation: ma-dash 2.8s linear infinite; }

/* Sections */

.ma-sec { position: relative; }
.ma-sec--light { background: var(--ma-paper); color: var(--ma-ink); --ma-ring: var(--ma-paper); }
.ma-sec--dark { background: var(--ma-ink); color: var(--ma-paper); --ma-ring: var(--ma-ink); }
.ma-row { display: flex; }
.ma-content { flex: 1 1 auto; min-width: 0; padding: var(--ma-pad) 0; display: flex; flex-direction: column; gap: clamp(24px, 3vw, 36px); }
.ma-content--tight { gap: clamp(24px, 3vw, 32px); }

.ma-thought { margin: 0; font-family: var(--ma-serif); font-style: italic; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.3; color: var(--ma-muted-l); }
.ma-sec--dark .ma-thought { color: var(--ma-muted-d); }
.ma-eyebrow { margin: 0; font-family: var(--ma-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-muted-l); }
.ma-sec--dark .ma-eyebrow { color: var(--ma-muted-d); }
.ma-h2 { margin: 0; font-weight: 800; font-size: clamp(40px, 5vw, 76px); line-height: .98; letter-spacing: -.04em; }
.ma-h2--xl { font-size: clamp(52px, 7.6vw, 116px); line-height: .92; letter-spacing: -.05em; }
.ma-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 64px; }
.ma-head__main { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ma-head__main--wide { flex-basis: 560px; }
.ma-content > .ma-head__main { flex: none; }
.ma-lead { flex: 1 1 320px; max-width: 440px; margin: 0; font-size: 18px; line-height: 1.6; color: var(--ma-text-l); }
.ma-sec--dark .ma-lead { color: var(--ma-soft-d); }
.ma-bigline { margin: 0; font-family: var(--ma-serif); font-style: italic; font-size: clamp(44px, 6.6vw, 100px); line-height: 1; letter-spacing: -.02em; }
.ma-mono-note { font-family: var(--ma-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-muted-d); }
.ma-mono-note--l { font-size: 11px; color: var(--ma-muted-l); }
.ma-show-sm { display: none; margin: 0; }

/* The red thread */

.ma-thread { flex: none; position: relative; width: 40px; margin-right: 28px; }
.ma-thread__track,
.ma-thread__line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.ma-thread__track { background: rgba(217, 69, 43, .22); }
.ma-sec--dark .ma-thread__track { background: rgba(217, 69, 43, .28); }
.ma-thread__line { background: var(--ma-ver); transform-origin: 50% 0; transform: scaleY(var(--ma-p, 1)); transition: transform .2s linear; }
.ma-thread--start .ma-thread__track,
.ma-thread--start .ma-thread__line { top: 26px; }
.ma-thread--end .ma-thread__track,
.ma-thread--end .ma-thread__line { bottom: calc(var(--ma-pad) + 9px); }
.ma-is { position: absolute; left: 50%; top: 18px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--ma-ver); background: var(--ma-ring); }
.ma-mark { position: absolute; left: calc(50% + 14px); font-family: var(--ma-mono); font-size: 10px; letter-spacing: .12em; white-space: nowrap; }
.ma-mark--is { top: 19px; color: var(--ma-muted-l); }
.ma-mark--fs { left: calc(50% + 16px); bottom: calc(var(--ma-pad) + 2px); color: var(--ma-gold); transition: color .5s ease; }
.ma-node {
	position: absolute; left: 50%; border-radius: 50%;
	background: var(--ma-c); box-shadow: 0 0 0 5px var(--ma-ring);
	transition: background-color .4s ease, color .4s ease, box-shadow .4s ease, transform .4s cubic-bezier(.2,.7,.2,1);
}
.ma-node--l {
	top: calc(var(--ma-pad) - 1px); width: 30px; height: 30px; margin-left: -15px;
	display: flex; align-items: center; justify-content: center;
	color: var(--ma-ink); font-weight: 800; font-size: 13px;
}
.ma-node--d { top: calc(var(--ma-pad) + 7px); width: 14px; height: 14px; margin-left: -7px; }
.ma-fs {
	position: absolute; left: 50%; bottom: var(--ma-pad); width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
	background: var(--ma-gold); box-shadow: 0 0 0 4px var(--ma-ring), 0 0 0 5px var(--ma-gold);
	transition: background-color .5s ease, box-shadow .5s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.ma-js [data-ma-step]:not(.is-lit) .ma-node--l {
	background: var(--ma-ring); color: var(--ma-muted-l);
	box-shadow: inset 0 0 0 1.5px #B9AE9E, 0 0 0 5px var(--ma-ring);
	transform: scale(.86);
}
.ma-js [data-ma-step]:not(.is-lit) .ma-node--d { background: var(--ma-line-d); transform: scale(.8); }
.ma-js .ma-sec--light[data-ma-step]:not(.is-lit) .ma-node--d { background: var(--ma-line-l); }
.ma-js [data-ma-step]:not(.is-done) .ma-fs { background: var(--ma-ring); box-shadow: 0 0 0 4px var(--ma-ring), 0 0 0 5px #8C8273; transform: scale(.85); }
.ma-js [data-ma-step]:not(.is-done) .ma-mark--fs { color: #8C8273; }

/* 02 · Your question */

.ma-ask { display: flex; flex-direction: column; gap: 14px; }
.ma-input {
	width: 100%; min-height: 64px; padding: 0 24px;
	border: 0; border-radius: 16px;
	background: var(--ma-paper); color: var(--ma-ink);
	font-family: var(--ma-serif); font-style: italic; font-size: 24px;
}
.ma-input::placeholder { color: #6A6157; }
.ma-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ma-chip {
	min-height: 44px; padding: 0 16px;
	border: 1.5px solid var(--ma-paper); border-radius: 999px;
	background: transparent; color: var(--ma-paper);
	font-family: var(--ma-sans); font-size: 15px; cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
.ma-chip:hover { background: var(--ma-paper); color: var(--ma-ink); }
.ma-status { margin: 4px 0 0; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ma-soft-d); }
.ma-status--muted { color: var(--ma-muted-d); }
.ma-status__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ma-ver); }

.ma-qgrid {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
	grid-template-areas: "head bridge" "ask ask";
	align-items: center; gap: clamp(32px, 4vw, 48px) clamp(32px, 5vw, 72px);
}
.ma-qgrid__head { grid-area: head; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ma-qgrid .ma-bridge { grid-area: bridge; }
.ma-qgrid .ma-ask { grid-area: ask; }

/* The general map: IS, the four worlds, FS. It draws itself when a question is typed. */
.ma-bridge { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ma-bridge__label { margin: 0; font-family: var(--ma-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-muted-d); }
.ma-bridge__stage { position: relative; container-type: inline-size; }
.ma-bridge__svg { display: block; width: 100%; height: auto; overflow: visible; }
.ma-bridge__track { fill: none; stroke: var(--ma-muted-l); stroke-width: 1.5; stroke-dasharray: 5 9; animation: ma-dash 2.8s linear infinite; }
.ma-bridge__path {
	fill: none; stroke: url(#ma-bridge-grad); stroke-width: 2.5; stroke-linecap: round;
	stroke-dasharray: 100; stroke-dashoffset: 100;
	transition: stroke-dashoffset 1.2s cubic-bezier(.2,.7,.2,1);
}
.ma-bridge__n circle { fill: var(--ma-ink); stroke: var(--ma-muted-l); stroke-width: 1.5; transition: fill .5s ease var(--ma-d), stroke .5s ease var(--ma-d); }
.ma-bridge__n text { fill: var(--ma-muted-d); font-family: var(--ma-sans); font-size: 12px; font-weight: 800; text-anchor: middle; transition: fill .5s ease var(--ma-d); }
.ma-bridge__end circle { fill: var(--ma-ink); stroke-width: 2; transition: fill .6s ease 1s, stroke .6s ease 1s; }
.ma-bridge__end--is circle { stroke: var(--ma-ver); }
.ma-bridge__end--fs circle { stroke: #8C8273; }
.ma-bridge__mono { fill: var(--ma-muted-d); font-family: var(--ma-mono); font-size: 13px; letter-spacing: .14em; text-anchor: middle; transition: fill .6s ease 1s; }
.ma-bridge__end--is .ma-bridge__mono { fill: var(--ma-ver); }
.ma-bridge__word { fill: var(--ma-paper); font-family: var(--ma-serif); font-style: italic; font-size: 19px; text-anchor: middle; }
.ma-bridge--long .ma-bridge__word { font-size: 16px; }
.ma-bridge__q {
	position: absolute; left: 50%; bottom: 4%; width: 52%; margin: 0; transform: translateX(-50%);
	text-align: center; font-family: var(--ma-serif); font-style: italic; font-size: 17px; font-size: clamp(14px, 4.3cqw, 19px); line-height: 1.25;
	color: var(--ma-muted-d); overflow-wrap: anywhere; transition: color .4s ease;
}
.ma-bridge__legend {
	margin: 0; display: flex; justify-content: space-between; gap: 16px;
	font-family: var(--ma-mono); font-size: 11px; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: var(--ma-soft-d);
}
.ma-bridge__leg b { margin-right: 6px; font-weight: 500; }
.ma-bridge__leg--is b { color: var(--ma-ver); }
.ma-bridge__leg--fs { text-align: right; }
.ma-bridge__leg--fs b { color: var(--ma-gold); }
.ma-bridge.has-q .ma-bridge__path { stroke-dashoffset: 0; }
.ma-bridge.has-q .ma-bridge__n circle { fill: var(--ma-c); stroke: var(--ma-c); }
.ma-bridge.has-q .ma-bridge__n text { fill: var(--ma-ink); }
.ma-bridge.has-q .ma-bridge__end--fs circle { stroke: var(--ma-gold); fill: rgba(230, 175, 71, .16); }
.ma-bridge.has-q .ma-bridge__end--fs .ma-bridge__mono { fill: var(--ma-gold); }
.ma-bridge.has-q .ma-bridge__q { color: var(--ma-paper); }
.ma-bridge.has-q .ma-bridge__q span::before { content: "\201C"; }
.ma-bridge.has-q .ma-bridge__q span::after { content: "\201D"; }
.ma-lang-fr .ma-bridge.has-q .ma-bridge__q span::before { content: "\00AB\202F"; }
.ma-lang-fr .ma-bridge.has-q .ma-bridge__q span::after { content: "\202F\00BB"; }

/* 03 · How you function */

.ma-toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.ma-toggle {
	min-height: 52px; padding: 0 26px;
	border: 1.5px solid var(--ma-ink); border-radius: 999px;
	background: transparent; color: var(--ma-ink);
	font-family: var(--ma-sans); font-size: 18px; font-weight: 600; cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
.ma-toggle:hover,
.ma-toggle[aria-pressed="true"] { background: var(--ma-ink); color: var(--ma-paper); }
.ma-reflect { min-height: 72px; }
.ma-reflect__q { margin: 8px 0 0; font-family: var(--ma-serif); font-style: italic; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; }
.ma-reflect__idle { margin: 0; font-family: var(--ma-serif); font-style: italic; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; color: var(--ma-muted-l); }

.ma-fn {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
	grid-template-rows: 1fr auto auto auto auto 1fr;
	grid-template-areas: ". venn" "head venn" "lead venn" "tog venn" "ans venn" ". venn";
	column-gap: clamp(32px, 5vw, 80px);
}
.ma-fn__head { grid-area: head; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ma-fn__lead { grid-area: lead; margin-top: 24px; max-width: 520px; }
.ma-fn__tog { grid-area: tog; margin-top: 32px; }
.ma-fn__ans { grid-area: ans; margin-top: 24px; }
.ma-fn .ma-venn { grid-area: venn; }

/* The consciousness index: three circles that meet, breathe and answer the buttons. */
.ma-venn { margin: 0; align-self: center; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ma-venn__box { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.ma-venn__c {
	position: absolute; width: 58%; height: 58%; border-radius: 50%;
	background: rgba(var(--ma-rgb), .18); border: 1px solid var(--ma-text-l);
	mix-blend-mode: multiply; cursor: pointer;
	transition: background-color .6s ease, border-color .6s ease, border-width .3s ease, scale .6s cubic-bezier(.2,.7,.2,1), translate 1.3s cubic-bezier(.2,.7,.2,1), opacity .9s ease;
	animation: ma-drift-t 9s ease-in-out infinite;
}
.ma-venn__c--t { left: 6%; top: 4%; --ma-rgb: 217, 69, 43; }
.ma-venn__c--e { left: 36%; top: 4%; --ma-rgb: 236, 138, 48; animation-name: ma-drift-e; animation-duration: 10s; }
.ma-venn__c--b { left: 21%; top: 34%; --ma-rgb: 230, 175, 71; animation-name: ma-drift-b; animation-duration: 11s; }
.ma-venn__c:hover { border-color: var(--ma-ink); }
.ma-venn__c.is-on { background: rgba(var(--ma-rgb), .46); border: 2.5px solid var(--ma-ink); scale: 1.04; }
.ma-venn.has-pick .ma-venn__c:not(.is-on) { background: rgba(var(--ma-rgb), .1); }
.ma-venn__l, .ma-venn__i, .ma-venn__dot { position: absolute; transform: translate(-50%, -50%); pointer-events: none; transition: opacity .5s ease, color .4s ease; }
.ma-venn.is-wait .ma-venn__l, .ma-venn.is-wait .ma-venn__i, .ma-venn.is-wait .ma-venn__dot { transition-delay: .7s; }
.ma-venn__l { font-family: var(--ma-mono); font-size: 11px; letter-spacing: .14em; white-space: nowrap; color: var(--ma-text-l); }
.ma-venn__l.is-on { color: var(--ma-ink); font-weight: 500; }
.ma-venn__l--t { left: 22%; top: 24%; }
.ma-venn__l--e { left: 78%; top: 24%; }
.ma-venn__l--b { left: 50%; top: 82%; }
.ma-venn__i { font-family: var(--ma-serif); font-style: italic; font-size: 17px; white-space: nowrap; color: var(--ma-ink); }
.ma-venn__i--te { left: 50%; top: 21%; }
.ma-venn__i--tb { left: 32%; top: 57%; }
.ma-venn__i--eb { left: 68%; top: 57%; }
.ma-venn.has-pick .ma-venn__i { opacity: .4; }
.ma-venn.has-pick .ma-venn__i.is-near { opacity: 1; }
.ma-venn__dot { left: 50%; top: 44%; width: 10px; height: 10px; border-radius: 50%; background: var(--ma-ver); }
.ma-venn__cap { font-family: var(--ma-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-muted-l); }
/* Before they come into view, the circles wait apart. */
.ma-venn.is-prep .ma-venn__c, .ma-venn.is-prep .ma-venn__l, .ma-venn.is-prep .ma-venn__i, .ma-venn.is-prep .ma-venn__dot { transition: none; }
.ma-venn.is-wait:not(.is-in) .ma-venn__c { opacity: 0; }
.ma-venn.is-wait:not(.is-in) .ma-venn__c--t { translate: -24% -16%; }
.ma-venn.is-wait:not(.is-in) .ma-venn__c--e { translate: 24% -16%; }
.ma-venn.is-wait:not(.is-in) .ma-venn__c--b { translate: 0 26%; }
.ma-venn.is-wait:not(.is-in) .ma-venn__l,
.ma-venn.is-wait:not(.is-in) .ma-venn__i,
.ma-venn.is-wait:not(.is-in) .ma-venn__dot { opacity: 0; }

/* 04 · The system around you */

.ma-profiles { display: flex; flex-wrap: wrap; gap: 24px; }
.ma-profile { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 2px solid var(--ma-c); }
.ma-profile__label { margin: 0; font-family: var(--ma-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-muted-d); }
.ma-profile__word { margin: 0; font-family: var(--ma-serif); font-style: italic; font-size: 30px; line-height: 1.1; }

/* 05 · The method: CASA explained, from the initial situation (IS) to the final situation (FS) */

.ma-journey {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, .8fr) minmax(0, 1fr);
	align-items: center; gap: 20px clamp(20px, 3vw, 40px);
}
.ma-journey__end { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.ma-journey__end--fs { flex-direction: row-reverse; text-align: right; }
.ma-journey__mark {
	flex: none; width: 52px; height: 52px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	border: 2px solid var(--ma-ver); background: var(--ma-paper); color: var(--ma-ink);
	font-family: var(--ma-mono); font-size: 13px; font-weight: 500; letter-spacing: .08em;
	transition: background-color .6s ease .9s, border-color .6s ease .9s, box-shadow .6s ease .9s;
}
.ma-journey__end--fs .ma-journey__mark { border-color: var(--ma-gold); background: rgba(230, 175, 71, .22); box-shadow: 0 0 0 6px rgba(230, 175, 71, .16); }
.ma-journey__txt { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ma-journey__name { margin: 0; font-family: var(--ma-serif); font-style: italic; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.1; }
.ma-journey__def { margin: 0; max-width: 360px; font-size: 15px; line-height: 1.5; color: var(--ma-muted-l); text-wrap: pretty; }
.ma-journey__end--fs .ma-journey__def { margin-left: auto; }
.ma-journey__path { display: flex; gap: 6px; }
.ma-journey__seg { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ma-journey__seg b { font-family: var(--ma-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; }
.ma-journey__seg i { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--ma-c); transform-origin: 0 50%; transition: transform .5s cubic-bezier(.2,.7,.2,1) var(--ma-d); }

.ma-worlds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ma-world {
	min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 28px;
	border-radius: 24px; background: var(--ma-ink); color: var(--ma-paper);
}
.ma-world__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ma-world__num { font-family: var(--ma-mono); font-size: 12px; letter-spacing: .14em; color: var(--ma-muted-d); }
.ma-world__icon { flex: none; display: block; width: 64px; height: 64px; }
.ma-world__icon [pathLength] { stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1) calc(var(--ma-d) + .2s); }
.ma-world__icon .ma-fade { transition: opacity .6s ease calc(var(--ma-d) + 1.1s); }
.ma-world__title { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.ma-world__letter { font-weight: 800; font-size: 84px; line-height: .8; letter-spacing: -.05em; color: var(--ma-c); }
.ma-world__name { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.ma-world__q { margin: 0; font-family: var(--ma-serif); font-style: italic; font-size: 27px; line-height: 1.15; text-wrap: balance; }
.ma-world__text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ma-muted-d); text-wrap: pretty; }
.ma-world__lens {
	margin: auto 0 0; align-self: flex-start; padding: 8px 12px; border: 1px solid var(--ma-c); border-radius: 12px;
	font-family: var(--ma-mono); font-size: 11px; line-height: 1.5; letter-spacing: .1em;
}

/* Drawn the first time they come into view (never when animations are reduced). */
[data-ma-reveal].is-prep, [data-ma-reveal].is-prep * { transition: none !important; }
.ma-journey.is-wait:not(.is-in) .ma-journey__seg i { transform: scaleX(0); }
.ma-journey.is-wait:not(.is-in) .ma-journey__end--fs .ma-journey__mark { border-color: #B9AE9E; background: var(--ma-paper); box-shadow: 0 0 0 0 rgba(230, 175, 71, 0); }
.ma-world.is-wait:not(.is-in) .ma-world__icon [pathLength] { stroke-dashoffset: 100; }
.ma-world.is-wait:not(.is-in) .ma-world__icon .ma-fade { opacity: 0; }

/* 05 · The method: the CASA map */

.ma-mapcard { display: flex; flex-direction: column; gap: 20px; padding: clamp(20px, 3vw, 40px); border-radius: 28px; background: var(--ma-ink); color: var(--ma-paper); }
.ma-mapcard__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ma-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--ma-line-dd); border-radius: 999px; }
.ma-seg button {
	min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
	background: transparent; color: var(--ma-paper);
	font-family: var(--ma-mono); font-size: 12px; letter-spacing: .1em; cursor: pointer;
}
.ma-seg button[aria-pressed="true"] { background: var(--ma-paper); color: var(--ma-ink); }
.ma-seg--light { border-color: var(--ma-ink); }
.ma-seg--light button { min-width: 80px; color: var(--ma-ink); font-size: 13px; letter-spacing: .08em; }
.ma-seg--light button[aria-pressed="true"] { background: var(--ma-ink); color: var(--ma-paper); }
.ma-panel { display: flex; flex-direction: column; gap: 20px; }
.ma-map-scroll { overflow-x: auto; }
.ma-map { position: relative; min-width: 960px; aspect-ratio: 2.4 / 1; }
.ma-map svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ma-map__sep { position: absolute; top: 4%; height: 80%; border-left: 1px dashed var(--ma-line-dd); }
.ma-map__circle {
	position: absolute; transform: translate(-50%, -50%); border-radius: 50%;
	display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
	background: var(--ma-ink);
}
.ma-map__circle--is { width: 180px; height: 180px; gap: 8px; padding: 20px; border: 2px solid var(--ma-ver); }
.ma-map__circle--fs { width: 120px; height: 120px; gap: 6px; padding: 14px; border: 2px solid var(--ma-gold); }
.ma-map__circle--is-ex { width: 150px; height: 150px; gap: 4px; padding: 18px; border: 2px solid var(--ma-ver); }
.ma-map__circle--fs-ex { width: 130px; height: 130px; gap: 4px; padding: 16px; border: 2px solid var(--ma-gold); }
.ma-map__mono { font-family: var(--ma-mono); font-size: 11px; letter-spacing: .14em; }
.ma-map__q { font-family: var(--ma-serif); font-style: italic; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.ma-map__fs { font-family: var(--ma-serif); font-style: italic; font-size: 17px; line-height: 1.15; }
.ma-map__big { font-weight: 700; font-size: 18px; }
.ma-map__small { font-size: 13px; line-height: 1.3; color: var(--ma-soft-d); }
.ma-map__node {
	position: absolute; transform: translate(-50%, -50%); max-width: 160px; padding: 9px 14px;
	border: 1.5px solid var(--ma-c); border-radius: 22px; background: var(--ma-ink);
	font-size: 14px; line-height: 1.25; text-align: center;
}
.ma-map__node--nw { max-width: none; padding: 8px 14px; white-space: nowrap; }
.ma-map__tag {
	position: absolute; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 999px;
	background: var(--ma-c); color: var(--ma-ink);
	font-family: var(--ma-mono); font-size: 11px; letter-spacing: .12em;
}
.ma-map__letter {
	position: absolute; top: 93%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--ma-c); color: var(--ma-c); font-weight: 800; font-size: 15px;
}
.ma-caption { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ma-muted-d); }
.ma-caption__label { font-family: var(--ma-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-gold); }
.ma-mapcard__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--ma-line-d); }
.ma-mapcard__foot p { margin: 0; font-size: 17px; color: var(--ma-soft-d); }

/* The same map, read from top to bottom on small screens. */
.ma-vmap { display: none; position: relative; margin: 0; padding: 0; list-style: none; flex-direction: column; gap: 14px; }
.ma-vmap::before {
	content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px;
	background: linear-gradient(var(--ma-ver), var(--ma-emb) 35%, var(--ma-amb) 65%, var(--ma-gold));
}
.ma-vmap__row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 14px; }
.ma-vmap__disc {
	width: 56px; height: 56px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	border: 2px solid var(--ma-c); background: var(--ma-ink); color: var(--ma-c);
	font-family: var(--ma-mono); font-size: 14px; font-weight: 500; letter-spacing: .1em;
}
.ma-vmap__disc--fs { box-shadow: 0 0 0 6px rgba(230, 175, 71, .12); }
.ma-vmap__letter {
	justify-self: center; width: 36px; height: 36px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--ma-c); background: var(--ma-ink); color: var(--ma-c); font-weight: 800; font-size: 15px;
}
.ma-vmap__body { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ma-vmap__node { padding: 8px 14px; border: 1.5px solid var(--ma-c); border-radius: 20px; background: var(--ma-ink); font-size: 15px; line-height: 1.3; }
.ma-vmap__tag { padding: 5px 10px; border-radius: 999px; background: var(--ma-c); color: var(--ma-ink); font-family: var(--ma-mono); font-size: 10px; letter-spacing: .12em; }
.ma-vmap__q,
.ma-vmap__fs { flex-basis: 100%; font-family: var(--ma-serif); font-style: italic; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.ma-vmap__small { flex-basis: 100%; font-size: 14px; line-height: 1.35; color: var(--ma-soft-d); }

/* 06 · The architect */

.ma-about { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; }
.ma-portrait {
	flex: none; width: 168px; height: 168px; border-radius: 50%; overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	border: 1.5px dashed var(--ma-muted-l); background: var(--ma-ink-2);
	font-family: var(--ma-mono); font-size: 11px; letter-spacing: .12em; color: var(--ma-gold);
}
.ma-portrait.has-img { border: 0; }
.ma-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ma-about__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ma-name { font-size: clamp(36px, 4.2vw, 60px); line-height: 1; }
.ma-quote { margin: 0; font-family: var(--ma-serif); font-style: italic; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; }
.ma-about__bio { margin: 0; max-width: 680px; font-size: 18px; line-height: 1.6; color: var(--ma-soft-d); }
.ma-creds { margin: 0; font-family: var(--ma-mono); font-size: 11px; line-height: 1.8; letter-spacing: .12em; text-transform: uppercase; color: var(--ma-muted-d); }

/* 07 · Formats and pricing */

.ma-cards { display: flex; flex-wrap: wrap; align-items: stretch; gap: 16px; }
.ma-card {
	flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 16px;
	padding: clamp(22px, 2.6vw, 30px); border-radius: 24px;
	transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.ma-card:hover { transform: translateY(-6px); }
.ma-card--paper { background: var(--ma-paper-2); color: var(--ma-ink); }
.ma-card--ink { flex-basis: 300px; background: var(--ma-ink); color: var(--ma-paper); --ma-ring: var(--ma-ink); container-type: inline-size; }
/* The module price shrinks with its card, so it always stays on one line. */
.ma-card--ink .ma-card__big { font-size: 52px; font-size: min(52px, 18cqi); }
.ma-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ma-card__label { margin: 0; font-family: var(--ma-mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-muted-l); }
.ma-card--ink .ma-card__label { color: var(--ma-muted-d); }
.ma-card__price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.ma-card__big { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.ma-card__big--md { font-size: 40px; line-height: 1.05; letter-spacing: -.04em; }
.ma-card__sub { font-size: 16px; color: var(--ma-muted-l); }
.ma-card--ink .ma-card__sub { color: var(--ma-muted-d); }
.ma-card__text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ma-text-l); }
.ma-card--ink .ma-card__text { color: var(--ma-soft-d); }
.ma-tag { padding: 6px 10px; border: 1px solid var(--ma-gold); border-radius: 999px; font-family: var(--ma-mono); font-size: 11px; letter-spacing: .1em; color: var(--ma-gold); }
.ma-letters { display: flex; gap: 6px; }
.ma-letters span {
	width: 28px; height: 28px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--ma-c); color: var(--ma-c); font-weight: 800; font-size: 12px;
}
.ma-card__single { margin: -8px 0 0; font-size: 15px; color: var(--ma-muted-d); }
.ma-card__single span { font-weight: 600; color: var(--ma-paper); }
.ma-card__pays { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ma-card__pay { align-self: center; font-size: 14px; color: var(--ma-soft-d); text-decoration: underline; text-decoration-color: var(--ma-gold); text-underline-offset: 4px; }
.ma-card__pay:hover { color: var(--ma-gold); }
.ma-note { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ma-muted-l); }

/* 08 · What has moved */

.ma-echo { margin: 0; max-width: 680px; font-size: 20px; line-height: 1.55; color: var(--ma-soft-d); }
.ma-echo__q { font-family: var(--ma-serif); font-style: italic; font-size: 24px; color: var(--ma-paper); }
.ma-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* 08 · One more door: the Mirror Labyrinth, behind it. */
.ma-door {
	display: flex; align-items: center; gap: clamp(18px, 3vw, 28px);
	margin-top: clamp(28px, 5vw, 56px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--ma-line-d);
}
.ma-door__gate { flex: none; display: block; padding: 6px 10px 10px; perspective: 420px; text-decoration: none; }
.ma-door__frame {
	position: relative; display: block; width: 58px; height: 92px;
	border: 1.5px solid #8C8273; border-bottom-width: 0; border-radius: 29px 29px 2px 2px;
	transition: border-color 1.2s ease, box-shadow 1.6s ease;
}
.ma-door__frame::after {
	content: ""; position: absolute; left: -14px; right: -14px; bottom: -8px; height: 10px; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(230, 175, 71, .5), rgba(230, 175, 71, 0));
	opacity: 0; transition: opacity 1.6s ease;
}
.ma-door__light {
	position: absolute; inset: 0; border-radius: 27px 27px 0 0;
	background: radial-gradient(ellipse 80% 70% at 50% 72%, #F4EFE6 0%, #E6AF47 38%, #E5622E 78%, #8F3A1C 100%);
	opacity: .12; transition: opacity 1.6s ease;
}
.ma-door__leaf {
	position: absolute; inset: 0; border-radius: 27px 27px 0 0;
	background: linear-gradient(90deg, #1E1A16, #14110E); box-shadow: inset 0 0 0 1px #3A332C;
	transform-origin: 0 50%; transform: rotateY(0deg);
	transition: transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.ma-door__knob { position: absolute; right: 9px; top: 52%; width: 4px; height: 4px; border-radius: 50%; background: var(--ma-gold); }
.ma-door.is-ajar .ma-door__frame { border-color: var(--ma-soft-d); box-shadow: 0 0 36px rgba(230, 175, 71, .2); }
.ma-door.is-ajar .ma-door__frame::after { opacity: 1; }
.ma-door.is-ajar .ma-door__light { opacity: 1; }
.ma-door.is-ajar .ma-door__leaf { transform: rotateY(-26deg); }
.ma-door.is-ajar .ma-door__gate:hover .ma-door__leaf { transform: rotateY(-44deg); }
.ma-door.is-ajar:has(.ma-door__link:hover) .ma-door__leaf { transform: rotateY(-44deg); }
.ma-door.is-ajar:has(.ma-door__link:focus-visible) .ma-door__leaf { transform: rotateY(-44deg); }
.ma-door.is-open .ma-door__leaf { transform: rotateY(-108deg); transition-duration: .9s; }
.ma-door__txt { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ma-door__eyebrow { margin: 0; font-family: var(--ma-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-gold); }
.ma-door__line { margin: 0; max-width: 34em; font-family: var(--ma-serif); font-style: italic; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.25; color: var(--ma-soft-d); text-wrap: pretty; }
.ma-door__go { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.ma-door__link {
	display: inline-flex; align-items: center; gap: 10px; color: var(--ma-paper); font-weight: 600; font-size: 16px;
	text-decoration: underline; text-decoration-color: var(--ma-gold); text-underline-offset: 5px;
}
.ma-door__link:hover { color: var(--ma-gold); }

/* The labyrinth in full screen, and the light that comes through the door. */
.ma-lab { position: fixed; inset: 0; z-index: 1001; background: var(--ma-ink); opacity: 0; transition: opacity .7s ease; }
.ma-lab.is-in { opacity: 1; }
.ma-lab__frame { display: block; width: 100%; height: 100%; border: 0; background: var(--ma-ink); }
/* Only if the labyrinth could not be loaded: a way back all the same. */
.ma-lab__close {
	position: absolute; top: 12px; right: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0;
	border: 0; background: none; cursor: pointer; color: var(--ma-muted-d);
	font-family: var(--ma-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.ma-lab__close:hover { color: var(--ma-paper); }
.ma-lab__close svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
html.ma-lab-open, html.ma-lab-open body { overflow: hidden; }
.ma-lab-glow {
	position: fixed; z-index: 1000; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(244, 239, 230, .95), rgba(230, 175, 71, .9) 28%, rgba(229, 98, 46, .55) 52%, #0D0B09 78%);
	opacity: 0; transform: scale(0); pointer-events: none;
	transition: transform 1s cubic-bezier(.55,0,.3,1), opacity .5s ease;
}
.ma-lab-glow.is-on { opacity: 1; transform: scale(var(--ma-glow-s, 60)); }

/* Footer */

.ma-footer { padding: clamp(56px, 7vw, 96px) 0 32px; background: var(--ma-ink); color: var(--ma-paper); border-top: 1px solid var(--ma-line-d); }
.ma-footer__inner { display: flex; flex-direction: column; gap: 36px; }
.ma-wordmark { margin: 0; font-weight: 800; font-size: clamp(30px, 8.2vw, 120px); line-height: .95; letter-spacing: -.05em; overflow-wrap: anywhere; }
.ma-wordmark span { font-family: var(--ma-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--ma-gold); }
.ma-footnav { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.ma-footnav a, .ma-legal a { color: var(--ma-soft-d); text-decoration: none; transition: color .2s ease; }
.ma-footnav a:hover, .ma-legal a:hover { color: var(--ma-gold); }
.ma-ps { margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--ma-serif); font-style: italic; font-size: 17px; line-height: 1.5; color: var(--ma-muted-d); }
.ma-ps__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ma-ver); }
.ma-legal {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
	padding-top: 24px; border-top: 1px solid var(--ma-line-d);
	font-family: var(--ma-mono); font-size: 11px; line-height: 1.7; letter-spacing: .08em; color: var(--ma-muted-d);
}

/* Inner pages: resources, tests, legal pages */

.ma-page-title { margin: 0; font-weight: 800; font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -.04em; }
.ma-meta { margin: 0; font-family: var(--ma-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ma-muted-l); }
.ma-featured { margin: 0; border-radius: 24px; overflow: hidden; }
.ma-featured img { display: block; width: 100%; height: auto; }
.ma-prose { max-width: 760px; font-size: 18px; line-height: 1.7; color: var(--ma-text-l); }
.ma-prose > *:first-child { margin-top: 0; }
.ma-prose h2 { margin: 1.8em 0 .5em; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: var(--ma-ink); }
.ma-prose h3 { margin: 1.6em 0 .4em; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--ma-ink); }
.ma-prose h4 { margin: 1.4em 0 .4em; font-size: 20px; font-weight: 700; color: var(--ma-ink); }
.ma-prose p, .ma-prose ul, .ma-prose ol { margin: 0 0 1.1em; }
.ma-prose ul, .ma-prose ol { padding-left: 1.2em; }
.ma-prose li { margin-bottom: .4em; }
.ma-prose a { color: var(--ma-ink); text-decoration: underline; text-decoration-color: var(--ma-ver); text-underline-offset: 4px; }
.ma-prose strong { color: var(--ma-ink); }
.ma-prose blockquote { margin: 1.6em 0; padding: 0; font-family: var(--ma-serif); font-style: italic; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.25; color: var(--ma-ink); }
.ma-prose img { height: auto; border-radius: 16px; }
.ma-prose figure { margin: 1.6em 0; }
.ma-prose figcaption { margin-top: 8px; font-size: 14px; color: var(--ma-muted-l); }
.ma-prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--ma-line-l); }
.ma-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ma-prose th, .ma-prose td { padding: 10px 12px; border-bottom: 1px solid var(--ma-line-l); text-align: left; }
.ma-prose code { padding: 2px 6px; border-radius: 6px; background: var(--ma-paper-2); font-family: var(--ma-mono); font-size: .9em; }
.ma-prose .wp-block-button__link {
	display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 999px;
	background: var(--ma-cta-l-bg); color: var(--ma-cta-l-fg); font-weight: 600; text-decoration: none;
}
.ma-prose .wp-block-separator { border-color: var(--ma-line-l); }
.ma-postnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid var(--ma-line-l); font-size: 16px; }
.ma-postnav a { color: var(--ma-ink); text-decoration: none; }
.ma-postnav a:hover { color: var(--ma-ver); }

.ma-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ma-post-card {
	display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 24px;
	background: var(--ma-paper-2); color: var(--ma-ink); text-decoration: none;
	transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.ma-post-card:hover { transform: translateY(-6px); }
.ma-post-card__title { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.ma-post-card__excerpt { font-size: 16px; line-height: 1.55; color: var(--ma-text-l); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
	border: 1.5px solid var(--ma-ink); border-radius: 999px; color: var(--ma-ink); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--ma-ink); color: var(--ma-paper); }

.ma-band__inner { padding-top: var(--ma-pad); padding-bottom: var(--ma-pad); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }

/* Small screens */

@media (max-width: 880px) {
	.ma-navlinks { display: none; }
	.ma-menu-sm { display: block; }
	.ma-brain__label { display: none; }
	.ma-show-sm { display: block; }
	.ma-thread { width: 30px; margin-right: 14px; }

	.ma-qgrid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "ask" "bridge"; }
	.ma-qgrid .ma-bridge { width: 100%; max-width: 460px; }
	.ma-bridge__stage { display: contents; }
	.ma-bridge__svg { order: 1; }
	.ma-bridge__legend { order: 2; }
	.ma-bridge__q { order: 3; position: static; width: auto; margin-top: 6px; transform: none; font-size: 19px; }

	.ma-journey { grid-template-columns: minmax(0, 1fr); }
	.ma-journey__end--fs { flex-direction: row; text-align: left; }
	.ma-journey__end--fs .ma-journey__def { margin-left: 0; }
	.ma-journey__path { order: 0; }

	.ma-fn { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "lead" "venn" "tog" "ans"; }
	.ma-fn .ma-venn { justify-self: center; max-width: 360px; margin-top: 28px; }

	.ma-map-scroll { display: none; }
	.ma-vmap { display: flex; }
}

@media (max-width: 1180px) {
	.ma-worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.ma-worlds { grid-template-columns: minmax(0, 1fr); }
	.ma-world { --ma-d: 0s !important; padding: 24px; }
	.ma-world__letter { font-size: 72px; }
}

@media (max-width: 600px) {
	.ma-bridge__mono { font-size: 15px; }
	.ma-bridge__n text { font-size: 14px; }
	.ma-bridge__legend { gap: 8px; font-size: 10px; letter-spacing: .06em; }
}

@media (max-width: 480px) {
	.ma-seg button { padding: 0 12px; font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
	.ma-toggle { min-height: 48px; padding: 0 16px; font-size: 16px; }
}

/* Header: below 1100px the language switch shows only the other language; below 560px the header button
   gives way (the same button opens the page, just below). */
@media (max-width: 1100px) {
	.ma-lang__on, .ma-lang__sep { display: none; }
	.ma-navlinks { gap: 24px; }
}

@media (max-width: 560px) {
	.ma-nav { column-gap: 16px; }
	.ma-nav__cta { display: none; }
}

/* French: a few words are longer than in English. */
.ma-lang-fr .ma-h1 { font-size: clamp(44px, 13.6vw, 52px); }
@media (min-width: 700px) {
	.ma-lang-fr .ma-h1 { font-size: clamp(52px, 6.2vw, 90px); }
}
@media (max-width: 699px) {
	.ma-lang-fr .ma-h2--xl { font-size: clamp(40px, 12.5vw, 52px); }
}

/* Motion */

@keyframes ma-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ma-dash { to { stroke-dashoffset: -56; } }
@keyframes ma-pulse { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
@keyframes ma-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes ma-drift-t { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-2%, -1.6%); } }
@keyframes ma-drift-e { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2%, -1.6%); } }
@keyframes ma-drift-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(0, 2.2%); } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
