/* PediaMath base: tokens, header, listings, footer. Loaded on every page. */

:root {
	--bg: #ffffff; --paper: #f3f4f6; --grid: rgba(23, 26, 31, .06);
	--ink: #171a1f; --ink2: #5b616b; --line: rgba(23, 26, 31, .13);
	--acc: #e8700c; --acc-text: #b4580a; --tr: #2f6fd8;
	--chip: #eef0f3; --chip-on: #171a1f; --chip-on-text: #ffffff;
	--overlay: rgba(10, 12, 15, .82);
	--radius: 12px;
	--wrap: 1408px; --gutter: 24px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1114; --paper: #181b20; --grid: rgba(233, 236, 240, .05);
		--ink: #e9ecf0; --ink2: #9aa1ab; --line: rgba(233, 236, 240, .14);
		--acc: #ff8a2a; --acc-text: #ff9d4d; --tr: #8ec9ff;
		--chip: #22262c; --chip-on: #e9ecf0; --chip-on-text: #0f1114;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: inherit; }
img, svg { max-width: 100%; }
.katex svg { max-width: none; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pm-skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.pm-skip:focus { top: 10px; }

/* Header -------------------------------------------------------------- */
.pm-top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid transparent; }
.pm-top-inner { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; gap: 20px; height: 64px; padding: 0 var(--gutter); }
.pm-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.02em; text-decoration: none; flex: none; }
.pm-logo svg { width: 30px; height: 30px; }
.pm-logo-ring { fill: none; stroke: currentColor; stroke-width: 1.8; }
.pm-logo-axis { stroke: currentColor; stroke-width: 1; stroke-dasharray: 5 1.6 1.2 1.6; opacity: .5; }
.pm-logo-dot { fill: var(--acc); }

.pm-search { position: relative; flex: 1; max-width: 600px; margin: 0 auto; display: flex; }
.pm-search input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; padding: 0 18px; background: var(--bg); font-size: 15px; }
.pm-search input::placeholder { color: var(--ink2); }
.pm-search input::-webkit-search-cancel-button { display: none; }
.pm-search button { width: 64px; height: 42px; border: 1px solid var(--line); border-radius: 0 999px 999px 0; background: var(--chip); display: grid; place-items: center; }
.pm-search svg, .pm-icon-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }
.pm-live { position: absolute; top: 48px; left: 0; right: 64px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: 6px; max-height: min(70vh, 480px); overflow: auto; }
.pm-live a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; line-height: 1.35; }
.pm-live a[aria-selected="true"], .pm-live a:hover { background: var(--chip); }
.pm-live small { display: block; color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.pm-live .pm-live-all { font-weight: 600; font-size: 14px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.pm-live p { margin: 8px 12px; color: var(--ink2); font-size: 14px; }
.pm-live[aria-busy="true"] > a { opacity: .55; transition: opacity .15s; }
.pm-live .pm-live-head { margin: 6px 12px 4px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.pm-live-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 8px; }
.pm-live-chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; line-height: 1.3; }
.pm-live-wait { display: flex; align-items: center; gap: 10px; }
.pm-live-spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--ink2); border-radius: 50%; animation: pm-spin .7s linear infinite; flex: none; }
@keyframes pm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pm-live-spin { animation-duration: 2s; } }

.pm-icon-btn { display: none; width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; place-items: center; }

.pm-nav { flex: none; }
.pm-menu, .pm-menu ul { list-style: none; margin: 0; padding: 0; }
.pm-menu { display: flex; gap: 4px; }
/* Programme menus (inc/maroc.php): both are in the HTML, the French one shows by default;
   html.pm-prog-ma, set before the first paint, shows the Moroccan one instead. */
.pm-menu--ma, html.pm-prog-ma .pm-nav > .pm-menu { display: none; }
html.pm-prog-ma .pm-nav > .pm-menu--ma { display: flex; }
.pm-menu > li { position: relative; }
.pm-menu a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink2); }
.pm-menu a:hover, .pm-menu a[aria-current="page"] { color: var(--ink); }
.pm-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--ink2); }
.pm-menu summary::-webkit-details-marker { display: none; }
.pm-menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.pm-menu summary:hover, .pm-menu details[open] > summary { color: var(--ink); }
.pm-sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); z-index: 30; }
.pm-sub a { color: var(--ink); padding: 8px 12px; }
.pm-sub a:hover { background: var(--chip); }
.pm-sub a[aria-current="page"] { background: var(--chip); font-weight: 600; }
.pm-sub .pm-sub-track a { padding-left: 26px; font-size: 14px; color: var(--ink2); }
.pm-sub .pm-sub-all { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.pm-sub .pm-sub-all a { font-size: 14px; color: var(--ink2); }

/* Chips ---------------------------------------------------------------- */
.pm-chips { max-width: var(--wrap); margin: 0 auto; padding: 4px var(--gutter) 14px; }
.pm-chips ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.pm-chips ul::-webkit-scrollbar { display: none; }
@media (min-width: 961px) { .pm-chips ul { flex-wrap: wrap; overflow: visible; } }
.pm-chip { display: block; flex: none; white-space: nowrap; background: var(--chip); border-radius: 8px; padding: 7px 13px; font-size: 14px; font-weight: 500; text-decoration: none; }
.pm-chip:hover { filter: brightness(.96); }
.pm-chip.is-on { background: var(--chip-on); color: var(--chip-on-text); }

/* Layout --------------------------------------------------------------- */
.pm-main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 48px; }
.pm-section { margin-top: 8px; }
.pm-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.pm-section-head h2 { font-size: 21px; letter-spacing: -.015em; margin: 0; }
.pm-section-head a { font-size: 14px; font-weight: 600; color: var(--ink2); text-decoration: none; white-space: nowrap; }

.pm-paper { background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 16px 16px; border-radius: var(--radius); }

.pm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 0; text-decoration: none; background: var(--chip); color: var(--ink); }
.pm-btn--primary { background: var(--ink); color: var(--bg); }
.pm-btn:hover { filter: brightness(1.08); }

/* Hero ----------------------------------------------------------------- */
.pm-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: center; padding: 28px 0 56px; }
.pm-hero h1 { font-size: 46px; line-height: 1.06; letter-spacing: -.03em; margin: 0 0 18px; max-width: 13ch; }
.pm-hero p { font-size: 17px; line-height: 1.55; color: var(--ink2); margin: 0 0 26px; max-width: 44ch; }
.pm-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pm-promises { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink2); }
.pm-promises li::before { content: ""; display: inline-block; width: 9px; height: 5px; border: solid var(--acc); border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-3px); margin-right: 9px; }
.pm-hero-paper { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.pm-hero-paper svg { display: block; width: 100%; height: 100%; }

/* Cards ---------------------------------------------------------------- */
.pm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 18px; }
.pm-card { position: relative; }
.pm-card-link { display: block; text-decoration: none; }
.pm-cover { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 16px 16px; transition: border-radius .2s; }
.pm-card-link:hover .pm-cover { border-radius: 4px; }
.pm-cover-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.pm-cover-text { position: absolute; left: 16px; top: 12px; bottom: 12px; width: 46%; display: flex; flex-direction: column; justify-content: center; font-weight: 700; font-size: 21px; line-height: 1.12; letter-spacing: -.02em; text-shadow: 0 0 4px var(--paper), 0 0 8px var(--paper), 0 0 12px var(--paper); }
.pm-cover-text small { font-size: 12.5px; font-weight: 500; color: var(--ink2); letter-spacing: 0; margin-bottom: 6px; }
.pm-badge { position: absolute; right: 8px; bottom: 8px; background: var(--overlay); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2; padding: 3px 7px; border-radius: 5px; }
.pm-card-title { font-size: 15px; line-height: 1.38; font-weight: 600; margin: 12px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-card-meta { font-size: 13.5px; color: var(--ink2); margin: 0; }

.pm-mini { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px; align-items: start; text-decoration: none; }
.pm-cover--mini { border-radius: 8px; background-size: 12px 12px; }
.pm-cover--mini .pm-cover-text { font-size: 12.5px; left: 8px; width: 52%; }
.pm-cover--mini .pm-badge { font-size: 11px; padding: 2px 5px; right: 5px; bottom: 5px; }
.pm-mini-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 4px; }
.pm-mini-meta { display: block; font-size: 12.5px; color: var(--ink2); }
.pm-mini-list { display: grid; gap: 14px; }

/* Featured tool -------------------------------------------------------- */
.pm-feature { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border: 1.5px solid var(--acc); border-radius: 18px; overflow: hidden; }
.pm-feature .pm-paper { border-radius: 0; aspect-ratio: 16 / 9; }
.pm-feature .pm-paper svg { display: block; width: 100%; height: 100%; }
.pm-feature-text { padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.pm-kicker { font-size: 14px; font-weight: 600; color: var(--acc-text); margin: 0 0 8px; }
.pm-feature h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; }
.pm-feature p { color: var(--ink2); margin: 0 0 22px; max-width: 42ch; }

/* Engineering-drawing frame: thin border with corner marks (shared). */
.pm-frame {
	--c: var(--ink);
	background:
		linear-gradient(var(--c), var(--c)) left top / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) left top / 2px 14px no-repeat,
		linear-gradient(var(--c), var(--c)) right top / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) right top / 2px 14px no-repeat,
		linear-gradient(var(--c), var(--c)) left bottom / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 2px 14px no-repeat,
		linear-gradient(var(--c), var(--c)) right bottom / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 2px 14px no-repeat;
	border: 1px solid var(--line);
}

/* Home text from the editable front page ------------------------------- */
.pm-about { margin-top: 72px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.pm-about h2, .pm-faq > h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 14px; }
.pm-about p { color: var(--ink2); margin: 0 0 14px; max-width: 64ch; }
.pm-about p a { color: var(--ink); text-decoration-color: var(--acc); text-underline-offset: .18em; }
.pm-about .pm-btn { margin-top: 8px; }
.pm-about-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.pm-about-stats div { padding: 22px 22px 20px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.pm-about-stats div:nth-child(odd) { border-left: 0; }
.pm-about-stats div:nth-child(-n+2) { border-top: 0; }
.pm-about-stats dt { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pm-about-stats dd { margin: 2px 0 0; font-size: 14px; color: var(--ink2); }
.pm-faq { max-width: 820px; margin: 72px auto 0; }
.pm-faq > h2 { text-align: center; margin-bottom: 20px; }
.pm-faq-item { border-bottom: 1px solid var(--line); }
.pm-faq-item:first-of-type { border-top: 1px solid var(--line); }
.pm-faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; }
.pm-faq-item summary::-webkit-details-marker { display: none; }
.pm-faq-item summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 1.5px solid var(--ink2); border-bottom: 1.5px solid var(--ink2); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.pm-faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.pm-faq-item h3 { font-size: 17px; font-weight: 600; margin: 0; }
.pm-faq-item p { margin: 0 0 18px; color: var(--ink2); max-width: 68ch; }
.pm-home-extra { margin: 64px auto 0; }

/* Pagination ----------------------------------------------------------- */
.pm-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 40px 0 0; }
.pm-pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--chip); text-decoration: none; font-weight: 600; font-size: 14px; }
.pm-pagination .current { background: var(--chip-on); color: var(--chip-on-text); }
.pm-pagination .dots { background: none; }

/* Archives and programme hubs ------------------------------------------ */
.pm-crumbs p { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--ink2); }
.pm-crumbs a { text-decoration: none; color: var(--ink2); }
.pm-crumbs a:hover { color: var(--ink); }
.pm-crumbs { margin: 6px 0 14px; }
.pm-crumbs .separator { opacity: .5; }
.pm-crumb-current { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
/* Footer --------------------------------------------------------------- */
.pm-footer { max-width: var(--wrap); margin: 32px auto 0; padding: 26px var(--gutter) 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 13.5px; color: var(--ink2); }
.pm-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.pm-footer a { text-decoration: none; }
.pm-footer a:hover { color: var(--ink); }
.pm-footer-end { margin: 0 0 0 auto; display: flex; gap: 20px; flex-wrap: wrap; }
.pm-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: -4px 0; } /* buttons are taller than a text line: keep the row aligned */
.pm-prog-switch { display: inline-flex; align-items: center; gap: 6px; }
.pm-prog-switch button { min-height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink2); font-size: 13px; line-height: 1; }
.pm-prog-switch button:hover { color: var(--ink); border-color: var(--ink2); }
html:not(.pm-prog-ma) .pm-prog-switch [data-pm-prog="fr"], html.pm-prog-ma .pm-prog-switch [data-pm-prog="ma"] { background: var(--chip-on); border-color: var(--chip-on); color: var(--chip-on-text); }
html:not(.js) .pm-prog-switch { display: none; }

/* 404 and inline search ------------------------------------------------ */
.pm-404 { max-width: 720px; text-align: center; padding-top: 24px; }
.pm-404-art { aspect-ratio: 16 / 9; max-width: 480px; margin: 0 auto 24px; }
.pm-404 h1 { font-size: 30px; margin: 0 0 8px; }
.pm-404 p { color: var(--ink2); }
.pm-searchform { display: flex; gap: 8px; max-width: 520px; margin: 20px auto; }
.pm-searchform input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; background: var(--bg); }

/* Drawing language (covers, hero, figures) ------------------------------ */
.pm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.pm-hatch-line { stroke: var(--ink); stroke-width: .9; opacity: .38; }
.pm-drawing { display: block; width: 100%; height: 100%; }
svg .k { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; }
svg .hatch { fill: url(#pm-hatch); }
svg .ax { fill: none; stroke: var(--ink); stroke-width: 1.1; opacity: .55; }
svg .fill { fill: var(--ink); }
svg .cl { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .45; stroke-dasharray: 14 3 2 3; }
svg .thin { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .55; }
svg .dash { stroke-dasharray: 4 4; }
svg .stair { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .35; stroke-dasharray: 2 3; }
svg .acc { fill: none; stroke: var(--acc); stroke-width: 2; }
svg .acc-fill { fill: var(--acc); }
svg .acc-ring { fill: var(--paper); stroke: var(--acc); stroke-width: 1.6; }
svg .hollow { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
svg .hollow.tr { stroke: var(--tr); }
svg .tr-line { fill: none; stroke: var(--tr); stroke-width: 1.8; }
svg text.m { font: 500 13px var(--mono); fill: var(--ink); opacity: .8; stroke: none; }
svg text.m.acc { fill: var(--acc-text); opacity: 1; }
svg text.m.tr { fill: var(--tr); opacity: 1; }

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1180px) { .pm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The full header (logo, search, seven menu entries) needs about 1120px; below that the
   menu and the search fold behind their buttons. */
@media (max-width: 1120px) {
	.pm-top-inner { gap: 10px; }
	.pm-icon-btn { display: grid; }
	.pm-search-toggle { margin-left: auto; }
	html.js .pm-search { display: none; position: absolute; left: 0; right: 0; top: 64px; padding: 8px var(--gutter) 12px; background: var(--bg); border-bottom: 1px solid var(--line); max-width: none; }
	html.js .pm-top[data-search-open] .pm-search { display: flex; }
	.pm-live { left: var(--gutter); right: var(--gutter); top: 56px; } /* phones: as wide as the field and its button */
	.pm-live-chips a { padding: 9px 14px; font-size: 15px; }
	html.js .pm-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line); max-height: calc(100vh - 64px); overflow: auto; padding: 8px var(--gutter) 16px; }
	html.js .pm-top[data-menu-open] .pm-nav { display: block; }
	.pm-menu { flex-direction: column; }
	.pm-sub { position: static; border: 0; box-shadow: none; padding: 0 0 6px 10px; min-width: 0; }
	.pm-menu a, .pm-menu summary { padding: 11px 6px; color: var(--ink); font-size: 16px; }
	.pm-menu > li + li { border-top: 1px solid var(--line); }
	html:not(.js) .pm-top-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
	html:not(.js) .pm-icon-btn { display: none; }
}
@media (max-width: 960px) {
	.pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pm-hero { grid-template-columns: 1fr; gap: 28px; }
	.pm-feature { grid-template-columns: 1fr; }
	.pm-about { grid-template-columns: 1fr; gap: 28px; margin-top: 56px; }
}
@media (max-width: 640px) {
	:root { --gutter: 16px; }
	/* The page title is the H1 right below: on phones the trail stops at its parent. */
	.single .pm-crumbs .pm-crumb-current, .single .pm-crumbs .separator:has(+ .pm-crumb-current) { display: none; }
	.pm-top-inner { height: 56px; }
	html.js .pm-search, html.js .pm-nav { top: 56px; }
	.pm-chips { padding: 2px var(--gutter) 12px; }
	.pm-hero { padding: 12px 0 36px; gap: 0; }
	.pm-hero h1 { font-size: 33px; }
	.pm-hero p { font-size: 16px; margin-bottom: 22px; }
	/* Phones: the drawing comes right after the buttons (first screen), the promises under it. */
	.pm-hero-text { display: contents; }
	.pm-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
	.pm-actions .pm-btn { min-height: 48px; }
	.pm-hero-paper { order: 1; margin: 24px 0 0; border-radius: 14px; }
	.pm-hero-art text.m { font-size: 17px; }
	.pm-promises { order: 2; margin-top: 18px; justify-content: center; }
	.pm-grid { grid-template-columns: 1fr; gap: 28px; }
	.pm-cover-text { font-size: 23px; }
	.pm-feature-text { padding: 24px 20px; }
	.pm-feature h2 { font-size: 23px; }
	.pm-footer-end { margin-left: 0; }
	.pm-mini { grid-template-columns: 136px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Pill action buttons (byline share/copy, PDF library), YouTube style. */
.pm-act { display: inline-flex; align-items: center; gap: 7px; height: 36px; margin: 0; padding: 0 15px 0 12px; border: 0; border-radius: 999px; background: var(--chip); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.pm-act:hover, .pm-act[aria-expanded="true"] { background: color-mix(in srgb, var(--chip) 70%, var(--ink) 12%); }
.pm-act:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.pm-act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
