/* =========================================================
   1. Design tokens
   v3.0.0 — "Bold editorial" identity. Everything is printed on warm
   paper in near-black ink, with one loud tangerine accent. Shapes are
   square-cornered and outlined; depth comes from hard offset "print"
   shadows instead of soft blurs. Type: Fraunces (display serif),
   Inter (text) and JetBrains Mono (labels, numbers, datelines).
   Each tool category keeps its own colour — property = terracotta,
   getting around = cobalt, air & weather = moss — used sparingly for
   labels, rules and the active 3D label.
   Tool-page components live in assets/css/tools.css and only use the
   variables defined here, so they inherit the new look automatically.
   ========================================================= */
:root {
	--am-primary: #ff5a1f;          /* tangerine */
	--am-primary-dark: #d9420b;
	--am-primary-light: #ff8a5b;
	--am-on-primary: #16130f;       /* ink text on tangerine (AA) */
	--am-accent: #1f8a4c;           /* "live" green */
	--am-accent-dark: #146a39;
	--am-gold: #f2b705;
	--am-warm: #ff5a1f;
	--am-ink: #16130f;
	--am-paper: #f5f0e6;
	--am-contrast-bg: #16130f;

	--am-text: #16130f;
	--am-text-muted: #675f52;
	--am-bg: #f5f0e6;
	--am-bg-soft: #ece4d4;
	--am-surface: #fbf8f2;
	--am-surface-raised: #fffdf8;
	--am-border: #d8cfbd;
	--am-border-strong: #16130f;
	--am-rule: #16130f;

	--am-success-bg: #e2f1e6;
	--am-success-text: #135f33;
	--am-success-border: #9fceb0;
	--am-error-bg: #fbe4dc;
	--am-error-text: #9b2c12;
	--am-error-border: #eba48d;
	--am-warn-bg: #fbefc9;
	--am-warn-text: #7a5600;

	--am-cat-property: #e4572e;
	--am-cat-transport: #2a4fd6;
	--am-cat-environment: #2f8f5b;

	--am-radius: 6px;
	--am-radius-sm: 4px;
	--am-max-width: 1240px;
	--am-header-h: 72px;
	--am-strip-h: 32px;
	--am-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--am-font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
	--am-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--am-shadow-sm: 0 1px 0 rgba(22,19,15,.06);
	--am-shadow-md: 4px 4px 0 var(--am-ink);
	--am-shadow-lg: 8px 8px 0 var(--am-ink);
	--am-gradient-brand: linear-gradient(90deg, var(--am-primary), var(--am-primary));
	--am-header-bg: rgba(245,240,230,.94);
	--am-glass: rgba(251,248,242,.94);
	--am-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

	color-scheme: light;
}

/* Dark mode: the same paper, printed in reverse — ink page, paper type,
   tangerine shadows. Declared twice: once for the OS preference (unless
   the visitor picked light), once for an explicit choice. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--am-text: #f3ece0;
		--am-text-muted: #a99f8d;
		--am-bg: #13110e;
		--am-bg-soft: #1b1813;
		--am-surface: #1f1b16;
		--am-surface-raised: #26211b;
		--am-border: #3a332a;
		--am-border-strong: #f3ece0;
		--am-rule: #f3ece0;
		--am-primary-light: #ff8a5b;
		--am-success-bg: #12291b;
		--am-success-text: #7fd6a0;
		--am-success-border: #24563a;
		--am-error-bg: #33170f;
		--am-error-text: #ff9f80;
		--am-error-border: #6d2f1c;
		--am-warn-bg: #2f250a;
		--am-warn-text: #f1cc63;
		--am-shadow-sm: 0 1px 0 rgba(0,0,0,.4);
		--am-shadow-md: 4px 4px 0 var(--am-primary);
		--am-shadow-lg: 8px 8px 0 var(--am-primary);
		--am-header-bg: rgba(19,17,14,.94);
		--am-glass: rgba(31,27,22,.94);
		--am-cat-property: #ff7a52;
		--am-cat-transport: #8aa4ff;
		--am-cat-environment: #5cc28a;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--am-text: #f3ece0;
	--am-text-muted: #a99f8d;
	--am-bg: #13110e;
	--am-bg-soft: #1b1813;
	--am-surface: #1f1b16;
	--am-surface-raised: #26211b;
	--am-border: #3a332a;
	--am-border-strong: #f3ece0;
	--am-rule: #f3ece0;
	--am-primary-light: #ff8a5b;
	--am-success-bg: #12291b;
	--am-success-text: #7fd6a0;
	--am-success-border: #24563a;
	--am-error-bg: #33170f;
	--am-error-text: #ff9f80;
	--am-error-border: #6d2f1c;
	--am-warn-bg: #2f250a;
	--am-warn-text: #f1cc63;
	--am-shadow-sm: 0 1px 0 rgba(0,0,0,.4);
	--am-shadow-md: 4px 4px 0 var(--am-primary);
	--am-shadow-lg: 8px 8px 0 var(--am-primary);
	--am-header-bg: rgba(19,17,14,.94);
	--am-glass: rgba(31,27,22,.94);
	--am-cat-property: #ff7a52;
	--am-cat-transport: #8aa4ff;
	--am-cat-environment: #5cc28a;
	color-scheme: dark;
}

/* Category colour — any element inside an .am-cat-* wrapper can use
   var(--am-cat) / var(--am-cat-soft). */
:root, .am-cat-property { --am-cat: var(--am-cat-property); }
.am-cat-transport { --am-cat: var(--am-cat-transport); }
.am-cat-environment { --am-cat: var(--am-cat-environment); }
:root, .am-cat-property, .am-cat-transport, .am-cat-environment {
	--am-cat-soft: color-mix(in srgb, var(--am-cat) 12%, var(--am-surface));
}

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--am-header-h) + 16px); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
	margin: 0;
	font-family: var(--am-font);
	font-size: 16px;
	color: var(--am-text);
	background-color: var(--am-bg);
	background-image: var(--am-grain);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-feature-settings: "ss01", "cv11";
}
html.am-nav-open { overflow: hidden; }

h1, h2, h3, h4 {
	font-family: var(--am-font-display);
	font-weight: 800;
	font-optical-sizing: auto;
	letter-spacing: -.02em;
	line-height: 1.05;
	margin: 0 0 .6rem;
	color: var(--am-text);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--am-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { color: var(--am-primary-dark); text-decoration-color: var(--am-primary); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--am-primary); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--am-primary); color: var(--am-on-primary); }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1.5px solid var(--am-rule); margin: 2rem 0; }
em { font-style: italic; }

.am-container {
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}
@media (max-width: 600px) { .am-container { padding: 0 1rem; } }

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	overflow: hidden;
	height: 1px; width: 1px;
	white-space: nowrap;
}
.am-skip-link:focus {
	clip: auto; clip-path: none;
	width: auto; height: auto;
	top: .75rem; left: .75rem;
	z-index: 10000;
	background: var(--am-ink);
	color: var(--am-paper);
	padding: .6rem 1rem;
	border-radius: var(--am-radius-sm);
	text-decoration: none;
}

.am-text-center { text-align: center; }
.am-mt-0 { margin-top: 0; }

/* A mono "label" voice used for kickers, datelines and numbers. */
.am-mono { font-family: var(--am-font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }

/* Scroll-reveal: only hidden once JS is known to be running (html.js);
   theme.js adds .is-visible as each element scrolls into view. */
.js .am-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1);
}
.js .am-reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   3. Buttons & links
   Square, outlined, ink by default; tangerine + a hard print shadow on
   hover.
   ========================================================= */
.am-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	background: var(--am-text);   /* ink on paper, paper on ink in dark mode */
	color: var(--am-bg);
	border: 1.5px solid var(--am-text);
	border-radius: var(--am-radius-sm);
	padding: .8rem 1.4rem;
	font-family: inherit;
	font-weight: 700;
	font-size: .95rem;
	letter-spacing: .01em;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 0 0 var(--am-ink);
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.am-btn:hover {
	background: var(--am-primary);
	border-color: var(--am-text);
	color: var(--am-on-primary);
	text-decoration: none;
	transform: translate(-2px, -2px);
	box-shadow: 3px 3px 0 var(--am-text);
}
.am-btn:active { transform: none; box-shadow: 0 0 0 var(--am-ink); }
.am-btn[disabled], .am-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.am-btn.am-btn-accent { background: var(--am-primary); color: var(--am-on-primary); border-color: var(--am-ink); }
.am-btn.am-btn-accent:hover { background: var(--am-primary-light); }
.am-btn.am-btn-outline,
.am-btn.am-btn-ghost {
	background: transparent;
	color: var(--am-text);
	border-color: var(--am-border-strong);
}
.am-btn.am-btn-ghost { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.am-btn.am-btn-outline:hover,
.am-btn.am-btn-ghost:hover { background: var(--am-primary); color: var(--am-on-primary); border-color: var(--am-ink); }
.am-btn.am-btn-quiet { background: transparent; color: var(--am-text); border-color: var(--am-border-strong); }
.am-btn.am-btn-quiet:hover { background: var(--am-text); color: var(--am-bg); box-shadow: 3px 3px 0 var(--am-primary); }
.am-btn.am-btn-dark { background: var(--am-text); color: var(--am-bg); border-color: var(--am-text); }
.am-btn.am-btn-dark:hover { background: var(--am-primary); color: var(--am-on-primary); border-color: var(--am-text); box-shadow: 3px 3px 0 var(--am-text); }
.am-btn.am-btn-light { background: var(--am-paper); color: var(--am-ink); border-color: var(--am-ink); }
.am-btn.am-btn-light:hover { background: var(--am-ink); color: var(--am-paper); box-shadow: 3px 3px 0 var(--am-paper); }
.am-btn.am-btn-danger { background: #b5300f; border-color: #7a1f08; color: #fff; }
.am-btn.am-btn-danger:hover { background: #8f2309; color: #fff; }
.am-btn.am-btn-small { padding: .5rem .9rem; font-size: .84rem; }

.am-link-arrow {
	font-family: var(--am-font-mono);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--am-text);
	text-decoration: none;
	border-bottom: 2px solid var(--am-primary);
	padding-bottom: .15rem;
}
.am-link-arrow::after { content: " →"; transition: margin .15s ease; }
.am-link-arrow:hover { text-decoration: none; color: var(--am-primary-dark); }
.am-link-arrow:hover::after { margin-left: .3rem; }

.am-kicker {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	font-family: var(--am-font-mono);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--am-text);
	margin: 0 0 .9rem;
}
.am-kicker::before {
	content: "";
	width: 1.6rem; height: 3px;
	background: var(--am-primary);
	flex-shrink: 0;
}

/* =========================================================
   4. Masthead header, Tools mega-menu, mobile menu
   A thin mono dateline strip over a main bar, closed off by a double
   ink rule — like the top of a newspaper.
   ========================================================= */
.am-site-header {
	position: sticky;
	top: 0;
	z-index: 900;
	border-bottom: 3px double var(--am-rule);
	transition: box-shadow .2s ease;
}
/* The background lives on a pseudo-element: a backdrop-filter on the
   header itself would make it the containing block for the
   position:fixed mobile menu panel inside it, clipping that panel to the
   header's own height. */
.am-site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--am-header-bg);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
html.am-nav-open .am-site-header::before { background: var(--am-bg); }
.admin-bar .am-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .am-site-header { top: 46px; } }
.am-site-header.is-scrolled { box-shadow: 0 8px 0 -4px color-mix(in srgb, var(--am-text) 8%, transparent); }

/* Dateline strip: collapses away once the page scrolls. */
.am-masthead-strip {
	border-bottom: 1px solid var(--am-border);
	font-family: var(--am-font-mono);
	font-size: .7rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--am-text-muted);
	max-height: var(--am-strip-h);
	overflow: hidden;
	transition: max-height .25s ease, opacity .2s ease, border-color .2s ease;
}
.am-site-header.is-scrolled .am-masthead-strip { max-height: 0; opacity: 0; border-color: transparent; }
.am-masthead-strip-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: var(--am-strip-h);
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}
.am-masthead-strip-inner > span { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.am-masthead-live { color: var(--am-text); font-weight: 700; }
@media (max-width: 600px) {
	.am-masthead-strip-inner { padding: 0 1rem; }
	.am-masthead-date-long { display: none; }
}

.am-header-inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	height: var(--am-header-h);
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

.am-logo {
	display: inline-flex;
	align-items: center;
	gap: .65rem;
	color: var(--am-text);
	flex-shrink: 0;
	text-decoration: none;
}
.am-logo:hover { text-decoration: none; color: var(--am-text); }
.am-logo-mark { display: block; height: 36px; width: auto; max-width: 140px; object-fit: contain; }
.am-logo-glyph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	border-radius: var(--am-radius-sm);
	background: var(--am-text);
	color: var(--am-bg);
	font-family: var(--am-font-display);
	font-weight: 900;
	font-size: 1.35rem;
	line-height: 1;
	box-shadow: 3px 3px 0 var(--am-primary);
	transition: transform .2s ease;
}
.am-logo:hover .am-logo-glyph { transform: rotate(-6deg); }
.am-logo-text {
	font-family: var(--am-font-display);
	font-size: 1.55rem;
	font-weight: 900;
	letter-spacing: -.03em;
	line-height: 1;
}

.am-primary-nav {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 1.25rem;
}
.am-primary-nav ul { list-style: none; margin: 0; padding: 0; }
.am-nav-links { display: flex; align-items: center; gap: .1rem; }
.am-nav-links a,
.am-mega-trigger,
.am-nav-account-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .5rem .75rem;
	color: var(--am-text);
	font-weight: 600;
	font-size: .95rem;
	background: none;
	border: 0;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
}
.am-nav-links a::after,
.am-mega-trigger::after,
.am-nav-account-link::after {
	content: "";
	position: absolute;
	left: .75rem; right: .75rem; bottom: .25rem;
	height: 2px;
	background: var(--am-primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .2s ease;
}
.am-nav-links a:hover,
.am-mega-trigger:hover,
.am-mega.is-open .am-mega-trigger,
.am-nav-account-link:hover { color: var(--am-text); text-decoration: none; }
.am-nav-links a:hover::after,
.am-mega-trigger:hover::after,
.am-mega.is-open .am-mega-trigger::after,
.am-nav-account-link:hover::after,
.am-nav-links .current-menu-item > a::after { transform: scaleX(1); }
.am-nav-account { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.am-header-actions { display: flex; align-items: center; gap: .4rem; }

.am-chevron { width: 1rem; height: 1rem; transition: transform .2s ease; }
.am-mega.is-open .am-mega-trigger .am-chevron { transform: rotate(180deg); }

.am-theme-toggle,
.am-nav-toggle {
	width: 40px; height: 40px;
	border-radius: var(--am-radius-sm);
	border: 1.5px solid var(--am-border-strong);
	background: transparent;
	color: var(--am-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1rem;
	transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.am-theme-toggle:hover,
.am-nav-toggle:hover { background: var(--am-primary); color: var(--am-on-primary); box-shadow: 2px 2px 0 var(--am-border-strong); transform: translate(-1px, -1px); }
.am-nav-toggle { display: none; }
.am-nav-toggle-bars { display: grid; gap: 4px; width: 18px; }
.am-nav-toggle-bars span { display: block; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.am-nav-toggle[aria-expanded="true"] .am-nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.am-nav-toggle[aria-expanded="true"] .am-nav-toggle-bars span:nth-child(2) { opacity: 0; }
.am-nav-toggle[aria-expanded="true"] .am-nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mega-menu panel (desktop): a pinned-up "contents page". */
.am-mega { position: static; }
.am-mega-panel {
	position: absolute;
	left: 50%;
	top: calc(100% + 3px);
	width: min(1080px, calc(100vw - 2rem));
	transform: translate(-50%, 8px);
	background: var(--am-surface-raised);
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	box-shadow: var(--am-shadow-lg);
	padding: 1.75rem;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.am-mega.is-open .am-mega-panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, 0);
}
.am-mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: am-mega; }
.am-mega-col { padding: 0 1.5rem; border-left: 1px solid var(--am-border); counter-increment: am-mega; }
.am-mega-col:first-child { padding-left: 0; border-left: 0; }
.am-mega-col:last-child { padding-right: 0; }
.am-mega-col-head {
	display: flex;
	align-items: center;
	gap: .6rem;
	width: 100%;
	background: none;
	border: 0;
	padding: 0 0 .8rem;
	margin-bottom: .6rem;
	border-bottom: 2px solid var(--am-cat);
	font-family: var(--am-font-display);
	font-weight: 800;
	font-size: 1.15rem;
	color: var(--am-text);
	cursor: default;
	text-align: left;
}
.am-mega-col-head::before {
	content: counter(am-mega, decimal-leading-zero);
	font-family: var(--am-font-mono);
	font-size: .75rem;
	font-weight: 700;
	color: var(--am-cat);
}
.am-mega-col-head .am-chevron { display: none; margin-left: auto; }
.am-mega-col-icon { font-size: 1rem; }
.am-mega-list li a {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .42rem 0;
	color: var(--am-text);
	font-size: .93rem;
	font-weight: 500;
	text-decoration: none;
	border-bottom: 1px dotted var(--am-border);
	transition: color .15s ease, padding .15s ease;
}
.am-mega-list li a:hover { color: var(--am-cat); padding-left: .3rem; text-decoration: none; }
.am-mega-list li a.is-coming-soon { color: var(--am-text-muted); }
.am-mega-item-icon { width: 1.4rem; text-align: center; flex-shrink: 0; }
.am-mega-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1.5px solid var(--am-rule);
	font-family: var(--am-font-mono);
	font-size: .74rem;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--am-text-muted);
}
.am-mega-foot a { font-weight: 700; color: var(--am-text); text-decoration: none; border-bottom: 2px solid var(--am-primary); }

.am-tool-link-soon {
	font-style: normal;
	font-family: var(--am-font-mono);
	font-size: .62rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: .1rem .4rem;
	border: 1px solid currentColor;
	border-radius: 2px;
	color: var(--am-warn-text);
	background: var(--am-warn-bg);
	margin-left: .25rem;
	vertical-align: middle;
}

/* Mobile menu: a full-height panel under the header */
@media (max-width: 960px) {
	.am-nav-toggle { display: inline-flex; }
	.am-header-actions { margin-left: auto; }
	.am-primary-nav {
		position: fixed;
		inset: var(--am-header-h) 0 0 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 1rem 1rem 6rem;
		background: var(--am-bg);
		border-top: 3px double var(--am-rule);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity .2s ease, transform .2s ease, visibility .2s;
	}
	.admin-bar .am-primary-nav { top: calc(var(--am-header-h) + 46px); }
	.am-primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.am-mega-trigger { display: none; }
	.am-mega-panel {
		position: static;
		width: auto;
		transform: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		box-shadow: none;
		border: 0;
		padding: 0;
		background: none;
	}
	.am-mega-grid { grid-template-columns: 1fr; gap: 0; }
	.am-mega-col { padding: 0; border-left: 0; border-bottom: 1px solid var(--am-border); }
	.am-mega-col-head { border: 0; margin: 0; padding: 1.1rem 0; cursor: pointer; font-size: 1.35rem; }
	.am-mega-col-head .am-chevron { display: block; }
	.am-mega-col.is-open .am-mega-col-head .am-chevron { transform: rotate(180deg); }
	.am-mega-list { display: none; padding-bottom: .9rem; }
	.am-mega-col.is-open .am-mega-list { display: block; }
	.am-mega-foot { display: none; }
	.am-nav-links { flex-direction: column; align-items: stretch; padding: .5rem 0; border-bottom: 1px solid var(--am-border); }
	.am-nav-links a { padding: .9rem 0; font-family: var(--am-font-display); font-size: 1.35rem; font-weight: 800; }
	.am-nav-links a::after { left: 0; right: auto; width: 2.5rem; }
	.am-nav-account { margin: 1.5rem 0 0; flex-direction: column; align-items: stretch; gap: .6rem; }
	.am-nav-account .am-btn,
	.am-nav-account-link { justify-content: center; padding: .9rem 1rem; font-size: 1rem; }
	.am-nav-account-link { border: 1.5px solid var(--am-border-strong); border-radius: var(--am-radius-sm); }
	.am-nav-account-link::after { display: none; }
}
@media (max-width: 480px) {
	.am-header-inner { gap: .75rem; padding: 0 1rem; }
	.am-logo-mark { height: 30px; }
	.am-logo-glyph { width: 34px; height: 34px; font-size: 1.15rem; }
	.am-logo-text { font-size: 1.25rem; }
}
/* The mobile menu panel sits under the whole masthead (strip + bar);
   once the strip has collapsed on scroll, just under the bar. */
@media (max-width: 960px) {
	.am-primary-nav { top: calc(var(--am-header-h) + var(--am-strip-h)); }
	.am-site-header.is-scrolled .am-primary-nav { top: var(--am-header-h); }
	.admin-bar .am-primary-nav { top: calc(var(--am-header-h) + var(--am-strip-h) + 46px); }
	.admin-bar .am-site-header.is-scrolled .am-primary-nav { top: calc(var(--am-header-h) + 46px); }
}

/* =========================================================
   5. Sections & layout primitives
   ========================================================= */
.am-section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.am-section-soft { background: var(--am-bg-soft); border-top: 1px solid var(--am-border); border-bottom: 1px solid var(--am-border); }
.am-section-header { text-align: center; max-width: 720px; margin: 0 auto 2.75rem; }
.am-section-header > p { color: var(--am-text-muted); font-size: 1.08rem; }
.am-section-header--split {
	max-width: none;
	text-align: left;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 3rem;
	flex-wrap: wrap;
	padding-bottom: 1.25rem;
	border-bottom: 1.5px solid var(--am-rule);
}
.am-section-header--split h2 { margin: 0; }
.am-section-header--split > p { max-width: 460px; margin: 0; }

.am-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}
.am-grid.am-hidden-services { margin-top: 1.5rem; }
.am-services-more-wrap { text-align: center; margin-top: 2rem; }
.am-empty-state { text-align: center; color: var(--am-text-muted); padding: 2rem 0; font-family: var(--am-font-display); font-size: 1.15rem; font-style: italic; }

/* Tool pages: the page hero is the first thing in <main>, flush under
   the header. */
main.am-section:has(> .am-container > .am-page-hero:first-child),
main.am-section:has(> .am-container:first-child > .am-page-hero),
main.am-section:has(> .am-page-hero:first-child) { padding-top: 0; }

/* =========================================================
   6. Page hero (every tool / content page)
   A full-bleed "section front": mono breadcrumb, a big serif headline,
   a category rule and a double rule underneath.
   ========================================================= */
.am-page-hero {
	position: relative;
	margin: 0 calc(50% - 50vw) 2.75rem;
	padding: 2.25rem max(1.5rem, calc(50vw - var(--am-max-width) / 2 + 1.5rem)) 2.5rem;
	background: var(--am-bg-soft);
	border-bottom: 3px double var(--am-rule);
	text-align: left;
	overflow: hidden;
}
.am-page-hero::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 6px;
	background: var(--am-cat);
}
.am-page-hero::after {
	content: "";
	position: absolute;
	right: -4rem; bottom: -5rem;
	width: 22rem; height: 22rem;
	border: 1.5px solid color-mix(in srgb, var(--am-cat) 45%, transparent);
	border-radius: 50%;
	box-shadow: 0 0 0 2.5rem color-mix(in srgb, var(--am-cat) 6%, transparent), 0 0 0 5rem color-mix(in srgb, var(--am-cat) 4%, transparent);
	pointer-events: none;
}
.am-page-hero-inner { position: relative; z-index: 1; max-width: 900px; }
.am-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	font-family: var(--am-font-mono);
	font-size: .72rem;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--am-text-muted);
	margin-bottom: 1.4rem;
}
.am-breadcrumb a { color: var(--am-text-muted); text-decoration: none; }
.am-breadcrumb a:hover { color: var(--am-text); text-decoration: underline; }
.am-breadcrumb [aria-current] { color: var(--am-text); font-weight: 700; }
.am-page-hero-head { display: flex; align-items: center; gap: 1.1rem; }
.am-page-hero-icon {
	flex-shrink: 0;
	width: 64px; height: 64px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: var(--am-radius-sm);
	font-size: 1.9rem;
	background: var(--am-surface);
	border: 1.5px solid var(--am-border-strong);
	box-shadow: 4px 4px 0 var(--am-cat);
}
.am-page-hero-eyebrow {
	margin: 0 0 .35rem;
	font-family: var(--am-font-mono);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--am-cat);
}
.am-page-hero h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.am-page-hero-lead { margin: 1.1rem 0 0; font-size: 1.15rem; color: var(--am-text-muted); max-width: 66ch; }
.am-page-hero-inner > p:not([class]) { margin: 1rem 0 0; }
.am-page-hero-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem 1.1rem;
	margin-top: 1.4rem;
	font-family: var(--am-font-mono);
	font-size: .74rem;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--am-text-muted);
}
.am-live-pill, .am-soon-pill {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .3rem .65rem;
	border: 1.5px solid currentColor;
	border-radius: 2px;
	font-family: var(--am-font-mono);
	font-weight: 700;
	font-size: .7rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.am-live-pill { background: var(--am-success-bg); color: var(--am-success-text); }
.am-soon-pill { background: var(--am-warn-bg); color: var(--am-warn-text); }
.am-live-dot {
	position: relative;
	display: inline-block;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--am-accent);
	flex-shrink: 0;
}
.am-live-dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid var(--am-accent);
	opacity: 0;
	animation: am-live-ping 2s ease-out infinite;
}
@keyframes am-live-ping {
	0% { transform: scale(.5); opacity: .8; }
	100% { transform: scale(1.6); opacity: 0; }
}
.am-page-hero-save { display: inline-flex; align-items: center; gap: .4rem; }
.am-page-hero-save .am-save-btn { position: static; width: 32px; height: 32px; font-size: 1rem; }
@media (max-width: 600px) {
	.am-page-hero { padding-top: 1.75rem; padding-bottom: 1.9rem; margin-bottom: 1.9rem; }
	.am-page-hero::after { width: 14rem; height: 14rem; right: -6rem; bottom: -6rem; }
	.am-page-hero-icon { width: 50px; height: 50px; font-size: 1.5rem; box-shadow: 3px 3px 0 var(--am-cat); }
}

/* =========================================================
   7. Homepage — the "front page"
   ========================================================= */
.am-hero {
	position: relative;
	padding: clamp(1.75rem, 4vw, 3rem) 0 0;
	overflow: hidden;
}
/* Folio line: issue + date on the left, live tool count on the right. */
.am-hero-folio {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	padding-bottom: .9rem;
	margin-bottom: clamp(1.75rem, 4vw, 3rem);
	border-bottom: 1.5px solid var(--am-rule);
	font-family: var(--am-font-mono);
	font-size: .74rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--am-text-muted);
}
.am-hero-folio strong { color: var(--am-text); }
.am-hero-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
}
.am-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--am-font-mono);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--am-text);
	margin-bottom: 1.25rem;
}
.am-hero h1 { margin: 0 0 1.4rem; line-height: .95; }
.am-hero-brand {
	display: block;
	font-family: var(--am-font-mono);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--am-primary-dark);
	margin-bottom: 1rem;
}
.am-hero-title {
	display: block;
	font-size: clamp(3rem, 7.2vw, 6.25rem);
	font-weight: 900;
	letter-spacing: -.045em;
	color: var(--am-text);
	text-wrap: balance;
}
.am-hero-title em {
	font-style: italic;
	font-weight: 700;
	color: var(--am-primary);
	letter-spacing: -.03em;
}
.am-hero-title .am-hero-underline {
	background: linear-gradient(transparent 72%, color-mix(in srgb, var(--am-primary) 35%, transparent) 72%, color-mix(in srgb, var(--am-primary) 35%, transparent) 92%, transparent 92%);
}
.am-hero-lead {
	font-size: clamp(1.08rem, 1.6vw, 1.25rem);
	color: var(--am-text-muted);
	max-width: 600px;
	margin-bottom: 2rem;
	padding-left: 1.1rem;
	border-left: 3px solid var(--am-primary);
}

.am-finder {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	max-width: 640px;
	padding: .4rem .4rem .4rem 1rem;
	border-radius: var(--am-radius-sm);
	background: var(--am-surface-raised);
	border: 2px solid var(--am-border-strong);
	box-shadow: var(--am-shadow-md);
	transition: box-shadow .15s ease, transform .15s ease;
}
.am-finder:focus-within { box-shadow: 6px 6px 0 var(--am-primary); transform: translate(-1px, -1px); }
.am-finder-icon { color: var(--am-text); display: inline-flex; }
.am-finder-icon svg { width: 22px; height: 22px; }
.am-finder input {
	flex: 1 1 200px;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--am-text);
	font: inherit;
	font-size: 1.05rem;
	padding: .75rem .25rem;
}
.am-finder input::placeholder { color: var(--am-text-muted); opacity: .9; }
.am-finder input::-webkit-search-cancel-button { cursor: pointer; }
.am-finder .am-btn { padding: .8rem 1.5rem; }
.am-finder .am-btn:hover { transform: none; box-shadow: none; }
.am-finder-chips {
	flex-basis: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	padding: .6rem .25rem .4rem;
	border-top: 1px dashed var(--am-border);
	font-family: var(--am-font-mono);
	font-size: .7rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--am-text-muted);
}
.am-finder-chips button {
	border: 1px solid var(--am-border-strong);
	background: transparent;
	color: var(--am-text);
	border-radius: 2px;
	padding: .28rem .6rem;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.am-finder-chips button:hover { background: var(--am-text); color: var(--am-bg); }

.am-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.1rem; margin-top: 1.75rem; }
.am-hero-subcta { font-size: .88rem; color: var(--am-text-muted); max-width: 320px; }

/* Hero board: "On the front page" — the four most-used tools as a
   numbered column of headlines with rules between them. */
.am-hero-side { position: relative; }
.am-hero-side-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 .25rem;
	padding: .55rem .9rem;
	background: var(--am-text);
	color: var(--am-bg);
	font-family: var(--am-font-mono);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.am-hero-board {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	counter-reset: am-board;
	border-bottom: 1.5px solid var(--am-rule);
}
.am-board-card { animation: am-rise .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--am-i, 0) * 80ms + 120ms); }
@keyframes am-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.am-hero-board .am-service-card.am-board-card {
	counter-increment: am-board;
	display: grid;
	grid-template-columns: 3.2rem minmax(0, 1fr);
	grid-template-rows: auto auto auto;
	column-gap: .9rem;
	row-gap: .25rem;
	padding: 1.15rem 2.75rem 1.15rem 0;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--am-border);
	border-radius: 0;
	box-shadow: none;
}
.am-hero-board .am-board-card:first-child { border-top: 0; }
.am-hero-board .am-board-card::before {
	content: counter(am-board, decimal-leading-zero);
	grid-row: 1 / span 3;
	font-family: var(--am-font-display);
	font-size: 2.6rem;
	font-weight: 900;
	line-height: .9;
	letter-spacing: -.04em;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--am-text);
	transition: color .2s ease;
}
.am-hero-board .am-board-card:hover::before { color: var(--am-primary); -webkit-text-stroke-color: var(--am-primary); }
.am-hero-board .am-board-card:hover { box-shadow: none; }
.am-hero-board .am-service-icon { display: none; }
.am-board-cat { font-family: var(--am-font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--am-cat); }
.am-hero-board .am-board-card h3 { font-size: 1.35rem; line-height: 1.15; margin: 0; min-height: 0 !important; }
.am-hero-board .am-board-card:hover h3 { text-decoration: underline; text-decoration-color: var(--am-primary); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.am-board-card p { font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am-board-go {
	position: absolute;
	right: .1rem; top: 50%;
	margin-top: -15px;
	width: 30px; height: 30px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--am-border-strong);
	border-radius: 2px;
	color: var(--am-text);
	font-weight: 700;
	transition: transform .2s ease, background .2s ease, color .2s ease;
}
.am-board-card:hover .am-board-go { transform: translateX(3px); background: var(--am-primary); color: var(--am-on-primary); border-color: var(--am-ink); }
.am-hero-board .am-save-service-btn { top: auto; bottom: 1.1rem; right: .1rem; width: 30px; height: 30px; font-size: .9rem; }
.am-hero-board .am-board-card:has(.am-save-service-btn) .am-board-go { margin-top: -26px; }
.am-hero-board .am-board-card:has(.am-save-service-btn) { padding-bottom: 1.4rem; }
.am-stretched-link { color: inherit; text-decoration: none; }
.am-stretched-link:hover { text-decoration: none; color: inherit; }
.am-stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* Stats: "By the numbers" — big serif figures between vertical rules. */
.am-stats-bar {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	margin: clamp(2.5rem, 5vw, 4rem) 0 0;
	padding: 0;
	border-top: 3px double var(--am-rule);
	border-bottom: 1.5px solid var(--am-rule);
}
.am-stats-bar > div { display: flex; flex-direction: column-reverse; gap: .35rem; padding: 1.25rem 1.25rem 1.35rem; border-left: 1px solid var(--am-border); }
.am-stats-bar > div:first-child { border-left: 0; padding-left: 0; }
.am-stats-bar dd, .am-stats-bar dt { margin: 0; }
.am-stat-number {
	font-family: var(--am-font-display);
	font-size: clamp(2.2rem, 4.4vw, 3.4rem);
	font-weight: 900;
	letter-spacing: -.04em;
	line-height: 1;
	color: var(--am-text);
	font-variant-numeric: tabular-nums;
}
.am-stat-label { font-family: var(--am-font-mono); color: var(--am-text-muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }

/* Ticker: every live tool scrolling past, like a news crawl. */
.am-ticker {
	position: relative;
	overflow: hidden;
	background: var(--am-text);
	color: var(--am-bg);
	border-top: 1.5px solid var(--am-rule);
	border-bottom: 1.5px solid var(--am-rule);
	margin-top: clamp(2rem, 4vw, 3rem);
}
.am-ticker-label {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	padding: 0 1rem;
	background: var(--am-primary);
	color: var(--am-on-primary);
	font-family: var(--am-font-mono);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.am-ticker-track {
	display: flex;
	width: max-content;
	animation: am-ticker 60s linear infinite;
}
.am-ticker:hover .am-ticker-track,
.am-ticker:focus-within .am-ticker-track { animation-play-state: paused; }
.am-ticker-list { display: flex; align-items: center; margin: 0; padding: 0 0 0 1rem; list-style: none; }
.am-ticker-list li { display: inline-flex; align-items: center; white-space: nowrap; }
.am-ticker-list li::after { content: "✶"; margin: 0 1.1rem; color: var(--am-primary); }
.am-ticker-list a {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .8rem 0;
	color: var(--am-bg);
	font-family: var(--am-font-display);
	font-size: 1.05rem;
	font-weight: 700;
	text-decoration: none;
}
.am-ticker-list a:hover { color: var(--am-primary); text-decoration: none; }
@keyframes am-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Tool directory: "The index" — one numbered row per category. */
.am-directory { display: flex; flex-direction: column; gap: 0; counter-reset: am-dir; }
.am-directory-group {
	counter-increment: am-dir;
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 2fr);
	gap: 1.5rem 3rem;
	padding: 2.25rem 0;
	border-bottom: 1.5px solid var(--am-rule);
	background: none;
}
.am-directory-group[hidden] { display: none; }
.am-directory-head { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; padding: 0; position: relative; }
.am-directory-head::before {
	content: counter(am-dir, decimal-leading-zero);
	font-family: var(--am-font-display);
	font-size: clamp(3.5rem, 7vw, 5.5rem);
	font-weight: 900;
	line-height: .85;
	letter-spacing: -.05em;
	color: var(--am-cat);
}
.am-directory-head h3 { margin: .35rem 0 .2rem; font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 900; letter-spacing: -.03em; }
.am-directory-head p { margin: 0; font-size: .95rem; color: var(--am-text-muted); max-width: 32ch; }
.am-directory-icon { display: none; }
.am-directory-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; align-content: start; }
.am-directory .am-empty-state { grid-column: 1 / -1; }

/* Shared "tool link" row (directory, related tools, services hub) */
.am-tool-link {
	display: flex;
	gap: .8rem;
	align-items: flex-start;
	padding: .85rem 0;
	border-bottom: 1px dotted var(--am-border);
	color: var(--am-text);
	text-decoration: none;
	transition: padding .15s ease, color .15s ease;
}
.am-tool-link[hidden] { display: none; }
.am-tool-link:hover { padding-left: .4rem; text-decoration: none; color: var(--am-text); }
.am-tool-link-icon {
	flex-shrink: 0;
	width: 36px; height: 36px;
	border-radius: var(--am-radius-sm);
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 1.1rem;
	background: var(--am-surface);
	border: 1.5px solid var(--am-border-strong);
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.am-tool-link:hover .am-tool-link-icon { transform: rotate(-5deg); box-shadow: 3px 3px 0 var(--am-cat); background: var(--am-cat-soft); }
.am-tool-link-text { display: flex; flex-direction: column; min-width: 0; }
.am-tool-link-name { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.am-tool-link:hover .am-tool-link-name { color: var(--am-cat); }
.am-tool-link-name::after { content: " →"; opacity: 0; transition: opacity .15s ease; }
.am-tool-link:hover .am-tool-link-name::after { opacity: 1; }
.am-tool-link-summary {
	font-size: .84rem;
	color: var(--am-text-muted);
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.am-tool-link.is-coming-soon .am-tool-link-name { color: var(--am-text-muted); }
.am-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 2rem; }

/* Related tools strip (above the footer on tool pages) */
.am-related-tools {
	padding: 3rem 0;
	margin-top: 3.5rem;
	background: var(--am-bg-soft);
	border-top: 3px double var(--am-rule);
}
.am-related-tools h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.am-related-tools .am-tool-link { background: transparent; }

/* Sign-up panel: a full tangerine block, printed in ink. */
.am-cta-section { padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.am-cta-panel {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 2rem 3.5rem;
	align-items: center;
	padding: clamp(2rem, 5vw, 3.75rem);
	border-radius: var(--am-radius);
	background: var(--am-primary);
	color: var(--am-ink);
	border: 2px solid var(--am-ink);
	box-shadow: 10px 10px 0 var(--am-ink);
}
.am-cta-panel::after {
	content: "";
	position: absolute;
	right: -3rem; top: -3rem;
	width: 12rem; height: 12rem;
	border-radius: 50%;
	border: 2px solid var(--am-ink);
	opacity: .25;
	pointer-events: none;
}
.am-cta-panel h2 { color: var(--am-ink); font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 900; letter-spacing: -.04em; line-height: .95; }
.am-cta-panel p { color: var(--am-ink); font-size: 1.08rem; opacity: .85; }
.am-cta-panel .am-kicker { color: var(--am-ink); }
.am-cta-panel .am-kicker::before { background: var(--am-ink); }
.am-cta-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1.5px solid var(--am-ink); counter-reset: am-benefit; }
.am-cta-benefits li {
	counter-increment: am-benefit;
	display: flex;
	align-items: center;
	gap: .85rem;
	padding: .95rem 0;
	border-bottom: 1.5px solid var(--am-ink);
	color: var(--am-ink);
	font-weight: 700;
	font-size: 1rem;
}
.am-cta-benefits li::before { content: counter(am-benefit, decimal-leading-zero); font-family: var(--am-font-mono); font-size: .74rem; }
.am-cta-benefits li span { font-size: 1.1rem; }

/* FAQ section layout */
.am-faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3.5rem; align-items: start; }
.am-faq-layout .am-section-header { text-align: left; margin: 0; position: sticky; top: calc(var(--am-header-h) + 1.5rem); }

@media (max-width: 1024px) {
	.am-hero-grid { grid-template-columns: 1fr; }
	.am-hero-side { max-width: 680px; }
	.am-directory-group { grid-template-columns: 1fr; gap: 1rem; }
	.am-directory-head { flex-direction: row; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
	.am-directory-head p { flex-basis: 100%; max-width: none; }
}
@media (max-width: 760px) {
	.am-directory-list { grid-template-columns: 1fr; }
	.am-cta-panel { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--am-ink); }
	.am-faq-layout { grid-template-columns: 1fr; gap: 1.5rem; }
	.am-faq-layout .am-section-header { position: static; }
	.am-stats-bar { grid-template-columns: 1fr 1fr; }
	.am-stats-bar > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--am-border); }
	.am-stats-bar > div:nth-child(4) { border-top: 1px solid var(--am-border); }
}
@media (max-width: 520px) {
	.am-finder .am-btn { flex: 1 1 100%; }
	.am-hero-title { font-size: clamp(2.6rem, 13vw, 3.4rem); }
}

/* =========================================================
   8. Cards: services, listings, updates
   Outlined paper cards; on hover they lift off the page onto a hard
   print shadow.
   ========================================================= */
.am-card {
	position: relative;
	background: var(--am-surface);
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	overflow: hidden;
	box-shadow: none;
	transition: box-shadow .2s ease, transform .2s ease;
}
.am-card:hover { box-shadow: var(--am-shadow-md); transform: translate(-3px, -3px); }
.am-card-img { display: block; aspect-ratio: 4/3; background: var(--am-bg-soft); overflow: hidden; border-bottom: 1.5px solid var(--am-border-strong); }
.am-card-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.02); transition: transform .5s ease, filter .3s ease; }
.am-card:hover .am-card-img img { transform: scale(1.04); filter: none; }
.am-card-body { padding: 1.15rem 1.25rem 1.4rem; }
.am-card-body h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.am-card-body h3 a, .am-update-card h3 a { color: var(--am-text); text-decoration: none; }
.am-card-body h3 a:hover, .am-update-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--am-primary); text-decoration-thickness: 2px; }
.am-card-meta { color: var(--am-text-muted); font-family: var(--am-font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .6rem; }
.am-card-price { font-family: var(--am-font-display); font-weight: 900; color: var(--am-text); font-size: 1.4rem; letter-spacing: -.02em; }
.am-card-price::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .5rem; background: var(--am-primary); vertical-align: middle; }
.am-update-card { padding: 1.35rem 1.4rem 1.5rem; border-top: 6px solid var(--am-primary); }
.am-update-card h3 { font-size: 1.3rem; }
.am-update-card p { color: var(--am-text-muted); margin: 0; }
.am-update-date { font-family: var(--am-font-mono); font-size: .7rem; font-weight: 700; color: var(--am-text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }

.am-service-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .55rem;
	padding: 1.4rem 1.3rem 1.3rem;
	background: var(--am-surface);
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	box-shadow: none;
	transition: box-shadow .2s ease, transform .2s ease;
}
.am-service-card:hover { box-shadow: 4px 4px 0 var(--am-cat); transform: translate(-2px, -2px); }
.am-service-icon {
	width: 50px; height: 50px;
	border-radius: var(--am-radius-sm);
	display: flex; align-items: center; justify-content: center;
	font-size: 1.5rem;
	background: var(--am-cat-soft);
	border: 1.5px solid var(--am-border-strong);
}
.am-service-card h3 { font-size: 1.25rem; line-height: 1.2; min-height: calc(1.2em * 2); margin: 0; }
.am-service-card p { color: var(--am-text-muted); font-size: .92rem; margin: 0; flex-grow: 1; }
.am-service-card .am-btn { align-self: flex-start; margin-top: .4rem; position: relative; z-index: 2; }
.am-service-status {
	position: absolute;
	top: 1.1rem; right: 1.1rem;
	z-index: 2;
	font-family: var(--am-font-mono);
	font-size: .62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	padding: .2rem .5rem;
	border: 1px solid currentColor;
	border-radius: 2px;
}
.am-service-status.live { background: var(--am-success-bg); color: var(--am-success-text); }
.am-service-status.coming-soon { background: var(--am-warn-bg); color: var(--am-warn-text); }
.am-service-status.hdb { background: var(--am-success-bg); color: var(--am-success-text); }
.am-service-status.other-operator { background: var(--am-bg-soft); color: var(--am-text-muted); }
.am-service-status.ura { background: var(--am-warn-bg); color: var(--am-warn-text); }
.am-service-source { font-family: var(--am-font-mono); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--am-text-muted); }
.am-service-card:hover .am-service-icon { animation: am-wiggle .5s ease; }

/* Save / favourite heart */
.am-save-btn {
	position: absolute;
	top: .8rem; right: .8rem;
	width: 34px; height: 34px;
	border-radius: var(--am-radius-sm);
	background: var(--am-surface-raised);
	border: 1.5px solid var(--am-border-strong);
	display: flex; align-items: center; justify-content: center;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	color: var(--am-primary-dark);
	text-decoration: none;
	transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.am-save-btn:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--am-border-strong); text-decoration: none; color: var(--am-primary-dark); }
.am-save-btn.is-saved { background: var(--am-primary); color: var(--am-on-primary); border-color: var(--am-ink); animation: am-pop .4s ease; }
.am-save-btn.is-loading { opacity: .5; pointer-events: none; }
/* Service cards: heart top-right, the Live / Coming soon pill sits just
   to its left so neither ever covers the icon. */
.am-save-service-btn { top: .9rem; left: auto; right: .9rem; }
.am-service-card:has(.am-save-service-btn) .am-service-status { top: 1.35rem; right: 3.4rem; }
/* =========================================================
   9. Forms, notices, account
   ========================================================= */
.am-form-wrap {
	max-width: 500px;
	margin: 0 auto;
	background: var(--am-surface-raised);
	border: 2px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	padding: 2.4rem 2.1rem;
	box-shadow: var(--am-shadow-lg);
}
.am-form-wrap h1 { font-size: 2.2rem; text-align: center; }
.am-form-wrap > p.am-form-sub { text-align: center; color: var(--am-text-muted); margin-top: 0; margin-bottom: 1.6rem; }
.am-form-wrap .am-btn { width: 100%; }
.am-form-footer { text-align: center; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px dashed var(--am-border); font-size: .92rem; color: var(--am-text-muted); }

.am-field { margin-bottom: 1.15rem; }
.am-field label { display: block; font-family: var(--am-font-mono); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .45rem; }
.am-field input,
.am-field textarea,
.am-field select,
.am-section input[type="text"],
.am-section input[type="email"],
.am-section input[type="search"],
.am-section input[type="date"],
.am-section input[type="month"],
.am-section input[type="number"],
.am-section input[type="tel"],
.am-section select,
.am-section textarea {
	width: 100%;
	padding: .75rem .9rem;
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius-sm);
	font-size: 1rem;
	font-family: inherit;
	background: var(--am-surface-raised);
	color: var(--am-text);
	transition: box-shadow .15s ease, transform .15s ease;
}
.am-field input:focus,
.am-field textarea:focus,
.am-field select:focus,
.am-section input:focus,
.am-section select:focus,
.am-section textarea:focus {
	outline: none;
	box-shadow: 3px 3px 0 var(--am-primary);
	transform: translate(-1px, -1px);
}
.am-section input[type="checkbox"], .am-section input[type="radio"] { width: auto; accent-color: var(--am-primary); }
.am-field-hint { font-size: .8rem; color: var(--am-text-muted); margin-top: .35rem; }

.am-notice { border-radius: var(--am-radius-sm); padding: .95rem 1.1rem; margin-bottom: 1.25rem; font-size: .94rem; border-left-width: 5px !important; }
.am-notice-error { background: var(--am-error-bg); color: var(--am-error-text); border: 1px solid var(--am-error-border); border-left-color: var(--am-error-text); }
.am-notice-success { background: var(--am-success-bg); color: var(--am-success-text); border: 1px solid var(--am-success-border); border-left-color: var(--am-success-text); }
.am-notice-info { background: var(--am-surface); color: var(--am-text); border: 1px solid var(--am-border); border-left-color: var(--am-primary); }

.am-account-badge {
	display: inline-block;
	padding: .2rem .55rem;
	border: 1px solid currentColor;
	border-radius: 2px;
	font-family: var(--am-font-mono);
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.am-account-badge.pending { background: var(--am-warn-bg); color: var(--am-warn-text); }
.am-account-badge.approved { background: var(--am-success-bg); color: var(--am-success-text); }
.am-account-badge.rejected { background: var(--am-error-bg); color: var(--am-error-text); }

.am-waitlist-box {
	background: var(--am-surface);
	border: 1.5px dashed var(--am-border-strong);
	border-radius: var(--am-radius);
	padding: 1.9rem;
	text-align: center;
	max-width: 520px;
	margin: 2rem auto 0;
}
.am-waitlist-box form { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; justify-content: center; }
.am-waitlist-box input[type="email"] { flex: 1 1 220px; width: auto; }
.am-waitlist-form.is-loading { opacity: .6; pointer-events: none; }

/* Plain page / post content: set like a feature article. */
.am-page-content { max-width: 720px; font-size: 1.1rem; line-height: 1.7; }
.am-page-content > * + * { margin-top: 1.1rem; }
.am-page-content > p:first-of-type::first-letter {
	float: left;
	font-family: var(--am-font-display);
	font-weight: 900;
	font-size: 4.2em;
	line-height: .8;
	margin: .08em .1em 0 0;
	color: var(--am-primary);
}
.am-page-content h2 { margin-top: 2.5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.am-page-content img { border-radius: var(--am-radius-sm); border: 1.5px solid var(--am-border-strong); }
.am-page-content blockquote {
	margin: 2rem 0;
	padding: .25rem 0 .25rem 1.4rem;
	border-left: 4px solid var(--am-primary);
	font-family: var(--am-font-display);
	font-size: 1.45rem;
	font-style: italic;
	line-height: 1.35;
	color: var(--am-text);
}

/* Generic tables inside tool pages that don't ship their own styling */
.am-section table:not([class]) { width: 100%; font-size: .94rem; background: var(--am-surface); border: 1.5px solid var(--am-border-strong); }
.am-section table:not([class]) th, .am-section table:not([class]) td { padding: .7rem .9rem; border-bottom: 1px solid var(--am-border); text-align: left; }
.am-section table:not([class]) th { background: var(--am-text); color: var(--am-bg); font-family: var(--am-font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.am-section table:not([class]) tbody tr:nth-child(even) td { background: var(--am-bg-soft); }

/* =========================================================
   10. PSI health-descriptor bands (template-psi.php)
   ========================================================= */
.am-psi-band-label {
	display: inline-block;
	margin-top: .25rem;
	padding: .15rem .5rem;
	border: 1px solid currentColor;
	border-radius: 2px;
	font-family: var(--am-font-mono);
	font-weight: 700;
	font-size: .7rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.am-psi-good .am-psi-band-label { background: var(--am-success-bg); color: var(--am-success-text); }
.am-psi-moderate .am-psi-band-label { background: var(--am-warn-bg); color: var(--am-warn-text); }
.am-psi-unhealthy .am-psi-band-label { background: var(--am-error-bg); color: var(--am-error-text); }
.am-psi-very-unhealthy .am-psi-band-label { background: #f1e6fb; color: #6a1b9a; }
.am-psi-hazardous .am-psi-band-label { background: #7a0c14; color: #fff; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-psi-very-unhealthy .am-psi-band-label { background: #33193f; color: #e0b3f5; }
}
:root[data-theme="dark"] .am-psi-very-unhealthy .am-psi-band-label { background: #33193f; color: #e0b3f5; }

/* =========================================================
   11. Kampung Town Compass (shortcode; no longer on the homepage,
       kept styled for any page it's placed on)
   ========================================================= */
.am-compass { background: var(--am-surface); border: 1.5px solid var(--am-border-strong); border-radius: var(--am-radius); padding: 2rem; box-shadow: var(--am-shadow-md); }
.am-compass-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.am-compass-head h3 { margin: 0 0 .25rem; }
.am-compass-head p { margin: 0; color: var(--am-text-muted); max-width: 46ch; }
.am-compass-body { margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: var(--am-bg-soft); border-left: 4px solid var(--am-primary); transition: opacity .15s ease; }
.am-compass-body.is-loading { opacity: .5; }
.am-compass-town { display: inline-block; font-family: var(--am-font-display); font-size: 1.6rem; font-weight: 900; color: var(--am-text); margin-bottom: .35rem; }
.am-compass-fact { margin: 0; }
.am-compass-live { margin: .6rem 0 0; font-size: .9rem; font-weight: 600; color: var(--am-accent-dark); }
.am-compass-picker { display: flex; align-items: center; gap: .6rem; margin-top: 1.25rem; font-size: .9rem; color: var(--am-text-muted); }
.am-compass-picker select { width: auto; padding: .4rem .6rem; }
.am-compass-icon { display: inline-block; animation: am-wiggle 2.5s ease-in-out infinite; }

/* =========================================================
   12. FAQ accordion — ruled list, no boxes.
   ========================================================= */
.am-faq { max-width: 800px; margin: 0 auto; border-top: 1.5px solid var(--am-rule); counter-reset: am-faq; }
.am-faq-item {
	counter-increment: am-faq;
	border: 0;
	border-bottom: 1px solid var(--am-border);
	border-radius: 0;
	background: none;
	margin: 0;
	padding: 0;
	transition: background .15s ease;
}
.am-faq-item:has(.am-faq-question[aria-expanded="true"]) { border-bottom-color: var(--am-rule); }
.am-faq-question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: none;
	border: none;
	text-align: left;
	padding: 1.25rem 0;
	font-family: var(--am-font-display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--am-text);
	cursor: pointer;
}
.am-faq-question::before {
	content: counter(am-faq, decimal-leading-zero);
	font-family: var(--am-font-mono);
	font-size: .72rem;
	font-weight: 700;
	color: var(--am-primary-dark);
	flex-shrink: 0;
	width: 1.8rem;
}
.am-faq-question > :first-child:not(.am-faq-icon) { flex: 1; }
.am-faq-question:hover { color: var(--am-primary-dark); }
.am-faq-icon {
	flex-shrink: 0;
	margin-left: auto;
	width: 30px; height: 30px;
	border: 1.5px solid var(--am-border-strong);
	border-radius: 2px;
	background: transparent;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--am-font);
	font-size: 1.1rem;
	transition: transform .25s ease, background .25s ease, color .25s ease;
}
.am-faq-icon { position: relative; }
/* Open: the square stays square (a rotated outline box reads as a
   diamond); the "+" fades out and a minus is drawn in its place. */
.am-faq-question[aria-expanded="true"] .am-faq-icon { background: var(--am-primary); color: transparent; border-color: var(--am-ink); }
.am-faq-question[aria-expanded="true"] .am-faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--am-on-primary); }
.am-faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.am-faq-answer-inner { overflow: hidden; padding-left: 2.8rem; }
.am-faq-question[aria-expanded="true"] + .am-faq-answer { grid-template-rows: 1fr; }
.am-faq-answer p { margin: 0 0 1.3rem; color: var(--am-text-muted); font-size: 1rem; }

/* =========================================================
   13. Footer — ink page, numbered columns and a giant wordmark.
   ========================================================= */
.am-site-footer {
	position: relative;
	background: var(--am-ink);
	color: #b8ae9c;
	padding: 4.5rem 0 0;
	font-size: .92rem;
	overflow: hidden;
	border-top: 3px double var(--am-ink);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-site-footer { background: #0b0a08; border-top-color: #3a332a; }
}
:root[data-theme="dark"] .am-site-footer { background: #0b0a08; border-top-color: #3a332a; }
.am-site-footer a { color: #efe7d9; text-decoration: none; }
.am-site-footer a:hover { color: var(--am-primary); }
.am-footer-top { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 2.1fr); gap: 3rem; margin-bottom: 3rem; }
.am-footer-logo { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--am-font-display); font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; color: #f5f0e6 !important; margin-bottom: 1rem; }
.am-footer-logo .am-logo-glyph { background: #f5f0e6; color: var(--am-ink); }
.am-footer-logo:hover { text-decoration: none; }
.am-footer-brand p { max-width: 34ch; }
.am-footer-sources { font-family: var(--am-font-mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: #8a8070; }
.am-footer-cta { display: inline-flex; margin-top: .5rem; }
.am-footer-tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: am-foot; }
.am-footer-col { counter-increment: am-foot; }
.am-footer-col-title, .am-site-footer h4 {
	display: flex;
	align-items: baseline;
	gap: .5rem;
	color: #f5f0e6;
	font-family: var(--am-font-display);
	font-size: 1.15rem;
	font-weight: 800;
	margin: 0 0 1rem;
	padding-bottom: .7rem;
	border-bottom: 1.5px solid #f5f0e6;
}
.am-footer-col-title::before { content: counter(am-foot, decimal-leading-zero); font-family: var(--am-font-mono); font-size: .7rem; color: var(--am-primary); }
.am-footer-col ul, .am-footer-grid ul { list-style: none; margin: 0; padding: 0; }
.am-footer-col li + li { margin-top: .1rem; }
.am-footer-tool-tile { display: inline-flex; align-items: center; gap: .5rem; padding: .28rem 0; color: #d6ccba !important; font-size: .9rem; }
.am-footer-tool-tile:hover { color: var(--am-primary) !important; text-decoration: none; }
.am-footer-tool-tile.is-coming-soon { opacity: .55; }
.am-footer-tool-icon { width: 1.3rem; text-align: center; font-size: .95rem; transition: transform .2s ease; }
.am-footer-tool-tile:hover .am-footer-tool-icon { transform: scale(1.2) rotate(-6deg); }
.am-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; padding: 2rem 0; border-top: 1px solid rgba(245,240,230,.14); }
.am-footer-grid li { margin-bottom: .35rem; }
.am-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem 2rem;
	border-top: 1px solid rgba(245,240,230,.14);
	padding: 1.4rem 0;
	font-family: var(--am-font-mono);
	font-size: .7rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #8a8070;
}
/* Giant wordmark bleeding off the bottom of the page. */
.am-footer-wordmark {
	display: block;
	margin: 0 0 -.18em;
	font-family: var(--am-font-display);
	font-weight: 900;
	font-size: clamp(3rem, calc(96vw / (var(--am-wm-len, 8) * .66)), 15rem);
	line-height: .82;
	letter-spacing: -.06em;
	text-transform: uppercase;
	white-space: nowrap;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(245,240,230,.28);
	user-select: none;
	pointer-events: none;
	text-align: center;
}
.am-footer-wordmark span { color: var(--am-primary); -webkit-text-stroke: 0; }
@media (max-width: 900px) {
	.am-footer-top { grid-template-columns: 1fr; gap: 2.25rem; }
}
@media (max-width: 600px) {
	.am-footer-tools-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }
	.am-footer-tools-grid .am-footer-col:first-child { grid-column: 1 / -1; }
}

/* =========================================================
   14. Mobile bottom app-bar (AM_Mobile_Nav)
   z-index stays above Leaflet's controls (1000) on map pages.
   ========================================================= */
.am-mobile-nav {
	display: none;
	position: fixed;
	left: .75rem; right: .75rem;
	bottom: calc(.6rem + env(safe-area-inset-bottom, 0));
	z-index: 1500;
	background: var(--am-surface-raised);
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	box-shadow: var(--am-shadow-md);
	padding: .2rem;
}
.am-mobile-nav-item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .1rem;
	padding: .45rem 0 .35rem;
	border-radius: var(--am-radius-sm);
	color: var(--am-text-muted);
	text-decoration: none;
}
.am-mobile-nav-item:hover { text-decoration: none; color: var(--am-text); }
.am-mobile-nav-icon { font-size: 1.25rem; line-height: 1; }
.am-mobile-nav-label { font-family: var(--am-font-mono); font-size: .58rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.am-mobile-nav-item.is-active { color: var(--am-on-primary); background: var(--am-primary); }
@media (max-width: 780px) {
	.am-mobile-nav { display: flex; }
	body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0)); }
	html.am-nav-open .am-mobile-nav { display: none; }
}

/* =========================================================
   15. Telegram: floating button, right-click popup, homepage showcase
   Telegram's own brand blue is kept for the actual Telegram buttons so
   they always read as "this is Telegram"; everything around them uses
   the editorial ink/paper look.
   ========================================================= */
@keyframes am-fab-bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-8px); }
	60% { transform: translateY(-4px); }
}
@keyframes am-fab-pulse {
	0% { transform: scale(.9); opacity: .55; }
	70%, 100% { transform: scale(1.6); opacity: 0; }
}
.am-telegram-fab {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 1510;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: #229ED9;
	color: #fff;
	padding: .7rem 1.05rem .7rem .75rem;
	border: 1.5px solid var(--am-ink);
	border-radius: var(--am-radius-sm);
	box-shadow: 4px 4px 0 var(--am-ink);
	text-decoration: none;
	font-size: .86rem;
	font-weight: 700;
	line-height: 1;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	animation: am-fab-bounce 2.8s ease-in-out infinite;
}
.am-telegram-fab::before {
	content: '';
	position: absolute;
	left: .75rem;
	top: 50%;
	width: 1.15rem; height: 1.15rem;
	margin-top: -.575rem;
	border-radius: 50%;
	background: #fff;
	opacity: 0;
	pointer-events: none;
	animation: am-fab-pulse 2.8s ease-out infinite;
}
.am-telegram-fab:hover { background: #1e8ec3; color: #fff; text-decoration: none; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--am-ink); animation-play-state: paused; }
.am-telegram-fab:hover::before { animation-play-state: paused; }
.am-telegram-fab-icon { position: relative; display: inline-flex; flex-shrink: 0; }
.am-telegram-fab-icon svg { width: 1.3rem; height: 1.3rem; display: block; }
.am-telegram-fab-label { white-space: nowrap; }
@media (max-width: 780px) {
	.am-telegram-fab { bottom: calc(86px + env(safe-area-inset-bottom, 0)); right: 1rem; }
}
@media (max-width: 400px) {
	.am-telegram-fab { padding: .7rem; }
	.am-telegram-fab-label { display: none; }
}

.am-tg-context-popup {
	position: fixed;
	z-index: 9600;
	width: 270px;
	max-width: calc(100vw - 24px);
	background: var(--am-surface-raised);
	color: var(--am-text);
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	box-shadow: var(--am-shadow-lg);
	padding: 1.15rem 1.2rem 1.2rem;
	text-align: center;
	animation: am-tg-context-popup-in .15s ease-out;
}
@keyframes am-tg-context-popup-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.am-tg-context-popup-close {
	position: absolute; top: .35rem; right: .5rem;
	background: none; border: none;
	font-size: 1.3rem; line-height: 1;
	color: var(--am-text-muted);
	cursor: pointer;
	padding: .2rem .4rem;
}
.am-tg-context-popup-close:hover { color: var(--am-text); }
.am-tg-context-popup-icon { margin-bottom: .5rem; }
.am-tg-context-popup-icon svg { width: 2.4rem; height: 2.4rem; display: inline-block; }
.am-tg-context-popup-text { font-size: .9rem; color: var(--am-text-muted); margin: 0 0 .85rem; }
.am-tg-context-popup-cta { width: 100%; font-size: .88rem; }

/* Homepage Telegram showcase (am_render_telegram_promo_section()) —
   an ink spread with a paper phone. */
.am-tg-promo {
	position: relative;
	overflow: hidden;
	margin: 0 auto;
	max-width: calc(var(--am-max-width) - 3rem);
	border-radius: var(--am-radius);
	background:
		repeating-linear-gradient(90deg, rgba(245,240,230,.04) 0 1px, transparent 1px 64px),
		var(--am-ink);
	color: #f5f0e6;
	border: 2px solid var(--am-ink);
	padding: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 5vw, 3.75rem);
	box-shadow: 10px 10px 0 #229ED9;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-tg-promo { background: repeating-linear-gradient(90deg, rgba(245,240,230,.04) 0 1px, transparent 1px 64px), #0b0a08; border-color: #3a332a; }
}
:root[data-theme="dark"] .am-tg-promo { background: repeating-linear-gradient(90deg, rgba(245,240,230,.04) 0 1px, transparent 1px 64px), #0b0a08; border-color: #3a332a; }
@media (max-width: 1250px) { .am-tg-promo { margin: 0 1.5rem; } }
@media (max-width: 600px) { .am-tg-promo { margin: 0 1rem; box-shadow: 6px 6px 0 #229ED9; } }
.am-tg-promo .am-container { padding: 0; }
.am-tg-promo-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 3rem; flex-wrap: wrap; }
.am-tg-promo-copy { flex: 1 1 360px; min-width: 280px; }
.am-tg-promo-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: #229ED9;
	color: #fff;
	font-family: var(--am-font-mono);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: .35rem .8rem .35rem .5rem;
	border-radius: 2px;
	margin-bottom: 1.25rem;
}
.am-tg-promo-eyebrow svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.am-tg-promo-copy h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 900; letter-spacing: -.035em; margin-bottom: .8rem; color: #f5f0e6; }
.am-tg-promo-copy p { font-size: 1.08rem; color: rgba(245,240,230,.8); max-width: 520px; margin: 0 0 1.5rem; }
.am-tg-promo-icons { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.9rem; }
.am-tg-promo-icon {
	width: 42px; height: 42px;
	border-radius: var(--am-radius-sm);
	display: flex; align-items: center; justify-content: center;
	background: transparent;
	border: 1.5px solid rgba(245,240,230,.4);
	font-size: 1.2rem;
	transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.am-tg-promo-icon:hover { transform: translateY(-4px) rotate(-5deg); background: var(--am-primary); border-color: var(--am-primary); }
.am-tg-promo-cta {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	background: #229ED9;
	color: #fff;
	padding: .9rem 1.6rem;
	border: 1.5px solid #f5f0e6;
	border-radius: var(--am-radius-sm);
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	box-shadow: 4px 4px 0 #f5f0e6;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.am-tg-promo-cta svg { width: 1.4rem; height: 1.4rem; flex-shrink: 0; }
.am-tg-promo-cta:hover { background: #1e8ec3; color: #fff; text-decoration: none; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #f5f0e6; }
.am-tg-promo-mock { flex: 0 0 300px; max-width: 300px; margin: 0 auto; transform: rotate(3deg); }
.am-tg-phone { background: #f5f0e6; border-radius: 26px; padding: 10px; border: 2px solid #f5f0e6; box-shadow: 8px 8px 0 var(--am-primary); }
.am-tg-phone-screen { background: #17212b; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.am-tg-phone-header { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.am-tg-phone-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.am-tg-phone-avatar svg { width: 100%; height: 100%; display: block; }
.am-tg-phone-name { display: block; color: #fff; font-weight: 700; font-size: .9rem; }
.am-tg-phone-status { display: block; color: #6ab3f3; font-size: .72rem; }
.am-tg-phone-body { padding: 1rem .85rem; display: flex; flex-direction: column; gap: .55rem; }
.am-tg-bubble { max-width: 84%; padding: .55rem .8rem; border-radius: 14px; font-size: .82rem; line-height: 1.35; }
.am-tg-bubble-user { align-self: flex-end; background: #2b5278; color: #fff; border-bottom-right-radius: 4px; }
.am-tg-bubble-bot { align-self: flex-start; background: #212d3b; color: #e3e8ee; border-bottom-left-radius: 4px; }
.am-tg-bubble-typing { align-self: flex-start; background: #212d3b; display: inline-flex; gap: .28rem; padding: .6rem .9rem; border-radius: 14px; border-bottom-left-radius: 4px; }
.am-tg-bubble-typing span { width: 6px; height: 6px; border-radius: 50%; background: #7c8b9a; animation: am-tg-typing 1.2s infinite ease-in-out; }
.am-tg-bubble-typing span:nth-child(2) { animation-delay: .15s; }
.am-tg-bubble-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes am-tg-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.am-tg-promo-mock-caption { text-align: center; font-family: var(--am-font-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin: 1rem 0 0; }
@media (max-width: 900px) {
	.am-tg-promo-inner { flex-direction: column; text-align: center; }
	.am-tg-promo-icons { justify-content: center; }
	.am-tg-promo-copy p { margin-left: auto; margin-right: auto; }
	.am-tg-promo-mock { transform: none; }
}

/* =========================================================
   16. Motion
   ========================================================= */
@keyframes am-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes am-wiggle {
	0%, 100% { transform: rotate(0deg); }
	20% { transform: rotate(-12deg); }
	40% { transform: rotate(10deg); }
	60% { transform: rotate(-6deg); }
	80% { transform: rotate(4deg); }
}
@keyframes am-pop { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 60% { transform: scale(.92); } 100% { transform: scale(1); } }
@keyframes am-bounce-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
	.js .am-reveal { opacity: 1; transform: none; }
	.am-live-dot::after { display: none; }
	/* The ticker becomes a plain horizontally scrollable strip. */
	.am-ticker { overflow-x: auto; }
	.am-ticker-track { animation: none; padding-left: 7rem; }
	.am-ticker-list[aria-hidden="true"] { display: none; }
}

/* =========================================================
   17. WordPress core bits
   ========================================================= */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-family: var(--am-font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--am-text-muted); margin-top: .5rem; }
.sticky, .bypostauthor, .gallery-caption { outline: 0; }

/* =========================================================
   18. Services hub, content pages, auth pages, 404
   ========================================================= */
[hidden] { display: none !important; }

.am-finder--compact { margin-top: 1.5rem; max-width: 560px; padding: .3rem .3rem .3rem 1rem; box-shadow: 3px 3px 0 var(--am-border-strong); }
.am-finder--compact input { padding: .6rem .25rem; }

.am-services-hub { display: flex; flex-direction: column; gap: 3.5rem; counter-reset: am-hub; }
.am-services-group { counter-increment: am-hub; }
.am-services-group-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1.5px solid var(--am-rule); }
.am-services-group-head::before {
	content: counter(am-hub, decimal-leading-zero);
	font-family: var(--am-font-display);
	font-size: 3rem;
	font-weight: 900;
	line-height: .9;
	letter-spacing: -.05em;
	color: var(--am-cat);
}
.am-services-group-head h2 { font-size: 1.9rem; margin: 0; }
.am-services-group-head p { margin: 0; color: var(--am-text-muted); font-size: .94rem; }
.am-services-group .am-service-card { border-top: 6px solid var(--am-cat); }
.am-service-detail { max-width: 660px; }
.am-service-detail > p:first-child { font-size: 1.1rem; }

.am-page-hero-inner > p:not([class]) a,
.am-page-hero-back a { font-weight: 700; }
.am-page-hero-back { margin: 1rem 0 0; font-family: var(--am-font-mono); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
.am-page-hero .hdb-town-back { background: var(--am-surface); }
.am-listing-price { font-family: var(--am-font-display); font-weight: 900; font-size: 2rem; letter-spacing: -.02em; margin: .75rem 0 0; }
.am-feature-image { margin: 0 0 2.25rem; border-radius: var(--am-radius); overflow: hidden; border: 1.5px solid var(--am-border-strong); box-shadow: var(--am-shadow-md); }
.am-feature-image img { width: 100%; }
.am-article-source { margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1.5px solid var(--am-rule); font-family: var(--am-font-mono); font-size: .78rem; letter-spacing: .03em; }
.am-update-card-img { border-radius: var(--am-radius-sm); overflow: hidden; margin-bottom: .9rem; border: 1.5px solid var(--am-border-strong); }
.nav-links, .pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.75rem; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 42px; height: 42px; padding: 0 .8rem;
	border-radius: var(--am-radius-sm);
	border: 1.5px solid var(--am-border-strong);
	color: var(--am-text);
	font-family: var(--am-font-mono);
	font-weight: 700;
	text-decoration: none;
}
.page-numbers.current { background: var(--am-primary); color: var(--am-on-primary); border-color: var(--am-ink); }
a.page-numbers:hover { background: var(--am-text); color: var(--am-bg); text-decoration: none; }

/* Log in / Sign up / My Account / Contact — a card pinned to a ruled
   backdrop, like a form clipped to a notebook page. */
main.am-section:has(> .am-container > .am-form-wrap) {
	min-height: calc(100vh - var(--am-header-h) - 200px);
	background:
		repeating-linear-gradient(0deg, color-mix(in srgb, var(--am-text) 7%, transparent) 0 1px, transparent 1px 32px),
		var(--am-bg-soft);
}
@media (max-width: 520px) { .am-form-wrap { padding: 1.8rem 1.25rem; box-shadow: var(--am-shadow-md); } }

.am-404 { text-align: center; }
.am-404-inner { max-width: 840px; margin: 0 auto; }
.am-404-code {
	font-family: var(--am-font-display);
	font-weight: 900;
	font-size: clamp(6rem, 22vw, 13rem);
	line-height: .85;
	letter-spacing: -.07em;
	margin: 0 0 .75rem;
	color: var(--am-primary);
	-webkit-text-stroke: 2px var(--am-text);
	text-shadow: 8px 8px 0 var(--am-text);
}
.am-404-inner > p:not(.am-404-code):not(.am-404-actions) { color: var(--am-text-muted); font-size: 1.1rem; }
.am-404-tools { text-align: left; margin: 2.25rem 0; }
.am-404-tools .am-tool-link { background: transparent; }
.am-404-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   19. Small-screen refinements
   ========================================================= */
@media (max-width: 600px) {
	.am-hero-board .am-service-card.am-board-card { grid-template-columns: 2.6rem minmax(0, 1fr); }
	.am-hero-board .am-board-card::before { font-size: 2.1rem; }
	.am-hero-board .am-board-card h3 { font-size: 1.15rem; }
	/* The directory lists names only on phones — the summaries made it
	   several screens long. */
	.am-directory .am-tool-link-summary { display: none; }
	.am-directory .am-tool-link { align-items: center; padding: .65rem 0; }
	.am-directory .am-tool-link-icon { width: 32px; height: 32px; }
	.am-section-header--split .am-link-arrow { margin-top: .5rem; }
}

/* Dark mode: plain links use the lighter tangerine for contrast on ink
   (zero-specificity :where() so every component's own link colour wins). */
@media (prefers-color-scheme: dark) {
	:where(:root:not([data-theme="light"])) a:hover { color: var(--am-primary-light); }
}
:where(:root[data-theme="dark"]) a:hover { color: var(--am-primary-light); }
html.am-nav-open .am-telegram-fab { display: none; }

/* =========================================================
   20. Homepage 3D service tour (v2.1.0, restyled in v3.0.0)
   Markup: AM_Service_Tour::render(); 3D: assets/js/tour3d.js.
   Without WebGL/JS it's a plain grid of service cards; tour3d.js adds
   .am-tour--3d once the city is running.
   ========================================================= */
.am-tour { position: relative; padding: clamp(3.5rem, 7vw, 6rem) 0; }
.am-tour-stage, .am-tour-rail { display: none; }
.am-tour-steps {
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}
.am-tour-step--intro, .am-tour-step--outro { grid-column: 1 / -1; }
.am-tour-step--intro .am-tour-card, .am-tour-step--outro .am-tour-card { max-width: 680px; }
.am-tour-card {
	position: relative;
	height: 100%;
	background: var(--am-surface);
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	padding: 1.5rem;
	box-shadow: none;
}
.am-tour-step:not(.am-tour-step--intro):not(.am-tour-step--outro) .am-tour-card { border-top: 6px solid var(--am-cat); }
.am-tour-card h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.04em; line-height: .95; }
.am-tour-card h3 { font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; margin: 0 0 .5rem; }
.am-tour-card > p { color: var(--am-text-muted); }
.am-tour-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.am-tour-card-icon {
	width: 52px; height: 52px;
	border-radius: var(--am-radius-sm);
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 1.55rem;
	background: var(--am-cat-soft);
	border: 1.5px solid var(--am-border-strong);
	box-shadow: 3px 3px 0 var(--am-cat);
}
.am-tour-card-count { font-family: var(--am-font-mono); font-weight: 700; font-size: .78rem; color: var(--am-text-muted); letter-spacing: .08em; }
.am-tour-card-cat { margin: 0 0 .3rem; font-family: var(--am-font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--am-cat) !important; }
.am-tour-card-summary { font-size: 1rem; }
.am-tour-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed var(--am-border); }
.am-tour-card-source { font-family: var(--am-font-mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--am-text-muted); }
.am-tour-outro-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.am-tour-hint { display: none; }

/* ---- 3D mode ---- */
.am-tour--3d { padding: 0; background: var(--am-bg-soft); border-top: 3px double var(--am-rule); border-bottom: 3px double var(--am-rule); }
/* The sticky stage has a -100svh bottom margin (so the steps scroll over
   it), which lets its box hang one viewport past the end of the section
   and paint over whatever comes next. overflow: clip (unlike hidden)
   doesn't create a scroll container, so sticky keeps working while the
   overhang is cut off at the section's edge. */
.am-tour--3d { overflow: clip; }
.am-tour--3d .am-tour-stage {
	display: block;
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	margin-bottom: -100vh;
	margin-bottom: -100svh;
	overflow: hidden;
	z-index: 0;
}
.am-tour-canvas { display: block; width: 100%; height: 100%; }
.am-tour-vignette {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, color-mix(in srgb, var(--am-bg) 72%, transparent) 0%, transparent 46%),
		linear-gradient(180deg, color-mix(in srgb, var(--am-bg-soft) 92%, transparent) 0%, transparent 14%, transparent 86%, color-mix(in srgb, var(--am-bg-soft) 92%, transparent) 100%);
}
.am-tour-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.am-tour-label {
	position: absolute;
	left: 0; top: 0;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .3rem .6rem .3rem .4rem;
	border-radius: 2px;
	background: var(--am-surface-raised);
	border: 1.5px solid var(--am-border-strong);
	font-family: var(--am-font-mono);
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--am-text);
	white-space: nowrap;
	opacity: 0;
	transition: opacity .3s ease, background .3s ease, color .3s ease, padding .3s ease, font-size .3s ease, box-shadow .3s ease;
	will-change: transform;
}
.am-tour-label::after {
	content: "";
	position: absolute;
	left: 50%; bottom: -8px;
	width: 1.5px; height: 7px;
	margin-left: -.75px;
	background: var(--am-border-strong);
}
.am-tour-label-icon { font-size: .95rem; line-height: 1; }
.am-tour-label.is-active {
	background: var(--am-cat);
	border-color: var(--am-ink);
	color: #fff;
	font-size: .8rem;
	padding: .45rem .85rem .45rem .55rem;
	box-shadow: 3px 3px 0 var(--am-ink);
}

.am-tour--3d .am-tour-steps {
	position: relative;
	z-index: 2;
	display: block;
	max-width: none;
	padding: 0;
}
.am-tour--3d .am-tour-step {
	min-height: 92vh;
	min-height: 92svh;
	display: flex;
	align-items: center;
	padding: 6rem max(1.5rem, calc(50vw - var(--am-max-width) / 2 + 1.5rem));
	pointer-events: none;
}
.am-tour--3d .am-tour-step:first-child { min-height: 100vh; min-height: 100svh; }
.am-tour--3d .am-tour-card {
	pointer-events: auto;
	width: min(440px, 100%);
	height: auto;
	background: var(--am-glass);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: var(--am-shadow-lg);
	padding: 1.65rem;
	opacity: .15;
	transform: translateY(24px);
	transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.am-tour--3d .am-tour-step.is-active .am-tour-card { opacity: 1; transform: none; }
.am-tour--3d .am-tour-step--intro .am-tour-card,
.am-tour--3d .am-tour-step--outro .am-tour-card { width: min(580px, 100%); }
.am-tour--3d .am-tour-hint {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	margin: .5rem 0 0;
	font-family: var(--am-font-mono);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--am-text-muted);
}
.am-tour-mouse {
	position: relative;
	width: 20px; height: 30px;
	border: 2px solid currentColor;
	border-radius: 12px;
}
.am-tour-mouse::after {
	content: "";
	position: absolute;
	left: 50%; top: 5px;
	width: 3px; height: 6px;
	margin-left: -1.5px;
	border-radius: 2px;
	background: currentColor;
	animation: am-tour-wheel 1.6s ease-in-out infinite;
}
@keyframes am-tour-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

/* Progress rail: one tick per service, pinned to the right edge. */
.am-tour--3d .am-tour-rail {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 7px;
	position: sticky;
	top: calc(50vh - var(--am-tour-n, 17) * 7px);
	height: 0;
	margin: 0;
	padding: 0 22px 0 0;
	list-style: none;
	z-index: 3;
}
.am-tour-rail button {
	display: block;
	width: 12px; height: 3px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: color-mix(in srgb, var(--am-text) 30%, transparent);
	cursor: pointer;
	transition: width .3s ease, background .3s ease;
}
.am-tour-rail li.is-active button { width: 34px; background: var(--am-cat); }
.am-tour-rail button:hover { background: var(--am-cat); width: 22px; }

@media (max-width: 760px) {
	.am-tour-vignette {
		background: linear-gradient(180deg, color-mix(in srgb, var(--am-bg-soft) 88%, transparent) 0%, transparent 18%, transparent 55%, color-mix(in srgb, var(--am-bg) 78%, transparent) 100%);
	}
	.am-tour--3d .am-tour-step { align-items: flex-end; padding: 4rem 1rem calc(96px + env(safe-area-inset-bottom, 0)); min-height: 88svh; }
	.am-tour--3d .am-tour-step--intro { align-items: flex-end; }
	.am-tour--3d .am-tour-card { width: 100%; padding: 1.25rem; box-shadow: var(--am-shadow-md); }
	.am-tour--3d .am-tour-card h3 { font-size: 1.3rem; }
	.am-tour--3d .am-tour-card-summary { font-size: .92rem; margin-bottom: 0; }
	.am-tour--3d .am-tour-card-icon { width: 44px; height: 44px; font-size: 1.3rem; }
	.am-tour--3d .am-tour-rail { display: none; }
	.am-tour-label { font-size: .6rem; }
	.am-tour-label:not(.is-active) .am-tour-label-name { display: none; }
}
