/* ==========================================================================
   APT design system
   Layout language modelled on the AKCF site (white rounded frames over an
   animated gradient, Outfit type, thin rules, circled-arrow links,
   full-screen menu), recoloured with the APT / ASEAN palette.
   ========================================================================== */

/* Outfit (SIL Open Font License 1.1), self-hosted: one variable file per
   character set covers every weight. Same files and ranges as Google Fonts. */
@font-face {
	font-family: 'Outfit';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url(../fonts/outfit-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Outfit';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url(../fonts/outfit-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* Brand: official ASEAN colours. Pantone values from the Guidelines on
	   the Use of the ASEAN Emblem (Annex); web (RGB) values from the ASEAN
	   Secretariat's ASEAN Day 57 Branding Guideline (2024). */
	--apt-blue: #2c59a7;        /* Pantone 286, RGB 44/89/167       */
	--apt-blue-light: #2c63c4;
	--apt-red: #c73935;         /* Pantone Red 032, RGB 199/57/53   */
	--apt-crimson: #c9234a;     /* previous APT navbar crimson    */
	--apt-maroon: #98294b;      /* original APT theme colour      */
	--apt-yellow: #fbf315;      /* Pantone Process Yellow, RGB 251/243/21 */

	/* Pillar colours: the three official ASEAN colours. ASEAN does not assign
	   them to pillars; this mapping is the site's own. */
	--pillar-ps: var(--apt-blue);      /* Political-Security */
	--pillar-ec: var(--apt-yellow);    /* Economic           */
	--pillar-sc: var(--apt-red);       /* Socio-Cultural     */
	--pillar-other: var(--apt-maroon);

	/* Neutrals */
	--ink: #111318;
	--ink-2: #4a4f5c;
	--ink-3: #6b7080;
	--rule: #111318;
	--rule-soft: #e3e5ea;
	--paper: #ffffff;
	--paper-2: #f5f6f8;
	--on-grad: #ffffff;
	--on-grad-2: #ffffff; /* full white: 92% white dropped to 4.07:1 in the warm red corner */
	--on-grad-rule: rgba(255, 255, 255, 0.45);

	/* Shape + space */
	--frame-gap: 6px;      /* thin gradient edge around the white content frame */
	--radius-frame: 14px;
	--radius-tile: 14px;
	--radius-pill: 999px;
	--header-h: 52px;
	--header-offset: calc(var(--header-h) + var(--frame-gap) * 2 + 8px);

	--font: 'Outfit', 'Helvetica Neue', Arial, sans-serif;

	/* Page width and side margin, shared by .container and the frameless hero
	   so every section lines up on the same left edge at every width. */
	--page-max: 1280px;
	--page-gutter: clamp(16px, 4vw, 48px);

	/* Minimum hit area: 24px (WCAG 2.5.8), 44px where the pointer is a finger */
	--target-size: 24px;

	/* Circled-arrow icon, painted with currentColor through a mask */
	--icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8M12.5 8.5 16 12l-3.5 3.5'/%3E%3C/svg%3E");
	--icon-ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9 15l6-6M10 9h5v5'/%3E%3C/svg%3E");
	--icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
	--icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	--icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
}

@media (pointer: coarse) {
	:root { --target-size: 44px; }
}

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

html { font-family: var(--font); font-size: 16px; scroll-padding-top: var(--header-offset); }
/* Native smooth anchor scrolling, only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	font-family: var(--font);
	font-weight: 300;
	color: var(--ink);
	margin: 0 !important;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--apt-blue);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
/* Background on a fixed layer (background-attachment: fixed is ignored on
   iOS). Official ASEAN blue, with the red as a glow behind the hero's photo
   card (top right) and a faint yellow at the bottom left. The red fades out
   before the Highlights row, so no text sits on a red/yellow mix; it is
   static, so it never drifts under text either. Positions are in viewport
   units because the layer is the viewport. */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-color: var(--apt-blue);
	background-image:
		radial-gradient(46vw 40vh at 74vw 34vh, rgba(199, 57, 53, 0.95), rgba(199, 57, 53, 0.55) 45%, rgba(199, 57, 53, 0) 78%),
		radial-gradient(40vw 34vh at 0 100vh, rgba(251, 243, 21, 0.09), transparent 75%),
		linear-gradient(160deg, var(--apt-blue), #234a8f);
}
@media (max-width: 767.98px) {
	/* Phones: the photo card sits under the title, full width */
	body::before {
		background-image:
			radial-gradient(90vw 26vh at 70vw 44vh, rgba(199, 57, 53, 0.9), rgba(199, 57, 53, 0.5) 45%, rgba(199, 57, 53, 0) 80%),
			radial-gradient(60vw 30vh at 0 100vh, rgba(251, 243, 21, 0.09), transparent 75%),
			linear-gradient(160deg, var(--apt-blue), #234a8f);
	}
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--font);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.15;
}
strong, b { font-weight: 600; }

a { color: var(--apt-blue); }
a:hover { color: var(--apt-red); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	/* Two-tone ring: the dark outline contrasts with white panels, the white
	   halo with the dark gradient, so one of them is always >= 3:1. */
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 6px var(--paper);
}
/* Bootstrap's .btn:focus removes the outline with higher specificity: restore the ring */
.btn:focus-visible, .page-link:focus-visible, .nav-link:focus-visible {
	outline: 2px solid var(--ink) !important;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 6px var(--paper) !important;
}
/* Press feedback, distinct from hover (colour/fill) and focus (ring) */
:where(.apt-pill, .apt-header-btn, .apt-menu-close, .apt-carousel-btn, .apt-carousel-marker, .resource-accordion-summary, .agenda-month-summary) {
	transition: background-color 150ms ease-out, color 150ms ease-out, scale 150ms ease-out, box-shadow 150ms ease-out;
}
:where(.apt-pill, .apt-header-btn, .apt-menu-close, .apt-carousel-btn) { scale: 1; } /* identity: same stacking context at rest and pressed */
:where(.apt-pill, .apt-header-btn, .apt-menu-close, .apt-carousel-btn):active { scale: 0.96; }
@media (prefers-reduced-motion: reduce) {
	:where(.apt-pill, .apt-header-btn, .apt-menu-close, .apt-carousel-btn):active { scale: 1; }
}

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.apt-skip:focus {
	position: fixed; top: 10px; left: 10px; z-index: 3000; width: auto; height: auto; clip: auto;
	background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 10px;
}

#wrapper { min-height: 100vh; display: flex; flex-direction: column; }
#wrapper > main { flex: 1 0 auto; }

/* The old theme forced every section to 100vh with scroll-snap */
#main { scroll-snap-type: none !important; margin-bottom: 0 !important; }
#main section { min-height: 0 !important; scroll-snap-align: none !important; }

/* ---------- Shared pieces ------------------------------------------------- */

/* Target sizes: grow the hit area with min-size (never a fixed size, so
   content can still make it bigger). Links inside sentences are exempt. */
:where(
	.apt-footer-cols a, .apt-social a, .apt-quicklinks a,
	.apt-pill, .apt-tag, .news-meta-item a, .news-cta-btn,
	.apt-carousel-btn, .apt-carousel-marker,
	.site-main .page-link, .site-main .btn
) {
	min-block-size: var(--target-size);
	min-inline-size: var(--target-size);
}
:where(.apt-footer-cols a, .apt-quicklinks a, .news-meta-item a, .news-cta-btn, .site-main .page-link, .site-main .btn) {
	display: inline-flex;
	align-items: center;
}

/* Circled arrow, placed after a link label */
.apt-arrow::after,
.apt-ext::after {
	content: '';
	display: inline-block;
	flex: none;
	width: 1.15em;
	height: 1.15em;
	margin-left: 0.5em;
	vertical-align: -0.2em;
	background-color: currentColor;
	-webkit-mask: var(--icon-arrow) center / contain no-repeat;
	mask: var(--icon-arrow) center / contain no-repeat;
	transition: transform 0.2s ease;
}
.apt-ext::after { -webkit-mask-image: var(--icon-ext); mask-image: var(--icon-ext); }
.apt-arrow:hover::after,
.apt-arrow:focus-visible::after { transform: translateX(3px); }

/* Pill buttons ("see all", "see detail") */
.apt-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.45em 1.1em;
	border: 1px solid currentColor;
	border-radius: var(--radius-pill);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.3;
	text-decoration: none !important;
	background: transparent;
	transition: background 0.2s ease, color 0.2s ease;
}
.apt-pill--light { color: var(--on-grad); }
.apt-pill--light:hover { background: var(--on-grad); color: var(--apt-blue); }
.apt-pill--dark { color: var(--ink); }
.apt-pill--dark:hover { background: var(--ink); color: var(--paper); }

/* Section headings that sit on the gradient */
.apt-section { padding: clamp(48px, 6vw, 88px) 0 0; position: relative; }
.apt-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: clamp(24px, 4vw, 44px);
}
.apt-section-title {
	color: var(--on-grad);
	font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
	font-weight: 700;
	line-height: 1.05;
	margin: 0;
	max-width: 16ch;
	text-wrap: balance;
}
.apt-section-lede { color: var(--on-grad-2); font-size: 1.05rem; margin: 10px 0 0; max-width: 44ch; }

/* White panel used for dense content on the gradient */
.apt-panel {
	background: var(--paper);
	border-radius: var(--radius-frame);
	padding: clamp(20px, 3.5vw, 44px);
	box-shadow: 0 20px 50px rgba(10, 14, 40, 0.18);
}

/* Pillar tag (AKCF sector tag equivalent) */
.apt-tag {
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--ink-2);
}
.apt-tag::before {
	content: '';
	width: 9px; height: 9px;
	border-radius: 50%;
	background: var(--tag-c, var(--pillar-other));
	box-shadow: inset 0 0 0 1px rgba(17, 19, 24, 0.3); /* keeps the yellow dot visible on white */
}
.pillar-ps { --tag-c: var(--pillar-ps); }
.pillar-ec { --tag-c: var(--pillar-ec); }
.pillar-sc { --tag-c: var(--pillar-sc); }
.pillar-other { --tag-c: var(--pillar-other); }

/* Round flags coming from akseki_get_the_meta() */
.roundflag { display: inline-flex; width: 1.1em; height: 1.1em; vertical-align: -0.2em; border-radius: 50%; overflow: hidden; }
.roundflag svg { width: 100%; height: 100%; }

/* ---------- Header -------------------------------------------------------- */

.apt-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 1030;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: var(--frame-gap) calc(var(--frame-gap) + 12px);
	pointer-events: none; /* only the pills are interactive */
}
.apt-header > * { pointer-events: auto; }

.apt-brand,
.apt-header-btn {
	height: var(--header-h);
	background: var(--paper);
	border-radius: 14px;
	box-shadow: 0 6px 22px rgba(10, 14, 40, 0.14);
	color: var(--ink);
}
.apt-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0 16px 0 8px;
	text-decoration: none !important;
}
.apt-brand:hover { color: var(--ink); }
.apt-brand :is(svg, img) { width: 38px; height: 38px; flex: none; }
.apt-brand-text {
	display: flex;
	flex-direction: column;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.apt-header-actions { display: flex; gap: 10px; }
.apt-header-btn {
	width: var(--header-h);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: transform 0.15s ease;
}
.apt-header-btn:hover { transform: translateY(-1px); }
.apt-header-btn svg { width: 24px; height: 24px; }

/* ---------- Site menu: full-screen overlay (header.php) ------------------- */
/* Numbered sections from the "primary" menu. Desktop: sections on the left,
   the open section's links on the right (one grid; each <li> is
   display: contents so its button sits in column 1 and its panel in column 2).
   Phones: an accordion. */

.apt-menu {
	--menu-bg: #1d3f7d;
	--menu-rule: rgb(255 255 255 / 0.22);
	--menu-soft: rgb(255 255 255 / 0.84);
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--menu-bg);
	color: #fff;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.apt-menu::backdrop { background: var(--menu-bg); }
html:has(.apt-menu[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
	.apt-menu[open] { animation: apt-menu-in 220ms ease-out; }
	@keyframes apt-menu-in {
		from { opacity: 0; transform: translateY(-12px); }
	}
}

.apt-menu a { color: #fff; text-decoration: none; }
.apt-menu :focus-visible {
	outline: 2px solid var(--apt-yellow);
	outline-offset: 3px;
	box-shadow: none;
}
.apt-menu :focus:not(:focus-visible) { outline: 0; } /* Bootstrap rings buttons on mouse click */

.apt-menu-inner {
	min-height: 100%;
	display: flex;
	flex-direction: column;
	width: min(1180px, 100%);
	margin: 0 auto;
	padding: calc(var(--frame-gap) + 6px) clamp(16px, 3vw, 30px) 28px;
}

.apt-menu-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.apt-menu-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 52px;
	padding: 0 16px 0 7px;
	background: #fff;
	border-radius: var(--radius-frame);
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.apt-menu .apt-menu-brand { color: var(--ink); }
.apt-menu-brand .apt-emblem { width: 38px; height: 38px; }
.apt-menu-brand span { max-width: 5.2em; }
.apt-menu-close {
	width: 52px; height: 52px; flex: none; padding: 0; border: 0; cursor: pointer;
	border-radius: var(--radius-frame);
	background: var(--apt-yellow);
	color: var(--ink);
	display: inline-grid;
	place-items: center;
}
.apt-menu-close svg { width: 24px; height: 24px; }

.apt-menu-nav { flex: 1; margin-top: clamp(24px, 6vh, 64px); }
.apt-menu-sections {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	/* one row per section, then a flexible row that absorbs the panel's height */
	grid-template-rows: repeat(var(--apt-menu-n, 6), auto) 1fr;
	column-gap: clamp(32px, 6vw, 96px);
}
.apt-menu-sections > li { display: contents; }

.apt-menu-tab {
	grid-column: 1;
	display: flex;
	align-items: baseline;
	gap: 18px;
	width: 100%;
	padding: 8px 0;
	border: 0;
	background: none;
	cursor: pointer;
	text-align: start;
	font: inherit;
	font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3.1rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: rgb(255 255 255 / 0.66);
	transition: color 150ms ease-out;
}
.apt-menu .apt-menu-tab { color: rgb(255 255 255 / 0.66); }
.apt-menu-tab > span:last-child {
	text-decoration: underline 4px transparent;
	text-underline-offset: 0.22em;
	transition: text-decoration-color 150ms ease-out;
}
.apt-menu-num {
	min-width: 1.6em;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: rgb(255 255 255 / 0.74);
}
.apt-menu .apt-menu-tab:hover,
.apt-menu .apt-menu-tab[aria-expanded="true"],
.apt-menu .apt-menu-tab.is-here { color: #fff; }
.apt-menu-tab[aria-expanded="true"] > span:last-child { text-decoration-color: var(--apt-yellow); }
.apt-menu-tab[aria-expanded="true"] .apt-menu-num,
.apt-menu-tab.is-here .apt-menu-num { color: var(--apt-yellow); }

.apt-menu-panel {
	grid-column: 2;
	grid-row: 1 / -1;
	align-self: start;
	padding-left: clamp(24px, 4vw, 56px);
	border-left: 1px solid var(--menu-rule);
}
.apt-menu-panel[hidden] { display: none; }
.apt-menu-kicker {
	margin: 0 0 6px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--apt-yellow);
}
.apt-menu .apt-menu-kicker a { color: var(--apt-yellow); display: inline-flex; align-items: center; min-block-size: var(--target-size); }
.apt-menu-links, .apt-menu-sublinks { list-style: none; margin: 0; padding: 0; }
.apt-menu-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.apt-menu-links > li { border-bottom: 1px solid rgb(255 255 255 / 0.16); padding: 12px 0; }
.apt-menu-links > li > a { display: flex; flex-direction: column; gap: 2px; }
.apt-menu-links b { font-size: 1.08rem; font-weight: 600; }
.apt-menu-links span { font-size: 0.88rem; color: var(--menu-soft); }
.apt-menu-links a:hover b, .apt-menu-links a[aria-current] b,
.apt-menu-sublinks a:hover, .apt-menu-sublinks a[aria-current] {
	text-decoration: underline 2px var(--apt-yellow);
	text-underline-offset: 0.25em;
}
.apt-menu-sublinks { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 0 14px; }
.apt-menu .apt-menu-sublinks a {
	display: inline-flex;
	align-items: center;
	min-block-size: var(--target-size);
	font-size: 0.88rem;
	color: var(--menu-soft);
}

.apt-menu-foot {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	column-gap: clamp(32px, 6vw, 96px);
	align-items: center;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--menu-rule);
}
.apt-menu-search {
	display: flex;
	gap: 8px;
	padding: 6px 6px 6px 18px;
	background: #fff;
	border-radius: 999px;
}
.apt-menu-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 1rem;
	color: var(--ink);
}
.apt-menu-search input::placeholder { color: var(--ink-2); opacity: 1; }
.apt-menu-search input:focus-visible { outline: 0; }
.apt-menu-search:focus-within { outline: 2px solid var(--apt-yellow); outline-offset: 3px; }
.apt-menu-search button {
	flex: none;
	min-block-size: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--ink);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.apt-menu-search button:focus-visible { outline-color: var(--ink); }
.apt-menu-latest { display: flex; flex-direction: column; gap: 2px; font-weight: 600; padding-left: clamp(24px, 4vw, 56px); }
.apt-menu-latest-k { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--apt-yellow); }
.apt-menu-latest-d { font-size: 0.88rem; font-weight: 400; color: var(--menu-soft); }
.apt-menu-latest:hover .apt-menu-latest-t { text-decoration: underline 2px var(--apt-yellow); text-underline-offset: 0.25em; }

@media (max-width: 767.98px) {
	.apt-menu-inner { padding-bottom: 24px; }
	.apt-menu-top { order: -2; }
	.apt-menu-foot { display: contents; }
	.apt-menu-search { order: -1; margin-top: 18px; }
	.apt-menu-nav { margin-top: 12px; }
	.apt-menu-sections { display: block; }
	.apt-menu-sections > li { display: block; border-bottom: 1px solid rgb(255 255 255 / 0.16); }
	.apt-menu-tab { font-size: 1.7rem; padding: 12px 0; }
	.apt-menu-tab[aria-expanded="true"] > span:last-child { text-decoration-color: transparent; }
	button.apt-menu-tab::after {
		content: '';
		flex: none;
		align-self: center;
		width: 1rem; height: 1rem;
		margin-left: auto;
		background-color: currentColor;
		-webkit-mask: var(--icon-arrow) center / contain no-repeat;
		mask: var(--icon-arrow) center / contain no-repeat;
		rotate: 90deg;
		transition: rotate 150ms ease-out;
	}
	button.apt-menu-tab[aria-expanded="true"]::after { rotate: -90deg; }
	.apt-menu-panel { padding: 0 0 14px 2.7em; border: 0; }
	.apt-menu-kicker { font-size: 0.8rem; }
	.apt-menu-links { display: block; }
	.apt-menu-links > li { border: 0; padding: 0; }
	.apt-menu-links > li > a { min-block-size: var(--target-size); justify-content: center; padding: 6px 0; }
	.apt-menu-links b { font-size: 1.02rem; font-weight: 500; }
	.apt-menu-links > li > a > span { display: none; }
	.apt-menu-sublinks { flex-direction: column; margin: 0 0 6px; }
	.apt-menu-latest { margin-top: 22px; padding: 20px 0 0; border-top: 1px solid var(--menu-rule); }
}

/* ---------- Search dialog (header.php, native <dialog>) --------------------- */

.apt-search {
	width: min(760px, calc(100vw - 2 * var(--page-gutter)));
	max-width: none;
	max-height: calc(100dvh - 2 * var(--page-gutter));
	margin: max(var(--page-gutter), 12vh) auto auto;
	padding: clamp(20px, 3vw, 32px);
	border: 0;
	border-radius: var(--radius-frame);
	background: var(--paper);
	color: var(--ink);
	box-shadow: 0 24px 60px rgba(17, 19, 24, 0.35);
}
/* Keep scrolling inside the dialog from moving the page behind it */
.apt-search:modal { overscroll-behavior: contain; }
.apt-search::backdrop {
	background: rgba(17, 19, 24, 0.55);
	backdrop-filter: blur(3px);
	overflow: hidden;
	overscroll-behavior: contain;
}
.apt-search-head {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	margin-bottom: 20px;
}
.apt-search-title { margin: 0; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); }
.apt-search-close {
	flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0;
	border: 1px solid var(--rule-soft); border-radius: 50%;
	background: var(--paper); color: var(--ink); cursor: pointer;
}
.apt-search-close:hover { background: var(--paper-2); }
.apt-search-close svg { width: 20px; height: 20px; }
.apt-search-form {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
	gap: 12px;
	align-items: end;
}
.apt-search-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.apt-search-field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.apt-search-field :is(input, select) {
	width: 100%; min-height: 48px; padding: 0 14px;
	border: 1px solid #767676; border-radius: 10px;
	background-color: var(--paper); color: var(--ink);
	font: inherit; font-size: max(1rem, 1em); /* >= 16px: no zoom on iOS */
}
.apt-search-submit {
	min-height: 48px; padding: 0 28px;
	border: 0; border-radius: var(--radius-pill);
	background: var(--ink); color: var(--paper);
	font: inherit; font-weight: 600; cursor: pointer;
	transition: background-color 150ms ease-out;
}
.apt-search-submit:hover { background: var(--apt-blue); }
@media (max-width: 767.98px) {
	.apt-search { margin-top: var(--header-offset); }
	.apt-search-form { grid-template-columns: 1fr; }
}

/* Search results page */
.apt-search-form--page {
	margin: 0 0 8px;
	padding: 20px;
	border-radius: var(--radius-tile);
	background: var(--paper-2);
}
.apt-results { margin-top: 20px; }
.apt-result {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr);
	gap: 20px;
	padding: 24px 0;
	border-top: 1px solid var(--rule-soft);
}
.search-listing article.apt-result { border-bottom: 0; margin: 0; } /* style.css drew a dotted grey line */
.apt-result:not(:has(.apt-result-thumb)) { grid-template-columns: minmax(0, 1fr); }
.apt-result-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.apt-result-short { margin: 0 0 4px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.apt-result-title { margin: 0 0 8px; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); line-height: 1.35; }
.apt-result-title a { color: var(--ink); text-decoration: none; }
.apt-result-title a:hover { color: var(--apt-blue); text-decoration: underline; text-underline-offset: 3px; }
.apt-result-excerpt p { margin: 0 0 8px; font-size: 0.95rem; line-height: 1.6; color: var(--ink-2); }
.site-main:not(.front-main) .apt-result-meta { margin: 0 0 6px; font-size: 0.85rem; }
.apt-result-pdf {
	margin: 0 0 10px; padding-left: 12px;
	border-left: 3px solid var(--rule-soft);
	font-size: 0.9rem; line-height: 1.6; color: var(--ink-2);
}
.apt-result-pdf-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.apt-result-pdf mark { padding: 0 2px; border-radius: 2px; background: rgba(251, 243, 21, 0.6); color: var(--ink); }
.apt-result-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.apt-result-cats a { min-height: var(--target-size); }
.apt-result-cats a:hover { color: var(--ink); text-decoration: underline; }
.apt-tag--plain::before { content: none; }
.apt-search-empty { padding: 28px 0 8px; }
.apt-search-empty h2 { margin: 0 0 8px; font-size: 1.4rem; }
.apt-search-empty p { margin: 0; max-width: 60ch; color: var(--ink-2); }
@media (max-width: 575.98px) {
	.apt-result { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
	.apt-search-form--page { padding: 16px; }
}

/* ---------- Layout container ---------------------------------------------- */

/* One fluid container instead of Bootstrap's stepped widths (540/720/960/
   1140px, 1280px in style.css), matching the hero's edges. */
.container {
	width: 100%;
	max-width: var(--page-max);
	padding-inline: var(--page-gutter);
}

/* ---------- Home: hero (frameless, on the gradient) ------------------------- */

.apt-hero {
	position: relative;
	color: var(--on-grad);
	padding-block: calc(var(--header-offset) + 8px) clamp(32px, 4vw, 56px);
	padding-inline: max(var(--page-gutter), calc((100% - var(--page-max)) / 2 + var(--page-gutter)));
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.apt-hero-main {
	flex: 1 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(24px, 4vw, 64px);
	align-items: center;
	padding-bottom: clamp(20px, 3vw, 36px);
}
.apt-hero-title {
	font-size: clamp(2.75rem, 1.6rem + 4.4vw, 5.5rem);
	font-weight: 700;
	line-height: 0.98;
	letter-spacing: -0.025em;
	margin: 0;
	color: var(--on-grad);
}
/* ASEAN yellow: the brand red is unreadable on the red end of the gradient */
.apt-hero-title span { display: block; color: var(--on-grad); } /* all white: the flag line-up below carries the colour */
/* Flag line-up under the title: ASEAN group, then the Plus Three group */
.apt-hero-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: clamp(20px, 2.5vw, 30px); }
.apt-flag-group { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.apt-flag-group img {
	display: block; width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}
.apt-flag-group .is-asean img { box-shadow: 0 0 0 2px var(--apt-yellow); }
@media (max-width: 575.98px) {
	.apt-flag-group { gap: 5px; }
	.apt-flag-group img { width: 22px; height: 22px; }
}

.apt-hero-feature {
	position: relative;
	display: block;
	border-radius: var(--radius-tile);
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--paper-2);
	color: var(--paper);
	text-decoration: none !important;
	box-shadow: 0 20px 50px rgba(10, 14, 40, 0.35);
}
.apt-hero-feature img { width: 100%; height: 100%; object-fit: cover; scale: 1; transition: scale 0.6s ease; }
.apt-hero-feature:hover img { scale: 1.03; }
@media (prefers-reduced-motion: reduce) { .apt-hero-feature:hover img { scale: 1; } }
.apt-hero-feature-cap {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 60px 22px 18px;
	/* Dark enough wherever the title sits, even over a white photo (≥5:1) */
	background: linear-gradient(180deg, rgba(8, 12, 30, 0) 0, rgba(8, 12, 30, 0.62) 44px, rgba(8, 12, 30, 0.88));
	display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.apt-hero-feature-title {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	font-size: clamp(1.05rem, 0.8rem + 0.8vw, 1.5rem); font-weight: 700; line-height: 1.2; margin: 0; color: var(--paper);
}
@media (max-width: 575.98px) {
	.apt-hero-feature { aspect-ratio: 4 / 3; }
	.apt-hero-feature-cap { padding: 48px 16px 14px; }
}
.apt-hero-feature .apt-arrow::after { width: 2rem; height: 2rem; margin: 0; }
.apt-hero-feature-label {
	position: absolute; top: 14px; left: 14px;
	background: var(--paper); color: var(--ink);
	font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
	padding: 5px 10px; border-radius: var(--radius-pill);
}

.apt-highlights-title { font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem); font-weight: 700; margin: 0 0 12px; color: var(--on-grad); }
.apt-highlights {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-top: 1px solid var(--on-grad-rule);
	border-bottom: 1px solid var(--on-grad-rule);
}
.apt-highlight {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 24px 18px 0;
	color: var(--on-grad);
	text-decoration: none !important;
}
.apt-highlight + .apt-highlight { padding-left: 24px; border-left: 1px solid var(--on-grad-rule); }
.apt-highlight:hover { color: var(--apt-yellow); }
.apt-highlight-title {
	font-size: 1.05rem; font-weight: 600; line-height: 1.3; margin: 0 0 8px;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Solid white: at 82% opacity this small text fell to ~4.3:1 on the gradient's crimson end */
.apt-highlight-meta { display: block; font-size: 0.85rem; color: var(--on-grad); }
.apt-highlight-meta .meta-location { margin-right: 6px; }
.apt-highlight .apt-arrow::after { width: 2rem; height: 2rem; margin: 0; }

.apt-quicklinks {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
	padding: 16px 0 0;
}
.apt-quicklinks-label { font-weight: 600; margin-right: auto; color: var(--on-grad); }
.apt-quicklinks a { color: var(--on-grad); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; }
.apt-quicklinks a:hover { color: var(--apt-yellow); }

@media (max-width: 991.98px) {
	.apt-hero-main { grid-template-columns: 1fr; align-items: start; }
	.apt-highlights { grid-template-columns: 1fr; border-bottom: 0; }
	.apt-highlight { padding: 16px 0 !important; border-left: 0 !important; border-bottom: 1px solid var(--on-grad-rule); }
	.apt-quicklinks-label { width: 100%; }
}

/* ---------- Home: news (sits on gradient) -------------------------------- */

.modern-news-section .apt-news-layout {
	display: grid;
	grid-template-columns: minmax(200px, 3fr) minmax(0, 9fr);
	gap: clamp(24px, 3vw, 48px);
	align-items: start;
}
.modern-news-section .apt-news-layout > * { min-width: 0; }
.modern-news-section .apt-news-intro .apt-pill { margin-top: 22px; }
@media (max-width: 1199.98px) {
	.modern-news-section .apt-news-layout { grid-template-columns: 1fr; }
}

.news-card {
	position: relative;
	background: var(--paper);
	border-radius: var(--radius-tile);
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	color: var(--ink);
	box-shadow: 0 14px 34px rgba(10, 14, 40, 0.16);
}
/* Media fills a fixed ratio itself: no wrapper needed */
.news-card > img {
	display: block;
	width: 100%;
	height: auto; /* the width/height attributes would otherwise override the ratio */
	aspect-ratio: 16 / 10;
	object-fit: cover;
	background: var(--paper-2);
}
.news-card > :not(img) { padding-inline: 20px; }
.news-card-header { padding-top: 18px; }
.news-card-tag { margin-bottom: 4px; }
.news-card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.25; margin: 0 0 6px; }
.news-card-title a { color: inherit; text-decoration: none; }
.news-card-subtitle {
	font-size: 0.875rem; color: var(--ink-2); line-height: 1.45; margin: 0 0 10px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-date { font-size: 0.85rem; color: var(--ink-2); margin: 0 0 12px; }
.news-meta-grid { border-top: 1px solid var(--rule-soft); padding-top: 10px; margin: 0 0 14px; }
.news-meta-item { font-size: 0.8rem; line-height: 1.45; color: var(--ink-3); margin-bottom: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; }
.news-meta-item dt, .news-meta-item dd { display: inline; margin: 0; }
.news-meta-item .meta-label { color: var(--ink-2); font-weight: 500; }
.news-meta-item a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-soft); text-underline-offset: 2px; }
.news-meta-item a:hover { color: var(--apt-red); }
.news-card-cta { margin-top: auto; padding-bottom: 20px; }
.news-cta-btn { display: inline-flex; align-items: center; color: var(--ink); font-weight: 600; text-decoration: none !important; }
.news-card-summit { border-top: 4px solid var(--apt-red); }
.news-card-ministerial { border-top: 4px solid var(--apt-blue); }

/* Whole card is clickable through the heading link; other links stay on top */
.news-card a.card-link::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.news-card:has(a.card-link) :is(a:not(.card-link), button) { position: relative; z-index: 3; }
.news-card a.card-link:focus-visible { outline: none; box-shadow: none; }
.news-card:has(a.card-link:focus-visible) {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 6px var(--paper);
}
.news-card:has(a.card-link:hover) .news-card-title,
.news-card:has(a.card-link:hover) .news-cta-btn { color: var(--apt-red); }

/* Layout follows the card's own width, not the viewport */
.apt-slide { container-type: inline-size; }
@container (min-width: 540px) {
	.news-card:has(> img) {
		display: grid;
		grid-template-columns: 42% minmax(0, 1fr);
		grid-template-rows: auto auto 1fr;
		column-gap: 4px;
	}
	/* Show the whole image (many are text graphics that must not be cropped)
	   and fill the rest of the column with a blurred copy of it. The backdrop
	   is painted 30px larger than its cell and clipped back (clip-path applies
	   after filter), so the blur has no soft edges. */
	.news-card:has(> img)::before {
		content: '';
		grid-column: 1;
		grid-row: 1 / -1;
		margin: -30px;
		clip-path: inset(30px);
		background: var(--card-img, var(--paper-2)) center / cover no-repeat;
		filter: blur(18px) saturate(1.1) brightness(0.9);
	}
	.news-card:has(> img) > img {
		grid-column: 1; grid-row: 1 / -1;
		position: relative; z-index: 1;
		height: 100%; min-height: 260px;
		aspect-ratio: auto;
		object-fit: contain;
		background: transparent;
	}
	.news-card:has(> img) > :not(img) { grid-column: 2; padding-inline: 20px 24px; }
	.news-card:has(> img) > .news-card-cta { align-self: end; }
}

.apt-carousel { display: grid; grid-template-columns: minmax(0, 1fr); }
.apt-carousel-track {
	grid-row: 1;
	--gap: 20px;
	display: flex;
	gap: var(--gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	touch-action: manipulation;
	padding: 4px 0 24px; /* room for card shadows */
	border-radius: var(--radius-tile);
}
.apt-carousel-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) {
	.apt-carousel-track { scroll-behavior: smooth; }
}
.apt-carousel-track > * {
	flex: 0 0 86%;
	scroll-snap-align: start;
	display: flex;
}
/* One main card per view, flush with the start edge; the next card peeks in
   at the end edge and fades out, so it reads as "more" rather than a cut-off
   card. No previous card shows. Slides stay wider than half the track (the
   looping technique parks one end slide at a time). */
@media (min-width: 640px) {
	.apt-carousel-track > * { flex-basis: 80%; }
}
.apt-carousel-track {
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 96px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 96px), transparent);
}
@media (max-width: 639.98px) {
	.apt-carousel-track {
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
	}
}
.apt-slide .news-card { width: 100%; }

/* Looping: park an end slide beside the current one (set by apt-carousel.js).
   --children-count is only set where sibling-count() is unsupported. */
.apt-carousel-track > :first-child {
	order: clamp(0, var(--current) - (var(--children-count, sibling-count()) - 3), 1);
}
.apt-carousel-track > :last-child {
	order: calc(-1 * clamp(0, 2 - var(--current), 1));
}

.apt-carousel-controls {
	grid-row: 2;
	grid-column: 1; /* share row 2 with the markers instead of creating a second column */
	display: flex;
	gap: 10px;
	align-items: center;
}
.apt-carousel-markers {
	grid-row: 2;
	grid-column: 1;
	justify-self: end;
	align-self: center;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 2px;
	padding-left: 120px; /* clear of the previous/next buttons on the same row */
}
.apt-carousel-btn {
	width: 44px; height: 44px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--on-grad);
	background: transparent;
	color: var(--on-grad);
	cursor: pointer;
	touch-action: manipulation;
}
.apt-carousel-btn svg { width: 22px; height: 22px; }
.apt-carousel-btn:hover { background: var(--on-grad); color: var(--apt-blue); }
.apt-carousel-btn:disabled { opacity: 0.4; cursor: default; background: transparent; color: var(--on-grad); }
/* 24px hit target around a small dot; active = wider pill, not colour alone */
.apt-carousel-marker {
	width: 24px; height: 24px; padding: 0;
	border: 0; background: none; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	touch-action: manipulation;
}
.apt-carousel-marker::before {
	content: '';
	width: 8px; height: 8px; border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	transition: width 150ms ease-out, background-color 150ms ease-out;
}
.apt-carousel-marker:hover::before { background: var(--on-grad); }
.apt-carousel-marker[aria-current="true"] { width: 34px; }
.apt-carousel-marker[aria-current="true"]::before { width: 24px; background: var(--on-grad); }
@media (max-width: 575.98px) {
	.apt-carousel-markers { display: none; } /* swipe + buttons on phones; 12 dots don't fit */
}

/* ---------- Home: About ASEAN Plus Three (on gradient) ------------------ */

.modern-about-section { color: var(--on-grad); }
.modern-about-section .apt-about-grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(28px, 4vw, 72px);
	align-items: start;
}
.about-card-text { color: var(--on-grad-2); font-size: 1.05rem; line-height: 1.7; margin: 10px 0 24px; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; }

.stats-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0 14px;
}
.stat-card { grid-column: span 2; padding: 4px 0 20px; border-bottom: 1px solid var(--on-grad-rule); margin-bottom: 20px; }
.stat-number { font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); font-weight: 700; line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 0.9rem; color: var(--on-grad-2); }
.stat-card-blue .stat-number::after,
.stat-card-yellow .stat-number::after,
.stat-card-red .stat-number::after {
	content: ''; display: block; width: 28px; height: 4px; border-radius: 4px; margin-top: 10px;
}
.stat-card-blue .stat-number::after { background: #7fb0ff; }
.stat-card-yellow .stat-number::after { background: var(--apt-yellow); }
.stat-card-red .stat-number::after { background: #ff7a8c; }

.stat-card.stat-card-detail {
	grid-column: span 3;
	display: flex; gap: 14px; align-items: flex-start;
	padding: 18px 20px; margin-bottom: 14px;
	border: 1px solid var(--on-grad-rule);
	border-radius: var(--radius-tile);
	background: rgba(17, 19, 24, 0.12); /* a dark tint raises text contrast; a white one lowered it */
}
.stat-card.stat-card-wide { grid-column: 1 / -1; }
.stat-icon { color: var(--apt-yellow); flex: none; }
.stat-icon svg { width: 28px; height: 28px; }
.stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.stat-desc { font-size: 0.85rem; line-height: 1.4; color: var(--on-grad-2); margin-top: 4px; }
.stat-desc em { font-style: italic; }
.stat-source { margin: 8px 0 0; font-size: 0.75rem; line-height: 1.4; color: var(--on-grad-2); }
.stat-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.stat-source a:hover { color: var(--on-grad); }
.apt-stats-source {
	grid-column: 1 / -1;
	margin: 4px 0 0;
	font-size: 0.8rem; line-height: 1.5;
	color: var(--on-grad-2);
}
.apt-stats-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.apt-stats-source a:hover { color: var(--on-grad); }

@media (max-width: 991.98px) {
	.modern-about-section .apt-about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
	.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
	.stat-card { grid-column: span 1; }
	.stat-card.stat-card-detail { grid-column: 1 / -1; }
}

/* ---------- Home: cooperation in practice (on gradient) ------------------ */

.apt-coop-lede { max-width: 62ch; }
.apt-coop-list {
	list-style: none; margin: 0; padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	column-gap: clamp(24px, 4vw, 64px);
}
.apt-coop-item {
	display: flex; flex-direction: column;
	padding: 22px 0 26px;
	border-top: 1px solid var(--on-grad-rule);
	color: var(--on-grad);
}
.apt-coop-name { font-size: clamp(1.15rem, 1.05rem + 0.35vw, 1.35rem); font-weight: 700; line-height: 1.3; margin: 0 0 10px; }
.apt-coop-text { margin: 0; max-width: 60ch; font-size: 0.95rem; line-height: 1.6; color: var(--on-grad-2); }
.apt-coop-source { margin-top: 8px; max-width: 90ch; }
.apt-coop-text strong { color: var(--on-grad); font-weight: 700; }
.apt-coop-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 12px 0 0; }
.apt-coop-links a {
	display: inline-flex; align-items: center; min-height: var(--target-size);
	font-size: 0.9rem; font-weight: 600; color: var(--on-grad);
	text-decoration: underline; text-decoration-color: var(--on-grad-rule); text-underline-offset: 4px;
}
.apt-coop-links a:hover { text-decoration-color: currentColor; }

/* ---------- Home: resources (white panel) -------------------------------- */

.resources-accordion { padding-top: 6px; padding-bottom: 6px; }
.resource-accordion-item { border-bottom: 1px solid var(--rule); }
.resource-accordion-item:last-child { border-bottom: 0; }

/* Native <details>: marker sits right before the label, rotates open/closed */
.resource-accordion-summary,
.agenda-month-summary {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.6ch;
	padding: 20px 0;
	color: var(--ink);
	cursor: pointer;
	border-radius: 6px;
}
.resource-accordion-summary::-webkit-details-marker,
.agenda-month-summary::-webkit-details-marker { display: none; }
.resource-accordion-summary::before,
.agenda-month-summary::before {
	content: '';
	flex: none;
	inline-size: 1.1em;
	block-size: 1.1em;
	background-color: currentColor;
	-webkit-mask: var(--icon-chevron) no-repeat center / contain;
	mask: var(--icon-chevron) no-repeat center / contain;
	rotate: -90deg;
}
.resource-accordion-summary:dir(rtl)::before,
.agenda-month-summary:dir(rtl)::before { rotate: 90deg; }
details[open] > .resource-accordion-summary::before,
details[open] > .agenda-month-summary::before { rotate: 0deg; }
.resource-accordion-summary:hover,
.agenda-month-summary:hover { color: var(--apt-red); }
.resource-accordion-summary { font-size: clamp(1.15rem, 0.95rem + 0.7vw, 1.5rem); font-weight: 700; }

/* Open/close slide; content stays findable with find-in-page */
.resource-accordion-item::details-content,
.agenda-month::details-content {
	interpolate-size: allow-keywords;
	overflow: clip;
	contain: layout;
}
.resource-accordion-item:not([open])::details-content,
.agenda-month:not([open])::details-content { block-size: 0; }
@media (prefers-reduced-motion: no-preference) {
	.resource-accordion-summary::before,
	.agenda-month-summary::before { transition: rotate 0.2s; }
	.resource-accordion-item::details-content,
	.agenda-month::details-content {
		transition: block-size, content-visibility;
		transition-duration: 0.3s;
		transition-timing-function: ease-in-out;
		transition-behavior: allow-discrete;
	}
}

.resource-accordion-content { padding-bottom: 24px; }
.resource-cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 991.98px) { .resource-cards-grid { grid-template-columns: 1fr; gap: 20px; } }
.resource-content-title {
	font-family: var(--font);
	font-size: 1rem; font-weight: 600; color: var(--apt-blue);
	padding-bottom: 10px; margin: 0 0 6px; border-bottom: 2px solid var(--apt-blue);
}
.resource-content-card:nth-child(2) .resource-content-title { color: var(--apt-red); border-color: var(--apt-red); }
.resource-content-card:nth-child(3) .resource-content-title { color: var(--apt-maroon); border-color: var(--apt-maroon); }
.resource-content-body ul { list-style: none; padding: 0; margin: 0; }
.resource-content-body li { border-bottom: 1px solid var(--rule-soft); }
.resource-content-body li a,
.resource-link {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
	padding: 11px 0;
	font-size: 0.92rem; font-weight: 400; line-height: 1.4;
	color: var(--ink); text-decoration: none;
}
.resource-content-body li a::after {
	content: ''; flex: none; width: 1.15em; height: 1.15em; margin-top: 0.1em;
	background-color: currentColor;
	-webkit-mask: var(--icon-arrow) center / contain no-repeat;
	mask: var(--icon-arrow) center / contain no-repeat;
}
.resource-content-body li a:hover { color: var(--apt-red); }

/* Latest statements by pillar (inside the Resources panel) */
.apt-pillar-cards { list-style: none; margin: 0; padding: 0; }
.apt-pillar-card { display: flex; flex-direction: column; }
.resource-content-card.apt-pillar-card .apt-pillar-name {
	display: flex; align-items: center; gap: 8px;
	color: var(--ink); border-bottom-width: 3px; border-color: var(--tag-c, var(--pillar-other));
}
.apt-pillar-name::before { /* pillar colour, as on news tags */
	content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%;
	background: var(--tag-c, var(--pillar-other));
	box-shadow: inset 0 0 0 1px rgba(17, 19, 24, 0.3);
}
.apt-pillar-quote { margin: 8px 0 14px; flex: 1; }
.apt-pillar-quote blockquote { margin: 0 0 10px; }
.apt-pillar-quote blockquote p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--ink); }
.apt-pillar-quote figcaption { font-size: 0.85rem; line-height: 1.5; color: var(--ink-2); }
.apt-pillar-quote cite { font-style: normal; }
.apt-pillar-quote cite a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.apt-pillar-quote cite a:hover { color: var(--apt-red); }
.apt-pillar-more {
	align-self: flex-start;
	display: inline-flex; align-items: center; min-height: var(--target-size);
	font-size: 0.9rem; font-weight: 600; color: var(--apt-blue);
	text-decoration: underline; text-underline-offset: 4px;
}
.apt-pillar-more:hover { color: var(--apt-red); }

/* Mechanisms tabs (template-parts/sidebar-mechanisms.php) */
.mechanisms-wrapper .container { padding: 0; max-width: none; }
.mechanisms-wrapper .nav-tabs { border: 0; gap: 8px; margin-bottom: 20px !important; }
.mechanisms-wrapper .nav-tabs .nav-item { margin: 0 !important; }
.mechanisms-wrapper .nav-tabs .nav-link {
	display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--ink) !important; border-radius: 12px;
	background: transparent !important; color: var(--ink) !important;
	font-size: 0.875rem; font-weight: 500; padding: 8px 14px;
}
/* Selected tab: dark fill, same size as the others. Uses the #mechTab id
   (wherever the template is used) to outrank style.css's
   "#mechTab .nav-link.active { background-color: white !important }", which
   left white text on a white tab. */
.mechanisms-wrapper .nav-tabs .nav-link.active,
#mechTab.nav-tabs .nav-link.active {
	background: var(--ink) !important;
	border-color: var(--ink) !important;
	color: var(--paper) !important;
	font-size: 0.875rem; /* style.css enlarged it to 110%, shifting the row */
	font-weight: 500 !important;
}
.mechanisms-wrapper a { color: var(--ink); }
.mechanisms-wrapper a:hover { color: var(--apt-red); }

/* ---------- Home: agenda (white panel) ----------------------------------- */

.agenda-year-section + .agenda-year-section { margin-top: 28px; }
.agenda-year-title {
	font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); font-weight: 700;
	padding-bottom: 10px; margin: 0; border-bottom: 1px solid var(--rule);
}
.agenda-month { border-bottom: 1px solid var(--rule-soft); }
.agenda-month-summary { font-size: 1.15rem; font-weight: 600; }
.agenda-month-body { padding-bottom: 12px; }
.agenda-event-item {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
	padding: 14px 0 14px 16px; margin: 6px 0;
	border-left: 3px solid var(--rule-soft);
}
.agenda-item-summit { border-left-color: var(--apt-red); }
.agenda-item-ministerial { border-left-color: var(--apt-blue); }
.agenda-event-content { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.agenda-event-title { font-weight: 500; }
.agenda-event-marker { width: 8px; height: 8px; border-radius: 50%; background: var(--apt-maroon); }
.agenda-date-badge {
	display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill);
	background: var(--paper-2); font-size: 0.8rem; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.agenda-item-summit .agenda-date-badge { background: rgba(206, 17, 38, 0.08); color: var(--apt-red); }
.agenda-item-ministerial .agenda-date-badge { background: rgba(11, 61, 145, 0.08); color: var(--apt-blue); }
.agenda-category { font-size: 0.8rem; color: var(--ink-3); }
.apt-empty { color: var(--ink-2); margin: 0; }
/* Fallback when nothing is upcoming: the 5 most recent meetings */
.agenda-recent { list-style: none; margin: 16px 0 0; padding: 0; }
.agenda-recent:first-child { margin-top: 0; }
.agenda-recent a.agenda-event-title { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-block-size: var(--target-size); }
.agenda-recent a.agenda-event-title:hover { color: var(--apt-red); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Inner pages --------------------------------------------------- */

/* Non-home templates render inside one white frame, like AKCF's content area */
.site-main:not(.front-main),
main.site-single {
	margin: var(--header-offset) var(--frame-gap) var(--frame-gap) !important;
	background: var(--paper);
	border-radius: var(--radius-frame);
	padding-bottom: clamp(32px, 5vw, 64px);
	overflow: hidden;
	min-height: 60vh;
}
/* style.css offset #avi-content by 120px for the old fixed navbar; the frame
   above already clears the new header (index.php, search.php) */
#avi-content { margin-top: 0; }
.topic-head { border-bottom: 1px solid var(--rule) !important; padding-top: clamp(28px, 4vw, 48px) !important; margin-top: 0 !important; }
.topic-head .container { margin-top: 0 !important; }
.topic-head h1, .topic-head h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem) !important; font-weight: 700 !important; }

.site-main:not(.front-main) .btn-primary,
.site-single .btn-primary {
	background: var(--ink) !important; border-color: var(--ink) !important; color: var(--paper) !important;
	border-radius: var(--radius-pill); padding: 0.45rem 1.2rem; font-weight: 500;
}
.site-main:not(.front-main) .btn-primary:hover,
.site-single .btn-primary:hover { background: var(--apt-red) !important; border-color: var(--apt-red) !important; }
.site-main:not(.front-main) .btn-outline-primary { border-radius: var(--radius-pill); color: var(--ink); border-color: var(--ink); }
.site-main:not(.front-main) .btn-outline-primary:hover { background: var(--ink); color: var(--paper); }

.site-main:not(.front-main) .card { border: 1px solid var(--rule-soft); border-radius: var(--radius-tile); overflow: hidden; }
.site-main:not(.front-main) .list-group-item { border-left: 0; border-right: 0; }
.site-main:not(.front-main) .page-link { color: var(--ink); border-radius: 8px; margin: 0 3px; }
.site-main:not(.front-main) .page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: var(--paper); }
/* WordPress core pagination (the_posts_pagination) */
.site-main .nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; }
.site-main .nav-links .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-block-size: max(36px, var(--target-size)); min-inline-size: max(36px, var(--target-size));
	padding: 0 12px; border: 1px solid var(--rule-soft); border-radius: 8px;
	color: var(--ink); text-decoration: none;
}
.site-main .nav-links a.page-numbers:hover { border-color: var(--ink); }
.site-main .nav-links .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.site-main .nav-links .page-numbers.dots { border-color: transparent; }
.site-main:not(.front-main) .breadcrumb { background: none; padding-left: 0; font-size: 0.875rem; }
.site-main:not(.front-main) .nav-tabs .nav-link.active { border-color: var(--rule) var(--rule) #fff; }
.site-main:not(.front-main) table { font-size: 0.95rem; }
.site-main:not(.front-main) .table thead th { border-bottom: 1px solid var(--rule); font-weight: 600; }

/* ---------- Single post (template-parts/detail.php) ---------------------- */

.apt-post { padding-top: clamp(28px, 4vw, 52px); }

/* Header: title, subtitle, category tags, place and date */
.apt-post-header {
	padding-bottom: 24px;
	margin-bottom: clamp(24px, 3vw, 40px);
	border-bottom: 1px solid var(--rule);
}
.apt-post .fj-title {
	font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 10px;
	color: var(--ink);
}
/* "8<sup>th</sup>": keep the ordinal from opening a gap above the line */
.apt-post .fj-title sup,
.apt-post .fj-subtitle sup { font-size: 0.5em; line-height: 0; vertical-align: 0.75em; margin-left: 0.03em; }
.apt-post .fj-subtitle {
	font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
	font-weight: 500;
	line-height: 1.4;
	color: var(--ink-2);
	max-width: 60ch;
	margin: 0 0 18px;
}

/* Breadcrumb trail (sidebar-breadcrumb.php): level > pillar > theme > meeting.
   Sits above the title on meeting pages and in the statement sidebar. */
.apt-breadcrumb { margin: 0 0 14px !important; }
.apt-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; list-style: none; margin: 0; padding: 0; font-size: 0.9rem; color: var(--ink-2); }
.apt-breadcrumb li { display: inline-flex; align-items: center; }
.apt-breadcrumb li + li::before { content: '\203A'; margin: 0 8px; color: var(--ink-2); }
.apt-breadcrumb a { display: inline-flex; align-items: center; gap: 6px; min-block-size: var(--target-size); color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-soft); text-underline-offset: 3px; }
.apt-breadcrumb a:hover { color: var(--ink); text-decoration-color: currentColor; }
.apt-breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }
.apt-breadcrumb .ab-pillar::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--tag-c, var(--pillar-other)); }

/* Place and date */
.apt-post .akseki-detail-style1.akseki-meta,
.apt-post .akseki-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
	justify-content: flex-start;
	margin: 0; padding: 0;
	border: 0;
	color: var(--ink-2);
	font-size: 0.95rem;
}
.apt-post .akseki-meta .meta-location { display: inline; }
.apt-post .akseki-meta .roundflag { margin-left: 4px; }
.apt-post .akseki-meta .meta-date { display: inline-flex; align-items: center; }
.apt-post .akseki-meta .meta-date::before {
	content: ''; font-family: inherit;
	width: 1.05em; height: 1.05em; margin-right: 8px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Body: image + content, with an aside for related meetings */
.apt-post-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(28px, 4vw, 56px);
}
@media (min-width: 992px) {
	.apt-post-body { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
}
.apt-post-figure { margin: 0 0 28px; }
.apt-post-figure a { display: block; border-radius: var(--radius-tile); overflow: hidden; cursor: zoom-in; }
.apt-post-figure img { display: block; width: 100%; height: auto; }
.apt-post .entry-content { font-size: 1.05rem; line-height: 1.75; max-width: 72ch; border-bottom: 0; padding-bottom: 0; } /* style.css drew a dotted maroon line */
.apt-post .entry-content > * + * { margin-top: 1.1em; }
.apt-post .entry-content a { color: var(--apt-blue); text-underline-offset: 3px; }
.apt-post .entry-content a:hover { color: var(--apt-red); }
.apt-post .entry-content hr { border: 0; border-top: 1px solid var(--rule-soft); }
/* "Click for the full statement" (core file block): an ink pill with an arrow */
.apt-post .entry-content .wp-block-file { margin-top: 1.5em; }
.apt-post .entry-content .wp-block-file a {
	display: inline-flex; align-items: center;
	min-block-size: max(44px, var(--target-size));
	padding: 0 22px;
	border-radius: var(--radius-pill);
	background: var(--ink); color: var(--paper);
	font-weight: 600; text-decoration: none;
}
.apt-post .entry-content .wp-block-file a::after {
	content: ''; width: 1.15em; height: 1.15em; margin-left: 10px;
	background-color: currentColor;
	-webkit-mask: var(--icon-arrow) center / contain no-repeat;
	mask: var(--icon-arrow) center / contain no-repeat;
}
.apt-post .entry-content .wp-block-file a:hover { background: var(--apt-red); color: var(--paper); }
/* The core button duplicates the file link: hide it only when that link is there.
   Older posts have the button alone, which must stay. */
.apt-post .entry-content .wp-block-file a:not(.wp-block-file__button) ~ .wp-block-file__button { display: none; }

/* Aside */
.apt-post-aside { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.apt-post-aside .sidebar-left-item { margin: 0 !important; padding: 0 !important; }
.site-main:not(.front-main) .sidebar-left-item { text-align: left; }
.apt-post-note {
	margin: 0; padding: 12px 16px;
	border: 1px dashed var(--rule-soft); border-radius: 12px;
	background: var(--paper-2); color: var(--ink-2); font-size: 0.9rem;
}

/* Related-meeting dropdowns (sidebar-akseki_short-title / _same-theme) */
.site-main:not(.front-main) .detail-sidebar { border: 1px solid var(--rule-soft); border-radius: var(--radius-tile); overflow: hidden; }
.site-main:not(.front-main) .detail-sidebar .toggler-title {
	display: block; width: 100%;
	padding: 16px 18px !important;
	border: 0 !important; border-radius: 0;
	background: var(--paper-2) !important;
	color: var(--ink) !important;
	text-align: left !important;
	box-shadow: none !important;
	white-space: normal;
}
.site-main:not(.front-main) .detail-sidebar .toggler-title:hover { background: #eceef2 !important; }
.site-main:not(.front-main) .detail-sidebar .toggler-title h3 {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin: 0 0 4px; font-size: 1.15rem; font-weight: 700;
}
.site-main:not(.front-main) .detail-sidebar .toggler-title p { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.site-main:not(.front-main) .detail-sidebar .more-less {
	flex: none; width: 18px; height: 18px; font-size: 0; /* font-size 0 hides the old dashicon glyph */
	background-color: currentColor;
	-webkit-mask: var(--icon-chevron) center / contain no-repeat;
	mask: var(--icon-chevron) center / contain no-repeat;
	transition: rotate 0.2s;
}
.site-main:not(.front-main) .detail-sidebar .more-less::before { content: none; }
.site-main:not(.front-main) .detail-sidebar .more-less.dashicons-arrow-up { rotate: 180deg; }
@media (prefers-reduced-motion: reduce) { .site-main:not(.front-main) .detail-sidebar .more-less { transition: none; } }
.site-main:not(.front-main) .detail-sidebar .list-group { margin: 0; padding: 4px 6px 8px; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.site-main:not(.front-main) .detail-sidebar .list-group-item {
	border: 0; border-bottom: 1px solid var(--rule-soft);
	padding: 10px 12px !important; font-size: 0.9rem; background: transparent;
}
.site-main:not(.front-main) .detail-sidebar .list-group-item:last-child { border-bottom: 0; }
.site-main:not(.front-main) .detail-sidebar .list-group-item-warning { background: rgba(255, 205, 0, 0.16); border-radius: 8px; font-weight: 600; color: var(--ink); }
.site-main:not(.front-main) .detail-sidebar h5 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin: 14px 12px 4px !important; padding: 0 !important; }
.site-main:not(.front-main) .related-link { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; flex-wrap: wrap; min-block-size: var(--target-size); }
.site-main:not(.front-main) .related-link:hover { color: var(--apt-red); padding-right: 0; }
.site-main:not(.front-main) .related-link:hover::after { content: none; }
.site-main:not(.front-main) .detail-sidebar .badge-secondary { background: var(--paper-2); color: var(--ink-2); font-weight: 500; border-radius: 999px; padding: 2px 8px; }

/* Sources: editors only */
.apt-post-sources { padding: 14px 16px; border-radius: 12px; background: var(--paper-2); font-size: 0.85rem; }
.apt-post-sources h2 { font-size: 0.95rem; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.apt-post-sources h2 span { display: block; font-size: 0.75rem; font-weight: 400; color: var(--ink-3); }
.apt-post-sources ul { margin: 0; padding-left: 1.1em; }
.apt-post-sources li + li { margin-top: 6px; }
.apt-post-sources a { color: var(--ink-2); overflow-wrap: anywhere; display: inline-block; min-block-size: var(--target-size); }
.apt-post-sources a:hover { color: var(--apt-red); }
.apt-post-sources p { margin: 0; color: var(--ink-3); }

/* ---------- Inner pages: shared page header ------------------------------ */
/* Four templates print the page title four different ways (.topic-head,
   archive .page-header, page .entry-header, 404 .page-title). Give them one look. */
.site-main:not(.front-main) #avi-content > .page-header,
.site-main:not(.front-main) article.type-page > .entry-header,
.site-main:not(.front-main) #avi-content > .page-title,
.site-main:not(.front-main) .apt-page-head {
	display: block;
	margin: 0 0 clamp(20px, 3vw, 32px) !important;
	padding: clamp(28px, 4vw, 48px) 0 18px !important;
	border-bottom: 1px solid var(--rule);
}
.site-main:not(.front-main) .topic-head :is(h1, h2),
.site-main:not(.front-main) #avi-content > .page-header .page-title,
.site-main:not(.front-main) article.type-page > .entry-header .entry-title,
.site-main:not(.front-main) #avi-content > .page-title,
.site-main:not(.front-main) .apt-page-head h1 {
	font-size: clamp(2rem, 1.4rem + 2vw, 3rem) !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0;
	color: var(--ink);
}
.site-main:not(.front-main) .topic-head { margin-bottom: clamp(20px, 3vw, 32px) !important; padding-bottom: 18px; }
.site-main:not(.front-main) .topic-head :is(h1, h2) { padding: 0; }
/* page.php prints an <hr> under the title; the header already has a rule */
.site-main:not(.front-main) article.type-page > .entry-header > hr,
.site-main:not(.front-main) #avi-content > .page-header > hr { display: none; }
/* Long full name under a category title (was a maroon badge) */
.site-main:not(.front-main) .category-subtitle {
	font-family: var(--font) !important; letter-spacing: 0;
	display: block; margin: 10px 0 0; padding: 0 !important;
	background: none !important; color: var(--ink-2) !important;
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); font-weight: 500; text-align: left; white-space: normal;
	border-radius: 0; transform: none;
}
.apt-page-head p { margin: 8px 0 0; color: var(--ink-2); }

/* ---------- Inner pages: Bootstrap colours remapped to the APT palette ---- */
/* The bundled Bootstrap is a custom build whose theme colours are the old
   palette (primary #98294b maroon, secondary #ced4da grey, warning #ffff00).
   Remap them once so every template follows the design system. */
.site-main:not(.front-main) .text-primary { color: var(--apt-blue) !important; }
.site-main:not(.front-main) .border-primary { border-color: var(--apt-blue) !important; }
.site-main:not(.front-main) .bg-primary,
.site-main:not(.front-main) .badge-primary,
.site-main:not(.front-main) .list-group-item-primary { background: var(--ink) !important; color: var(--paper) !important; border-color: var(--ink) !important; }
.site-main:not(.front-main) .list-group-item-primary:hover { background: var(--apt-red) !important; }
.site-main:not(.front-main) .bg-secondary,
.site-main:not(.front-main) .badge-secondary,
.site-main:not(.front-main) .bg-light { background: var(--paper-2) !important; color: var(--ink-2); }
.site-main:not(.front-main) .text-warning { color: #8a6200 !important; }
.site-main:not(.front-main) .bg-warning,
.site-main:not(.front-main) .badge-warning,
.site-main:not(.front-main) .list-group-item-warning { background: rgba(255, 205, 0, 0.18) !important; color: var(--ink) !important; }
.site-main:not(.front-main) .text-danger { color: var(--apt-red) !important; }
.site-main:not(.front-main) .badge {
	border-radius: var(--radius-pill); font-weight: 500; font-style: normal;
	padding: 0.3em 0.75em; letter-spacing: 0; white-space: normal; text-align: left;
}
.site-main:not(.front-main) em.badge { font-style: normal; }
/* "more in ..." links floated at the end of lists */
.site-main:not(.front-main) em.float-right > a { display: inline-flex; align-items: center; min-block-size: var(--target-size); font-style: normal; }
/* A link that is a whole list item (document lists) gets the tap height */
.site-main:not(.front-main) :is(.entry-content, .su-spoiler-content) li > a:only-child {
	display: inline-flex; align-items: center; min-block-size: var(--target-size);
}
/* Badges that are links (tag lists in Ministerial / Resources) are tap targets */
.site-main:not(.front-main) a.badge { display: inline-flex; align-items: center; min-block-size: var(--target-size); margin: 2px 0; }
.site-main:not(.front-main) .badge-light { background: var(--paper-2); color: var(--ink-2); }

/* Buttons: light/secondary -> outline pills, outline-primary used as a note */
.site-main:not(.front-main) .btn { font-style: normal; }
.site-main:not(.front-main) .btn em { font-style: normal; }
.site-main:not(.front-main) .btn-light,
.site-main:not(.front-main) .btn-secondary {
	background: var(--paper) !important; color: var(--ink) !important;
	border: 1px solid var(--rule-soft) !important; box-shadow: none !important;
	border-radius: 12px; font-weight: 500;
	min-block-size: max(36px, var(--target-size));
}
.site-main:not(.front-main) .btn-light:hover,
.site-main:not(.front-main) .btn-secondary:hover { border-color: var(--ink) !important; }
.site-main:not(.front-main) .btn-light.active,
.site-main:not(.front-main) .btn-secondary.active { background: var(--ink) !important; color: var(--paper) !important; border-color: var(--ink) !important; }
.site-main:not(.front-main) .btn-outline-primary:not(a):not(button) {
	display: block; margin: 16px 0 !important; padding: 12px 16px;
	border: 1px dashed var(--rule-soft) !important; border-radius: 12px;
	background: var(--paper-2) !important; color: var(--ink-2) !important;
	font-size: 0.9rem; font-style: normal; text-align: left !important; cursor: default; white-space: normal;
}
.site-main:not(.front-main) .shadow,
.site-main:not(.front-main) .shadow-sm { box-shadow: none !important; }

/* Cards, list groups, separators */
.site-main:not(.front-main) .list-group-item { border-color: var(--rule-soft); }
.site-main:not(.front-main) .list-group-item-action:hover { background: var(--paper-2); }
.site-main:not(.front-main) hr,
.site-main:not(.front-main) .wp-block-separator { border: 0; border-top: 1px solid var(--rule-soft); opacity: 1; }
.site-main:not(.front-main) .card { border-radius: var(--radius-tile); }
.site-main:not(.front-main) .card.bg-primary { background: var(--ink) !important; border: 0; }
.site-main:not(.front-main) .card.bg-primary .btn { background: var(--paper) !important; color: var(--ink) !important; border-radius: var(--radius-pill); }
.site-main:not(.front-main) .card.bg-primary .btn:hover { background: var(--apt-yellow) !important; }

/* Introduction above category listings: plain lead text, not a grey box */
.site-main:not(.front-main) .catdesc {
	border: 0 !important; border-radius: 0 !important;
	background: none !important; color: var(--ink) !important;
	padding: 0 !important; margin: 0 0 clamp(20px, 3vw, 32px) !important;
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem); line-height: 1.7; max-width: 72ch;
}

/* Listing meta: no italics, no maroon chevrons */
.site-main:not(.front-main) .akseki-meta,
.site-main:not(.front-main) .akseki-meta * ,
.site-main:not(.front-main) .meta-location,
.site-main:not(.front-main) .meta-date { font-style: normal; }
.site-main:not(.front-main) .listings-wrapper article .akseki-meta { color: var(--ink-2); }
.site-main:not(.front-main) .listings-wrapper .akseki-meta::before { content: none; }
.site-main:not(.front-main) .akseki-meta .roundflag { margin-left: 4px; }

/* Year / level pills (nav-pills, e.g. Summit Level Statements) */
.site-main:not(.front-main) .nav-pills { background: none !important; gap: 8px; justify-content: flex-start !important; padding: 0 !important; }
.site-main:not(.front-main) .nav-pills .nav-link {
	margin: 0 !important; padding: 6px 14px;
	border: 1px solid var(--rule-soft) !important; border-radius: var(--radius-pill);
	background: var(--paper) !important; color: var(--ink-2) !important;
	min-block-size: max(32px, var(--target-size)); display: inline-flex; align-items: center;
}
.site-main:not(.front-main) .nav-pills .nav-link:hover { border-color: var(--ink) !important; color: var(--ink) !important; }
.site-main:not(.front-main) .nav-pills .nav-link.active { background: var(--ink) !important; color: var(--paper) !important; border-color: var(--ink) !important; }

/* Shortcodes Ultimate accordions (su-spoiler): match the theme's <details> */
.site-main:not(.front-main) .b_acc.ml-4 { margin-left: 0 !important; }
.site-main:not(.front-main) .su-spoiler { margin: 0 !important; border-bottom: 1px solid var(--rule-soft); background: none; border-radius: 0; }
.site-main:not(.front-main) .su-spoiler-title {
	display: flex; align-items: center; gap: 0.6ch;
	padding: 16px 0 !important; margin: 0;
	background: none !important; border: 0 !important; outline: none;
	color: var(--ink); font-size: 1.1rem; font-weight: 600; line-height: 1.35;
	cursor: pointer; min-block-size: var(--target-size);
}
.site-main:not(.front-main) .su-spoiler-title:hover { color: var(--apt-red); }
.site-main:not(.front-main) .su-spoiler-title:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--paper), 0 0 0 6px var(--paper); }
.site-main:not(.front-main) .su-spoiler-icon { display: none !important; }
.site-main:not(.front-main) .su-spoiler-title::before {
	content: ''; flex: none; inline-size: 1.1em; block-size: 1.1em;
	background-color: currentColor;
	-webkit-mask: var(--icon-chevron) no-repeat center / contain;
	mask: var(--icon-chevron) no-repeat center / contain;
	rotate: -90deg;
}
.site-main:not(.front-main) .su-spoiler:not(.su-spoiler-closed) > .su-spoiler-title::before { rotate: 0deg; }
@media (prefers-reduced-motion: no-preference) {
	.site-main:not(.front-main) .su-spoiler-title::before { transition: rotate 0.2s; }
}
.site-main:not(.front-main) .su-spoiler:not(.su-spoiler-closed) > .su-spoiler-content { padding: 0 0 18px 1.7em !important; }

/* Gallery (page-gallery3.php masonry) */ /* identity at rest; scales on hover */

/* News page cards (page-news-2.php): meta bar was maroon */
.site-main:not(.front-main) .card .akseki-meta.rounded,
.site-main:not(.front-main) .latest-item .akseki-meta {
	background: var(--paper-2) !important; color: var(--ink-2) !important;
	border-radius: 8px !important; padding: 4px 10px !important; font-size: 0.85rem;
}
.site-main:not(.front-main) .card .akseki-meta::before { content: none !important; }
/* Bootstrap btn-link lists (Statements) and their year labels */
.site-main:not(.front-main) .btn-link { color: var(--apt-blue) !important; text-decoration: none; }
.site-main:not(.front-main) .btn-link:hover { color: var(--apt-red) !important; }
.site-main:not(.front-main) .btn-link em.float-right { color: var(--ink-3) !important; font-style: normal; }

/* "More ..." buttons and the "Activities at other levels" tiles */
.site-main:not(.front-main) a.btn-light.w-100 { border-radius: var(--radius-pill); }

/* ---------- Not found / no results; Agenda page ------------------------- */
.apt-notfound { padding: 8px 0 clamp(24px, 4vw, 48px); max-width: 60ch; }
.apt-notfound h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 8px; }
.apt-notfound p { color: var(--ink-2); margin: 0 0 16px; }
.apt-notfound-links { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.apt-notfound-links a { display: inline-flex; align-items: center; min-block-size: var(--target-size); color: var(--ink); font-weight: 500; text-decoration: none; }
.apt-notfound-links a:hover { color: var(--apt-red); }
.apt-notfound .apt-pill { min-block-size: var(--target-size); cursor: pointer; }

.apt-agenda-page { padding: 0; }
.apt-agenda-page .agenda-timeline { padding: 0; }
.apt-agenda-archive-link { margin-top: 28px; }

/* ---------- Forms in page content (e.g. Limited Access login) ----------- */
/* Labels stacked above controls; controls at least 16px text (no iOS zoom),
   48px tall (52px on touch), #767676 borders; ink pill submit. */
.site-main:not(.front-main) .entry-content form { max-width: 28rem; margin-block: 8px 24px; }
.site-main:not(.front-main) .entry-content form p { display: block; margin: 0 0 1.25rem; }
/* style.css: "#post-4452 .login-password, .login-submit { display: table-cell }" squeezed the field */
.site-main:not(.front-main) .entry-content form :is(.login-password, .login-submit) { display: block !important; }
.site-main:not(.front-main) .entry-content form label { display: block; margin-block-end: 0.4rem; font-weight: 500; color: var(--ink); }
.site-main:not(.front-main) .entry-content form :is(input[type="text"], input[type="password"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], textarea, select) {
	display: block; inline-size: 100%; box-sizing: border-box;
	font: inherit; font-size: max(1rem, 1em); line-height: 1.4;
	min-block-size: 48px; padding: 0.75rem 0.9rem;
	border: 1px solid #767676; border-radius: 10px;
	background: var(--paper); color: var(--ink);
}
.site-main:not(.front-main) .entry-content form textarea { min-block-size: 9rem; resize: vertical; }
/* Invalid only after the user has interacted with the field */
.site-main:not(.front-main) .entry-content form :is(input, textarea, select):user-invalid { border-color: var(--apt-red); border-width: 2px; }
@media (pointer: coarse) {
	.site-main:not(.front-main) .entry-content form :is(input[type="text"], input[type="password"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], select) { min-block-size: 52px; }
}
.site-main:not(.front-main) .entry-content form :is(input[type="submit"], button[type="submit"], button:not([type])) {
	appearance: none; font: inherit; font-weight: 600;
	min-block-size: 48px; padding: 0 1.6rem;
	border: 0; border-radius: var(--radius-pill);
	background: var(--ink); color: var(--paper); cursor: pointer;
	scale: 1; transition: background-color 150ms ease-out, scale 150ms ease-out;
}
.site-main:not(.front-main) .entry-content form :is(input[type="submit"], button[type="submit"], button:not([type])):hover { background: var(--apt-red); }
.site-main:not(.front-main) .entry-content form :is(input[type="submit"], button[type="submit"], button:not([type])):active { scale: 0.97; }
@media (prefers-reduced-motion: reduce) {
	.site-main:not(.front-main) .entry-content form :is(input[type="submit"], button[type="submit"], button:not([type])):active { scale: 1; }
}
.site-main:not(.front-main) .entry-content form input[type="checkbox"] { accent-color: var(--ink); inline-size: 1.25rem; block-size: 1.25rem; }
.site-main:not(.front-main) .entry-content form .login-remember label { display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: var(--target-size); font-weight: 400; }
/* reCAPTCHA keeps its own fixed size; just give it room */
.site-main:not(.front-main) .entry-content form .g-recaptcha { margin-block-end: 1.25rem; }

/* ---------- Contact page ----------------------------------------------- */
/* Map + address side by side, stacked on narrow screens. Used by the
   Contact page content: <div class="apt-contact"> <iframe> <address> */
.apt-contact {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(20px, 3vw, 40px);
	align-items: start;
	margin-block: 8px 32px;
}
@media (min-width: 768px) { .apt-contact { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.apt-contact iframe { inline-size: 100%; min-block-size: 280px; border: 0; border-radius: var(--radius-tile); background: var(--paper-2); }
.apt-contact address { font-style: normal; line-height: 1.7; margin: 0; }
.apt-contact address strong { display: block; font-size: 1.25rem; font-weight: 700; margin-block-end: 6px; }
.apt-contact address a { display: inline-flex; align-items: center; min-block-size: var(--target-size); color: var(--apt-blue); }
.apt-contact address a:hover { color: var(--apt-red); }
.apt-contact .apt-contact-cta { margin-block-start: 20px; }
.apt-contact .apt-contact-cta p { margin: 0 0 12px; color: var(--ink-2); }
.apt-contact .apt-contact-cta a.apt-pill { min-block-size: max(44px, var(--target-size)); padding-inline: 20px; font-size: 1rem; font-weight: 600; color: var(--paper); background: var(--ink); border-color: var(--ink); text-decoration: none; }
.apt-contact .apt-contact-cta a.apt-pill:hover { background: var(--apt-red); border-color: var(--apt-red); color: var(--paper); }

/* ---------- Footer (on gradient) ----------------------------------------- */

.apt-footer {
	color: var(--on-grad);
	padding: clamp(40px, 6vw, 72px) 0 28px;
	border-top: 0;
}
.apt-footer a { color: var(--on-grad); text-decoration: none; }
.apt-footer a:hover { color: var(--apt-yellow); }
.apt-footer-top {
	display: flex; align-items: center; justify-content: space-between; gap: 20px;
	padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--on-grad-rule);
}
/* Footer logo uses the header's .apt-brand pill (same size and look);
   keep the footer's white/yellow link colours off it. */
.apt-footer .apt-footer-brand,
.apt-footer .apt-footer-brand:hover { color: var(--ink); }
.apt-social { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.apt-social a {
	width: max(40px, var(--target-size)); height: max(40px, var(--target-size)); border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--on-grad); color: var(--apt-blue);
	transition: transform 0.15s ease, background 0.15s ease;
}
.apt-social a:hover { background: var(--apt-yellow); color: var(--ink); transform: translateY(-2px); }

.apt-footer-cols {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 1.4fr) minmax(0, 1.2fr);
	gap: 32px 40px;
}
.apt-footer-heading { font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; color: var(--on-grad); }
.apt-footer-cols ul { list-style: none; margin: 0; padding: 0; }
.apt-footer-cols li { margin-bottom: 2px; font-size: 0.9rem; }
.apt-footer-cols li a { display: inline-flex; align-items: center; color: var(--on-grad-2); }
.apt-footer-cols li a:hover { color: var(--on-grad); }
/* footer menu: one column per top-level item, first level of children below */
.apt-footer-menu {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 24px 28px;
}
.apt-footer-menu > li { margin: 0; }
.apt-footer-menu > li > a { font-size: 1.05rem; font-weight: 600; color: var(--on-grad) !important; margin-bottom: 8px; }
.apt-footer-menu .sub-menu .sub-menu { display: none; }
@media (max-width: 991.98px) {
	.apt-footer-cols { grid-template-columns: 1fr 1fr; }
	.apt-footer-menu { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
	.apt-footer-cols { grid-template-columns: 1fr; }
	.apt-footer-menu { grid-template-columns: 1fr 1fr; }
}
.apt-footer-address { font-style: normal; font-size: 0.9rem; line-height: 1.7; color: var(--on-grad-2); margin: 0; }

.apt-footer-bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
	margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--on-grad-rule);
	font-size: 0.85rem; color: var(--on-grad-2);
}
@media (max-width: 575.98px) {
	.apt-footer-top { flex-direction: column; align-items: flex-start; }
}

/* News page: the home page cards in a grid. Each cell is narrow, so the
   card keeps its stacked layout (the side-by-side one is for the carousel). */
.apt-news-grid {
	list-style: none;
	margin: 24px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 24px;
}
.apt-news-grid > li { display: flex; margin: 0; }
.apt-news-grid .news-card { width: 100%; }
.apt-news-grid .news-card-title { font-size: 1.15rem; }

/* Bootstrap's .text-muted (#6c757d) drops to 4.3:1 on the light grey panels;
   use the theme's secondary ink, which passes on white and grey. */
.site-main .text-muted { color: var(--ink-2) !important; }

/* Links inside running text are underlined, not told apart by colour alone
   (WCAG 1.4.1). Lists of links, buttons and styled links keep their own look. */
.site-main:not(.front-main) :where(p, td, dd, blockquote, figcaption, .catdes) > a:not([class]),
.site-main:not(.front-main) :where(p, td, dd, blockquote, figcaption) > :where(strong, em, b, i) > a:not([class]) {
	text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* "ASEAN Plus Three" is kept on one line in section titles, but on very
   narrow screens or with wider user text spacing (WCAG 1.4.12) it must wrap. */
@media (max-width: 400px) {
	.apt-section-title .text-nowrap { white-space: normal !important; }
}

/* Statement rows on meeting pages (listings-list.php): a quiet label with the
   meeting and year on the left, the full title and place/date on the right. */
.site-main:not(.front-main) .ministerial-listing { gap: 0; }
.site-main:not(.front-main) .apt-statement-row {
	display: grid !important; grid-template-columns: 8.5rem 1fr; gap: 6px 20px; align-items: start;
	padding: 18px 0 !important; border: 0 !important; border-top: 1px solid var(--rule-soft) !important;
	background: none !important;
}
.apt-statement-when { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.apt-statement-short { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.apt-statement-year { color: var(--ink-2); font-size: 0.85rem; }
.apt-statement-main { min-width: 0; }
.apt-statement-title { font-size: 1.05rem !important; font-weight: 600 !important; line-height: 1.35; margin: 0 0 6px !important; color: var(--ink); font-family: var(--font) !important; letter-spacing: 0; }
.apt-statement-title a { color: var(--ink); text-decoration: none; }
.apt-statement-title a:hover { color: var(--apt-blue); text-decoration: underline; text-underline-offset: 3px; }
.apt-statement-row .akseki-meta { margin: 0; color: var(--ink-2); font-size: 0.9rem; }
.apt-statement-row.is-upcoming .apt-statement-title { font-weight: 500 !important; color: var(--ink-2); }
@media (max-width: 575.98px) {
	.site-main:not(.front-main) .apt-statement-row { grid-template-columns: 1fr; }
	.apt-statement-when { flex-direction: row; gap: 10px; }
}

/* Small notes in sidebars (e.g. "downloads are limited"): text, not a fake button */
.apt-note { margin: 0 0 20px; padding-left: 12px; border-left: 3px solid var(--apt-yellow); color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; }

/* Category pages: content lines up with the title (Bootstrap's row/column
   padding pushed it 15px in). */
.site-main:not(.front-main) #avi-content > .listings-wrapper.row { margin-inline: 0; }
.site-main:not(.front-main) #avi-content > .listings-wrapper.row > .order-2 { padding-left: 0; }
.site-main:not(.front-main) #avi-content > .listings-wrapper.row > .order-3 { padding-right: 0; }

/* About page (page-about-apt.php): ASEC text and links, flags beside it */
.apt-about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding-bottom: clamp(24px, 4vw, 48px); }
.apt-about-lede { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); line-height: 1.7; margin: 0 0 8px; max-width: 68ch; }
.apt-about-source { margin: 0 0 24px; color: var(--ink-2); font-size: 0.85rem; }
.apt-about-links { display: flex; flex-wrap: wrap; gap: 10px; }
.apt-about-flags { display: flex; flex-direction: column; gap: 18px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-tile); background: var(--paper-2); }
.apt-about-flags .apt-flag-group { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.apt-about-flags .apt-flag-group img { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--rule-soft); }
.apt-about-flags .is-asean img { box-shadow: 0 0 0 3px var(--apt-yellow); }
@media (max-width: 767.98px) {
	.apt-about { grid-template-columns: 1fr; }
	.apt-about-flags .apt-flag-group img { width: 36px; height: 36px; }
}

/* ---------- Content pages (editor content) ------------------------------ */
/* Justified text leaves uneven gaps between words; read left-aligned. */
.site-main:not(.front-main) .entry-content :is(p, li)[align="justify"],
.site-main:not(.front-main) .entry-content [style*="text-align: justify"],
.site-main:not(.front-main) .entry-content [style*="text-align:justify"] { text-align: left !important; }
.site-main:not(.front-main) .entry-content > .wp-block-separator:first-child { display: none; }
.site-main:not(.front-main) .entry-content img { border-radius: var(--radius-tile); }
/* Bootstrap cards written into page content: theme panels */
.site-main:not(.front-main) .entry-content .card { border: 0 !important; border-radius: var(--radius-tile) !important; background: var(--paper-2) !important; box-shadow: none !important; }
.site-main:not(.front-main) .entry-content .card-body { padding: clamp(18px, 2.5vw, 24px); }
.site-main:not(.front-main) .entry-content .card-title :is(h4, h5) { font-size: 1rem; font-weight: 700; margin: 0 0 10px; }
.site-main:not(.front-main) .entry-content .card .lcp_catlist { list-style: none; margin: 0 0 16px; padding: 0; }
.site-main:not(.front-main) .entry-content .card .lcp_catlist li { padding: 8px 0; border-top: 1px solid var(--rule-soft); font-size: 0.95rem; line-height: 1.45; }
.site-main:not(.front-main) .entry-content :is(.btn-primary, .btn-block.btn-primary) {
	display: inline-flex !important; width: auto !important; align-items: center; min-block-size: var(--target-size);
	padding: 8px 18px !important; border-radius: var(--radius-pill) !important; border: 1px solid var(--ink) !important;
	background: var(--ink) !important; color: var(--paper) !important; font-weight: 600; text-decoration: none !important;
}
.site-main:not(.front-main) .entry-content .btn-primary:hover { background: var(--apt-blue) !important; border-color: var(--apt-blue) !important; }

/* Links to related pages at the end of About / History / Areas */
.apt-related-links { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(28px, 4vw, 44px) 0 clamp(24px, 4vw, 48px); padding-top: 24px; border-top: 1px solid var(--rule-soft); }

/* History (page-history.php): the page text at a readable width */
.apt-history p { font-size: 1.05rem; line-height: 1.75; max-width: 72ch; }
.apt-history :is(figure, .wp-block-gallery) { max-width: 100%; margin: 0; }
.apt-history img { max-width: 100%; height: auto; }

/* Areas of Cooperation (page-areas-of-cooperation.php) */
.apt-areas-intro { margin-bottom: clamp(28px, 4vw, 40px); }
.apt-areas-title { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); font-weight: 700; margin: 0 0 18px; }
.apt-areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.apt-areas-pillar { padding: clamp(18px, 2.5vw, 24px); border-radius: var(--radius-tile); background: var(--paper-2); border-top: 4px solid var(--tag-c, var(--apt-blue)); }
.apt-areas-pillar-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; }
.apt-areas-list { list-style: none; margin: 0; padding: 0; }
.apt-areas-list li { border-top: 1px solid var(--rule-soft); }
.apt-areas-list a { display: flex; align-items: center; min-block-size: var(--target-size); padding: 6px 0; color: var(--ink); text-decoration: none; }
.apt-areas-list a:hover { color: var(--apt-blue); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Inner pages: remaining Bootstrap patterns from old templates ---------- */
/* "More … statements" and "Activities at other levels": outline pills, not shadowed boxes */
.site-main:not(.front-main) a.btn-light {
	display: inline-flex !important; width: auto !important; max-width: 100%; flex: 0 0 auto !important;
	align-items: center; justify-content: center; min-block-size: var(--target-size);
	margin: 8px 0 0 !important; padding: 8px 18px !important;
	border: 1px solid var(--rule) !important; border-radius: var(--radius-pill) !important;
	background: var(--paper) !important; box-shadow: none !important;
	color: var(--ink) !important; font-weight: 600; font-size: 0.95rem; text-align: center;
}
.site-main:not(.front-main) a.btn-light em { font-style: normal; }
.site-main:not(.front-main) a.btn-light:hover { border-color: var(--ink) !important; background: var(--paper-2) !important; }
.site-main:not(.front-main) .container:has(> .row > a.btn-light) { padding: 0; }
.site-main:not(.front-main) .container > .row:has(> a.btn-light) { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

/* List groups in content: plain rows divided by a rule, no grey rounded boxes */
.site-main:not(.front-main) .list-group:not(.detail-sidebar .list-group) > .list-group-item:not(.list-group-item-primary):not(.list-group-item-warning) {
	background: transparent !important; border-radius: 0 !important;
	border-width: 0 0 1px !important; border-style: solid !important; border-color: var(--rule-soft) !important;
	color: var(--ink);
}
.site-main:not(.front-main) .list-group:not(.detail-sidebar .list-group) > .list-group-item-action:not(.list-group-item-primary):hover { background: var(--paper-2) !important; }
.site-main:not(.front-main) .list-group > .list-group-item-primary { border-radius: var(--radius-pill) !important; margin-bottom: 8px; text-align: center; }
.site-main:not(.front-main) .list-group > .list-group-item-secondary { text-align: left; }

/* "Themes in …" line on level pages (akseki_get_level_resources) */
.apt-pillar-themes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; }
.apt-pillar-themes > span { color: var(--ink-2); margin-right: 4px; }

/* Shortcodes Ultimate tabs (meetings within a pillar): pill tabs */
.site-main:not(.front-main) .su-tabs { background: none !important; padding: 0 !important; border-radius: 0 !important; }
.site-main:not(.front-main) .su-tabs-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px !important; padding: 0 !important; background: none !important; }
.site-main:not(.front-main) .su-tabs-vertical .su-tabs-nav { float: none !important; width: auto !important; }
.site-main:not(.front-main) .su-tabs-vertical .su-tabs-panes { float: none !important; width: auto !important; }
.site-main:not(.front-main) .su-tabs-nav > span {
	display: inline-flex !important; flex-direction: column; align-items: flex-start; float: none !important;
	min-block-size: var(--target-size); margin: 0 !important; padding: 8px 16px !important;
	border: 1px solid var(--rule-soft) !important; border-radius: 14px !important;
	background: var(--paper) !important; color: var(--ink) !important; cursor: pointer; text-align: left;
}
.site-main:not(.front-main) .su-tabs-nav > span h5 { margin: 0; font-size: 1rem; font-weight: 700; }
.site-main:not(.front-main) .su-tabs-nav > span em { font-style: normal; font-size: 0.82rem; color: var(--ink-2); }
.site-main:not(.front-main) .su-tabs-nav > span.su-tabs-current { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--paper) !important; }
.site-main:not(.front-main) .su-tabs-nav > span.su-tabs-current em { color: rgba(255, 255, 255, 0.85); }
.site-main:not(.front-main) .su-tabs-pane { padding: 0 !important; background: none !important; }

/* Cards in listings (agreements etc.): no grey header/footer bands */
.site-main:not(.front-main) .card-header,
.site-main:not(.front-main) .card-footer { background: transparent !important; border-color: var(--rule-soft) !important; }
.site-main:not(.front-main) .card small.font-italic,
.site-main:not(.front-main) .card .font-italic { font-style: normal !important; }

/* Sidebar category lists (CPR page): no grey box */

/* Bootstrap accordions (latest summit statements): rows divided by a rule, not boxed cards */
.site-main:not(.front-main) .accordion > .card { border: 0 !important; border-bottom: 1px solid var(--rule-soft) !important; border-radius: 0 !important; background: none; }
.site-main:not(.front-main) .accordion > .card > .card-header { padding: 0 !important; border: 0 !important; }
.site-main:not(.front-main) .accordion > .card > .card-header .btn-link {
	display: flex; align-items: baseline; gap: 0.3em; width: 100%;
	min-block-size: var(--target-size); padding: 10px 0 !important; color: var(--ink) !important; font-weight: 600; text-decoration: none !important;
}
.site-main:not(.front-main) .accordion > .card > .card-header .btn-link em { margin-left: auto; float: none !important; font-style: normal; font-weight: 400; color: var(--ink-2); }
.site-main:not(.front-main) .accordion > .card > .card-header .btn-link:hover { color: var(--apt-blue) !important; }
.site-main:not(.front-main) .accordion .card-body { padding: 0 0 12px !important; }

/* Sidebar list of other levels and documents (CPR+3 page) */
.apt-sidebar-list ul { list-style: none; margin: 0; padding: 0; }
.apt-sidebar-list li { border-top: 1px solid var(--rule-soft); }
.apt-sidebar-list li a { display: flex; align-items: center; min-block-size: var(--target-size); padding: 6px 0; color: var(--ink); text-decoration: none; }
.apt-sidebar-list li a:hover { color: var(--apt-blue); text-decoration: underline; text-underline-offset: 3px; }
.apt-sidebar-list .children { padding-left: 14px; }
.apt-sidebar-list .current-cat > a { font-weight: 700; }

/* ---------- Statements and Declarations (category-7.php) ---------- */
.apt-statements-home { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); align-items: start; }
.apt-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; }
.apt-block-head h2 { margin: 0; font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.7rem); font-weight: 700; }
.apt-summit-list { list-style: none; margin: 0; padding: 0; }
.apt-summit { padding: 16px 0; border-top: 1px solid var(--rule-soft); }
.apt-summit-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.apt-summit-name { margin: 0; font-size: 1.15rem; font-weight: 700; }
.apt-summit-name a { color: var(--ink); text-decoration: none; }
.apt-summit-name a:hover { color: var(--apt-blue); text-decoration: underline; text-underline-offset: 3px; }
.apt-summit .akseki-meta { margin: 0; font-size: 0.9rem; color: var(--ink-2); }
.apt-summit-docs { list-style: none; margin: 8px 0 0; padding: 0; }
.apt-summit-docs li { position: relative; padding: 4px 0 4px 18px; line-height: 1.45; }
.apt-summit-docs li::before { content: ''; position: absolute; left: 2px; top: 0.85em; width: 8px; height: 2px; background: var(--rule); }
.apt-summit-docs a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-soft); text-underline-offset: 3px; }
.apt-summit-docs a:hover { color: var(--apt-blue); text-decoration-color: currentColor; }
.apt-statements-block .apt-statement-row { grid-template-columns: 7rem 1fr; }
.apt-levels { margin: clamp(32px, 5vw, 56px) 0 clamp(24px, 4vw, 48px); padding-top: clamp(24px, 3vw, 32px); border-top: 1px solid var(--rule); }
.apt-levels-title { margin: 0 0 16px; font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.7rem); font-weight: 700; }
.apt-level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.apt-level-card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border-radius: var(--radius-tile); background: var(--paper-2); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.apt-level-card:hover { border-color: var(--ink); color: var(--ink); }
.apt-level-name { font-weight: 700; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; }
.apt-level-desc { color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; }
@media (max-width: 991.98px) { .apt-statements-home { grid-template-columns: 1fr; } }
.apt-sidebar-list { margin: 0 0 28px; }
.apt-sidebar-title { margin: 0 0 8px; font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.apt-sidebar-links a.apt-external::after { content: '\2197'; margin-left: 6px; color: var(--ink-2); font-size: 0.85em; }

/* ---------- Level pages: Ministerial-level, SOM, DG (akseki_get_level_resources) ---------- */
.apt-level-pillars { display: flex; flex-direction: column; }
.apt-level-pillar { border-top: 1px solid var(--rule-soft); }
.apt-level-pillar:last-child { border-bottom: 1px solid var(--rule-soft); }
.apt-level-pillar > summary { display: flex; align-items: center; gap: 12px; min-block-size: var(--target-size); padding: 16px 0; cursor: pointer; list-style: none; }
.apt-level-pillar > summary::-webkit-details-marker { display: none; }
.apt-level-pillar > summary::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--tag-c, var(--pillar-other)); flex: none; }
.apt-level-pillar > summary::after { content: ''; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); rotate: 45deg; translate: 0 -3px; flex: none; }
.apt-level-pillar[open] > summary::after { rotate: -135deg; translate: 0 3px; }
.apt-level-pillar-name { margin: 0; font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem); font-weight: 700; }
.apt-level-pillar > summary:hover .apt-level-pillar-name { color: var(--apt-blue); }
.apt-level-pillar-body { padding: 0 0 24px; }
.apt-meeting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.apt-meeting { display: flex; flex-direction: column; padding: 18px 20px; border-radius: var(--radius-tile); background: var(--paper-2); }
.apt-meeting-name { margin: 0; font-size: 1.1rem; font-weight: 700; }
.apt-meeting-name a { color: var(--ink); text-decoration: none; }
.apt-meeting-name a:hover { color: var(--apt-blue); text-decoration: underline; text-underline-offset: 3px; }
.apt-meeting-full { margin: 4px 0 0; color: var(--ink-2); font-size: 0.9rem; line-height: 1.4; }
.apt-meeting-latest { list-style: none; margin: 12px 0 0; padding: 0; }
.apt-meeting-latest li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--rule-soft); font-size: 0.92rem; line-height: 1.4; }
.apt-meeting-latest a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-soft); text-underline-offset: 3px; }
.apt-meeting-latest a:hover { color: var(--apt-blue); text-decoration-color: currentColor; }
.apt-meeting-latest .akseki-meta { color: var(--ink-2); font-size: 0.82rem; }
.apt-meeting-all { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 8px; min-block-size: var(--target-size); font-weight: 600; color: var(--ink); text-decoration: none; }
.apt-meeting-all:hover { color: var(--apt-blue); }
@media (prefers-reduced-motion: no-preference) { .apt-level-pillar > summary::after { transition: rotate 0.2s; } }

/* ---------- Document lists: agreements, work plans, other documents ---------- */
.apt-doc-list { display: flex; flex-direction: column; margin-bottom: clamp(24px, 4vw, 48px); max-width: 64rem; }
.apt-doc { padding: 18px 0; border-top: 1px solid var(--rule-soft); }
.apt-doc:last-child { border-bottom: 1px solid var(--rule-soft); }
.apt-doc-title { margin: 0 0 6px; font-size: 1.1rem !important; font-weight: 600; line-height: 1.35; font-family: var(--font) !important; letter-spacing: 0; }
.apt-doc-title a { color: var(--ink); text-decoration: none; }
.apt-doc-title a:hover { color: var(--apt-blue); text-decoration: underline; text-underline-offset: 3px; }
.apt-doc-full { margin: 0 0 6px; color: var(--ink); }
.apt-doc .akseki-meta { margin: 0; color: var(--ink-2); font-size: 0.9rem; }
.apt-doc-source { margin: 6px 0 0; font-size: 0.9rem; color: var(--ink-2); }
.apt-doc-source a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-soft); text-underline-offset: 3px; }
.apt-doc-source a:hover { color: var(--ink); text-decoration-color: currentColor; }
.apt-subcats { margin-bottom: clamp(20px, 3vw, 32px) !important; }

/* ---------- Yearly archives (template-parts/sidebar-archives.php) ---------- */
.apt-archive { margin-bottom: clamp(24px, 4vw, 48px); }
.apt-year-nav ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 clamp(20px, 3vw, 32px); padding: 0; }
.apt-year-nav a {
	display: inline-flex; align-items: center; justify-content: center; min-inline-size: 4.2em; min-block-size: var(--target-size);
	padding: 6px 12px; border: 1px solid var(--rule-soft); border-radius: var(--radius-pill);
	color: var(--ink); text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums;
}
.apt-year-nav a:hover { border-color: var(--ink); }
.apt-year-nav a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.apt-archive-year { margin: 0 0 8px; font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.6rem); font-weight: 700; }
.apt-archive-month { margin-top: 20px; }
.apt-archive-month-name { margin: 0 0 4px; font-size: 1.1rem; font-weight: 700; color: var(--ink-2); text-transform: none; }
@media (max-width: 575.98px) {
	/* many years: one scrollable line instead of a tall block */
	.apt-year-nav ul { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; scrollbar-width: thin; }
	.apt-year-nav li { flex: none; }
}

/* ---------- Photo gallery (template-parts/apt-gallery.php) ---------- */
.apt-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; list-style: none; margin: 0 0 clamp(24px, 4vw, 40px); padding: 0; }
.apt-gallery-item { margin: 0; }
.apt-gallery-link { display: block; border-radius: var(--radius-tile); overflow: hidden; background: var(--paper-2); }
.apt-gallery-link img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; scale: 1; transition: scale 0.4s ease; }
.apt-gallery-link:hover img { scale: 1.04; }
@media (prefers-reduced-motion: reduce) { .apt-gallery-link img { transition: none; } .apt-gallery-link:hover img { scale: 1; } }
.apt-gallery-item figcaption { display: flex; flex-direction: column; gap: 2px; padding: 10px 2px 0; }
.apt-gallery-name { font-weight: 700; color: var(--ink); }
.apt-gallery-item .akseki-meta { color: var(--ink-2); font-size: 0.85rem; }

/* ---------- Overview page and content shortcodes ---------- */
/* [akseki_get_recent_posts]: latest summits as cards */
.apt-recent-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; list-style: none; margin: 0 0 12px; padding: 0; }
.apt-recent-card { display: flex; flex-direction: column; gap: 2px; height: 100%; padding-bottom: 10px; border-radius: var(--radius-tile); overflow: hidden; background: var(--paper-2); color: var(--ink); text-decoration: none !important; }
.apt-recent-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 8px; border-radius: 0 !important; }
.apt-recent-name { padding: 0 12px; font-weight: 700; }
.apt-recent-card .akseki-meta { padding: 0 12px; color: var(--ink-2); font-size: 0.8rem; line-height: 1.4; }
.apt-recent-card:hover .apt-recent-name { color: var(--apt-blue); }
.site-main:not(.front-main) .entry-content .float-left:has(> .apt-recent-cards) { float: none !important; width: 100%; max-width: 560px; margin-right: 0 !important; }
/* [akseki_cat_children]: mechanisms as cards */
.apt-mechanisms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; list-style: none; margin: 0 0 16px; padding: 0; }
.site-main:not(.front-main) .entry-content .col-md-4 .apt-mechanisms { grid-template-columns: 1fr; }
.apt-mechanism { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; border-radius: var(--radius-tile); background: var(--paper-2); color: var(--ink) !important; text-decoration: none !important; border: 1px solid transparent; }
.apt-mechanism:hover { border-color: var(--ink); }
.apt-mechanisms.has-photos .apt-mechanism { padding: 0 0 14px; overflow: hidden; }
.apt-mechanisms.has-photos .apt-mechanism img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 10px; border-radius: 0 !important; }
.apt-mechanisms.has-photos .apt-mechanism > span { padding: 0 16px; }
.apt-mechanism-name { font-weight: 700; }
.apt-mechanism-desc { color: var(--ink-2); font-size: 0.88rem; line-height: 1.4; }
/* Overview section headings (h4.subsection in the content) */
.site-main:not(.front-main) .entry-content .subsection {
	clear: both; margin: clamp(32px, 5vw, 56px) 0 16px !important; padding: 16px 0 0 !important;
	border-top: 1px solid var(--rule); border-bottom: 0 !important; text-decoration: none !important;
	font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); font-weight: 700;
}
.site-main:not(.front-main) .entry-content #subsectionPolitical { border-top: 4px solid var(--pillar-ps); }
.site-main:not(.front-main) .entry-content #subsectionEconomic { border-top: 4px solid var(--pillar-ec); }
.site-main:not(.front-main) .entry-content #subsectionSocio { border-top: 4px solid var(--pillar-sc); }
/* Old style.css meta rules (dotted borders, floats) don't apply inside the new cards */
:is(.apt-recent-card, .apt-mechanism, .apt-gallery-item, .apt-doc, .apt-summit, .apt-meeting-latest) .akseki-meta { float: none !important; border: 0 !important; background: none !important; text-align: left !important; }
:is(.apt-recent-card, .apt-mechanism, .apt-gallery-item, .apt-doc, .apt-summit, .apt-meeting-latest) .akseki-meta * {
	float: none !important; display: inline !important; border: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; text-align: left !important;
}
.apt-recent-card .akseki-meta { display: block; padding: 0 12px !important; }
.apt-recent-name { text-align: left !important; display: block; }
/* The 'lone link in a list item' rule (inline-flex, centred) must not reach the new cards */
.site-main:not(.front-main) :is(.entry-content, .su-spoiler-content) li > a:only-child:is(.apt-recent-card, .apt-mechanism, .apt-level-card) { display: flex; flex-direction: column; align-items: stretch; text-align: left; min-block-size: 0; }
.site-main:not(.front-main) .entry-content .col-md-4 .apt-mechanisms.has-photos li > a.apt-mechanism:only-child { display: grid; }
/* Mechanisms with photos in a narrow column: thumbnail beside the name */
.site-main:not(.front-main) .entry-content .col-md-4 .apt-mechanisms.has-photos .apt-mechanism { display: grid; grid-template-columns: 88px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; padding: 10px 14px 10px 10px; }
.site-main:not(.front-main) .entry-content .col-md-4 .apt-mechanisms.has-photos .apt-mechanism img { grid-row: 1 / span 2; width: 88px; height: 88px; aspect-ratio: 1; margin: 0; border-radius: 10px !important; }
.site-main:not(.front-main) .entry-content .col-md-4 .apt-mechanisms.has-photos .apt-mechanism > span { padding: 0; }

/* Images never reserve placeholder space before loading (WordPress's
   auto-sizes adds contain-intrinsic-size: 3000px 1500px to lazy images). */
:is(.news-card, .apt-gallery-link, .apt-recent-card, .apt-mechanism, .apt-hero-feature) img { contain-intrinsic-size: none !important; }

/* Small label above a page title (e.g. the pillar on a theme page) */
.apt-eyebrow { display: inline-flex; min-block-size: var(--target-size); margin: 0 0 4px; font-size: 0.95rem !important; font-weight: 600 !important; color: var(--ink-2) !important; }
.apt-eyebrow:hover { color: var(--ink) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.apt-eyebrow + .entry-title { margin-top: 0 !important; }
/* Long page titles wrap into even lines instead of leaving one word alone */
.site-main:not(.front-main) :is(.entry-title, .page-title, .apt-page-head h1, .topic-head h1) { text-wrap: balance; }
