/* =============================================================================
   ArneIron — design system stylesheet (assets/css/ds.css)
   =============================================================================
   The single source of truth for rendered component CSS. Mobile-first. Locks
   onto the `theme.json` presets via the `var(--wp--preset--*)` cascade so a
   restyle re-points a preset, never refactors markup.

   Budget (perf skill): ≤ 14 KB gzipped. Mobile-first. No web fonts.
   ========================================================================== */

/* ---- 1. Token convenience aliases ------------------------------------------ */

/*  STYLE-VARIATION CONTRACT — read before changing a line in this block.
 *
 *  theme.json declares TWO colour families:
 *
 *    A "ink/bg"       bg ink ink-2 ink-3 accent-strong on-accent link
 *                     link-hover success warning danger
 *    B "base/contrast" base base-2 surface-3 border-strong muted subtle
 *                     contrast contrast-2 accent-contrast on-surface
 *    shared           surface surface-2 border accent
 *
 *  Every style variation in styles/ overrides family B (that is the WordPress
 *  convention the variation format is built around). Family A slugs stay at
 *  their theme.json defaults under EVERY variation, because a variation palette
 *  is applied at the *user* origin and WordPress still emits the theme-origin
 *  presets alongside it — so `var(--wp--preset--color--ink, <fallback>)` can
 *  never fall back: the slug is always defined, just never re-pointed.
 *
 *  Aliasing block CSS to family A therefore produced a HALF restyle: the three
 *  shared slugs followed the variation (frames/borders went dark under Amber)
 *  while every text colour stayed light-theme near-black. Measured on the
 *  gallery block: caption-on-surface contrast fell 4.51 -> 3.86 (WCAG AA fail)
 *  the moment Amber Terminal was selected.
 *
 *  Fix: alias to family B wherever the theme.json DEFAULTS are byte-identical,
 *  so the default look is pixel-unchanged and every variation now reaches the
 *  blocks:
 *
 *      bg -> base            (#ffffff == #ffffff)
 *      ink -> contrast       (#14181f == #14181f)
 *      ink-3 -> subtle       (#6b7280 == #6b7280)
 *      on-accent -> accent-contrast (#ffffff == #ffffff)
 *
 *  Slugs with no exact family-B counterpart (ink-2, accent-strong, link,
 *  link-hover) keep their family-A name and are instead DECLARED BY EVERY
 *  VARIATION — see styles/*.json. tools/lint-block-tokens.php enforces that:
 *  any token a block stylesheet uses must be overridden by every variation.
 *
 *  success/warning/danger are deliberately NOT variation-scoped: they are
 *  semantic status colours and are meant to read the same in every skin.
 */
:root {
	--c-bg:            var(--wp--preset--color--base);
	--c-surface:       var(--wp--preset--color--surface);
	--c-surface-2:     var(--wp--preset--color--surface-2);
	--c-border:        var(--wp--preset--color--border);
	--c-ink:           var(--wp--preset--color--contrast);
	--c-ink-2:         var(--wp--preset--color--ink-2);
	--c-ink-3:         var(--wp--preset--color--subtle);
	--c-accent:        var(--wp--preset--color--accent);
	--c-accent-strong: var(--wp--preset--color--accent-strong);
	--c-on-accent:     var(--wp--preset--color--accent-contrast);
	--c-link:          var(--wp--preset--color--link);
	--c-link-hover:    var(--wp--preset--color--link-hover);
	--c-success:       var(--wp--preset--color--success);
	--c-warning:       var(--wp--preset--color--warning);
	--c-danger:        var(--wp--preset--color--danger);

	--r-sm:     var(--wp--custom--radius--sm);
	--r-md:     var(--wp--custom--radius--md);
	--r-lg:     var(--wp--custom--radius--lg);

	--shadow-sm: var(--wp--custom--shadow--sm);
	--shadow-md: var(--wp--custom--shadow--md);
	--shadow-lg: var(--wp--custom--shadow--lg);

	--space: var(--wp--preset--spacing);
	--space-0: var(--wp--preset--spacing--0);
	--space-1: var(--wp--preset--spacing--1);
	--space-2: var(--wp--preset--spacing--2);
	--space-3: var(--wp--preset--spacing--3);
	--space-4: var(--wp--preset--spacing--4);
	--space-5: var(--wp--preset--spacing--5);
	--space-6: var(--wp--preset--spacing--6);
	--space-7: var(--wp--preset--spacing--7);
	--space-8: var(--wp--preset--spacing--8);
	--space-9: var(--wp--preset--spacing--9);
	--space-10: var(--wp--preset--spacing--10);

	/* WordPress normalizes numeric font slugs to 2-xl/3-xl in CSS output.
	   Keep the contract names usable for theme.json styles and local CSS. */
	--wp--preset--font-size--2xl: var(--wp--preset--font-size--2-xl);
	--wp--preset--font-size--3xl: var(--wp--preset--font-size--3-xl);

	--page-pad: var(--wp--custom--page--pad);
	--section-rhythm: var(--wp--custom--section--rhythm);

	/* ---- Composition seam for bundled ArneIron plugins (wp task 2) --------
	   The connector chat widget (arncon-chat.css) and the portal panels
	   (portal.css) alias a second, CRT-era token family (--c-signal,
	   --c-panel, --c-blood, …) "with safe fallbacks" — hardcoded ArneIron
	   signal-red / blood-black values. Base ds.css never defined those slugs,
	   so the widgets half-inherited the live palette (--c-ink resolved to the
	   theme ink) and half fell back to the red-CRT brand: a grey/white site
	   with a glossy red chat FAB and dark-red dialog surfaces — the exact
	   style mixing wp task 2 removes. Defining the whole family here, mapped
	   onto the theme's own presets, makes every consumer compose with the
	   ACTIVE token system (base or any style variation) instead of falling
	   back to a second palette. */
	--c-base:          var(--wp--preset--color--bg);
	--c-panel:         var(--wp--preset--color--surface);
	--c-panel-2:       var(--wp--preset--color--surface-2);
	--c-panel-3:       var(--wp--preset--color--surface-3);
	--c-well:          var(--wp--preset--color--surface-2);
	--c-signal:        var(--wp--preset--color--accent);
	--c-red-deep:      var(--wp--preset--color--accent);
	--c-blood:         var(--wp--preset--color--accent-strong);
	--c-maroon:        var(--wp--preset--color--accent-strong);
	--c-ink-dim:       var(--wp--preset--color--ink-2);
	--c-grid:          var(--wp--preset--color--border);
	--c-hair:          var(--wp--preset--color--border);
	--glow-red:        color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	--glow-red-soft:   color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent);
	--sh-block:        var(--wp--custom--shadow--md);
}

/* ---- 2. Reset essentials --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, picture, svg, video, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--c-link); }
a:hover { color: var(--c-link-hover); }

/* Single visible focus ring everywhere (keyboard-focus skill, WCAG 2.4.7). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--c-accent-strong);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Respect reduced motion globally (accessibility skill). */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---- 3. Skip link ---------------------------------------------------------- */
.skip-link:not(:focus):not(:active) {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}
.skip-link:focus,
.skip-link:active {
	position: fixed;
	top: var(--space-3);
	left: var(--space-3);
	z-index: 1000;
	background: var(--c-accent-strong);
	color: var(--c-on-accent);
	padding: var(--space-3) var(--space-5);
	border-radius: var(--r-md);
}

/* ---- 4. Layout primitives -------------------------------------------------- */
.site-main,
.site-header,
.site-footer {
	width: min(100% - 2 * var(--page-pad), var(--wp--style--global--wide-size, 1280px));
	margin-inline: auto;
}
.site-main { padding-block: var(--space-6); }

.wp-block-post-content {
	max-width: var(--wp--style--global--content-size, 768px);
	margin-inline: auto;
}
.wp-block-post-content > * {
	margin-block-start: var(--space-6);
	margin-block-end: 0;
}
.wp-block-post-content > :first-child { margin-block-start: 0; }
.wp-block-post-content :where(h1, h2, h3, h4, h5, h6) {
	color: var(--c-ink);
	margin-block-end: 0;
}

/*
 * hub#1687 — the design-system heading type scale is DEFERENTIAL.
 *
 * A rule inside a cascade layer always loses to an unlayered rule, whatever the
 * specificity. WordPress emits theme.json / Style-Variation typography
 * unlayered (`global-styles-inline-css`), so putting the DS type scale in the
 * `arneiron-ds` layer means: a tenant whose variation pins h1-h6 to its own
 * display face keeps that face, and a site whose variation says
 * nothing about headings still gets this scale. Before this,
 * `.wp-block-post-content :where(h1..h6)` at specificity (0,1,0) beat the bare
 * `h1, h2, ...` selectors WordPress emits and silently repainted the tenant's
 * headings in the UI font.
 *
 * Colour and margins stay unlayered above: they are structural, and no global-
 * styles output competes for them.
 */
@layer arneiron-ds {
	.wp-block-post-content :where(h1, h2, h3, h4, h5, h6) {
		font-family: var(--wp--preset--font-family--ui);
		font-weight: 700;
	}
	.wp-block-post-content h1 {
		font-size: var(--wp--preset--font-size--3-xl);
		line-height: 1.1;
	}
	.wp-block-post-content h2 {
		font-size: var(--wp--preset--font-size--2-xl);
		line-height: 1.15;
	}
	.wp-block-post-content h3 {
		font-size: var(--wp--preset--font-size--xl);
		line-height: 1.15;
	}
	.wp-block-post-content h4 {
		font-size: var(--wp--preset--font-size--lg);
		font-weight: 650;
		line-height: 1.2;
	}
	.wp-block-post-content h5 {
		font-size: var(--wp--preset--font-size--base);
		font-weight: 650;
		line-height: 1.3;
	}
	.wp-block-post-content h6 {
		font-size: var(--wp--preset--font-size--sm);
		font-weight: 650;
		line-height: 1.3;
	}
}
.wp-block-post-content > h1,
.wp-block-post-content > h2,
.wp-block-post-content > h3,
.wp-block-post-content > h4 {
	margin-block-start: var(--space-8);
}
.wp-block-post-content > h1 + *,
.wp-block-post-content > h2 + *,
.wp-block-post-content > h3 + *,
.wp-block-post-content > h4 + *,
.wp-block-post-content > h5 + *,
.wp-block-post-content > h6 + * {
	margin-block-start: var(--space-4);
}
.wp-block-post-content > .wp-block-separator {
	margin-block: var(--space-8);
}
.wp-block-post-content > ul,
.wp-block-post-content > ol {
	padding-inline-start: var(--space-7);
}
.wp-block-post-content li + li { margin-block-start: var(--space-2); }
.wp-block-post-content li > ul,
.wp-block-post-content li > ol { margin-block-start: var(--space-2); }

/* Landing template: no top chrome pad — the hero owns the top fold. The body
   gets full access to alignwide/alignfull sections; the content constrain is
   re-applied inside (per-section) by the blocks/patterns. */
.site-main--landing { padding-block: 0; }
.site-main--landing > .wp-block-post-content { padding-block: var(--section-rhythm, clamp(32px, 4vw, 96px)); }

/* Robust grid that reflows without a media query (grid-spacing skill). */
.features__grid {
	display: grid;
	gap: var(--space-6);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	align-items: stretch;
}

/* ---- 5. Component: card ---------------------------------------------------- */
.card {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: var(--space-6);
	box-shadow: var(--shadow-sm);
}

/* ---- 6. Component: buttons (variants via selector layer) -------------------*/
.wp-block-button__link {
	border-radius: var(--r-md);
	min-height: 44px;          /* WCAG 2.5.5 touch target */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color .15s ease;
}
.wp-block-button__link:hover { text-decoration: none; }

.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1px solid currentColor;
	color: var(--c-accent);
}
.is-style-outline .wp-block-button__link:hover { color: var(--c-accent-strong); }

/* ---- 7. Empty state ------------------------------------------------------- */
.empty {
	border: 1px dashed var(--c-border);
	border-radius: var(--r-md);
	text-align: center;
	color: var(--c-ink-2);
	background: var(--c-surface);
}
.empty .wp-block-heading { color: var(--c-ink); }

/* ---- 8. Query loop / cards block-level polish ----------------------------- */
.query-compact .query-compact__item { display: flex; flex-direction: column; gap: var(--space-3); }
.query-compact__date { color: var(--c-ink-3); }
.query-compact .wp-block-post-featured-image { margin: 0; }
.query-compact .wp-block-post-title { margin: 0; }

/* ---- 9. Forms (front-end rendered ones, e.g. search + comments) ----------- */
input[type="text"], input[type="search"], input[type="email"], input[type="url"],
input[type="password"], input[type="tel"], textarea, select {
	width: 100%;
	min-height: 44px;            /* touch target */
	padding: var(--space-3) var(--space-4);
	font: inherit;
	color: var(--c-ink);
	background: var(--c-bg);
	border: 1px solid var(--c-border);
	border-radius: var(--r-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
	border-color: var(--c-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 25%, transparent);
}

/* ---- 10. Pagination ------------------------------------------------------- */
.wp-block-query-pagination { gap: var(--space-3); }
.wp-block-query-pagination a, .wp-block-query-pagination span {
	min-width: 44px; min-height: 44px; display: inline-grid; place-items: center;
	border-radius: var(--r-sm);
}
.wp-block-query-pagination .current { background: var(--c-accent); color: var(--c-on-accent); }

/* ---- 11. Hero ------------------------------------------------------------- */
.hero__inner { display: flex; flex-direction: column; gap: var(--space-4); align-items: center; }

/* ---- 12. Tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th {
	background: var(--c-surface);
	text-align: start;
	padding: var(--space-3) var(--space-4);
	font-weight: 650;
}
.wp-block-table td {
	padding: var(--space-3) var(--space-4);
	border-top: 1px solid var(--c-border);
}
.wp-block-table figcaption {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--c-ink-3);
	margin-top: var(--space-3);
}

/* ---- 13. Sidebar ---------------------------------------------------------- */
.site-sidebar { padding-block: var(--space-6); }

/* ---- 14. Prose atoms + quote polish (DisArnie audit high/med) ----------- */
/* Bring the prose atoms onto the grey ramp so they stop reading as browser
   defaults. Resolves DisArnie audit #2 (mark), #3 (code/kbd), #4 (quote/pullquote). */

mark {
	background: var(--c-surface-2);
	color: var(--c-ink);
	padding: 0 .15em;
	border-radius: var(--r-sm);
}

code, kbd {
	font-family: var(--wp--preset--font-family--ui);
	background: var(--c-surface);
	padding: .1em .35em;
	border-radius: var(--r-sm);
	border: 1px solid var(--c-border);
	font-size: .9em;
}
kbd { font-weight: 600; }

/* <code> inside <pre> keeps the code-block appearance (no inline chrome). */
pre code, pre kbd {
	background: none; border: 0; padding: 0; font-size: inherit;
}
/* R2-3: pull <pre.wp-block-code> + preformatted + verse onto the grey ramp as one
   deliberate 'code surface' (no hue). Satisfies concept.md §4 + decision #5. */
pre.wp-block-code,
pre.wp-block-preformatted,
pre.wp-block-verse {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: var(--space-4) var(--space-5);
	overflow-x: auto;
	font-family: var(--wp--preset--font-family--ui);
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.5;
	color: var(--c-ink-2);
}

/* R2-1 fix: scope blockquote so the pullquote's nested <blockquote> doesn't
   inherit the standalone-quote border. Concept.md §4 single-treatment. */
blockquote:not(.wp-block-pullquote blockquote):not(figcaption) {
	margin-inline: 0;
	padding-inline: var(--space-5);
	border-inline-start: 3px solid var(--c-border);
	color: var(--c-ink-2);
}
/* R2-2 durability: scope the cite the same way so the pullquote-cite override at
   the rule below wins cleanly by source order, not by specificity tie. */
blockquote:not(.wp-block-pullquote blockquote) cite {
	display: block;
	margin-top: var(--space-3);
	font-size: var(--wp--preset--font-size--sm);
	color: var(--c-ink-3);
}

.wp-block-pullquote {
	border-top: 2px solid var(--c-border);
	border-bottom: 2px solid var(--c-border);
	padding-block: var(--space-6);
	margin-block: var(--space-7);
	text-align: center;
}
/* R2-1: reset the nested quote so it has no doubled border, no inner padding,
   and full ink color (the pullquote band is the only treatment). */
figure.wp-block-pullquote blockquote {
	border: 0;
	margin-inline: 0;
	padding-inline: 0;
	color: var(--c-ink);
}
.wp-block-pullquote cite,
.wp-block-pullquote .wp-block-pullquote__citation {
	display: block;
	margin-top: var(--space-3);
	font-size: var(--wp--preset--font-size--sm);
	color: var(--c-ink-3);
}

/* Gallery placeholder fallback (DisArnie audit #5): when a gallery has no
   real media, the tiles should render as deliberate grey 4:3 boxes per §5,
   not as a zero-height invisible frame. */
figure.wp-block-image:has(> div[role="img"].image-placeholder) {
	margin: 0;
}
.image-placeholder {
	background: var(--c-surface-2);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	display: grid;
	place-items: center;
	color: var(--c-ink-3);
}
.image-placeholder::after {
	content: "4:3";
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
}

/* Latest-posts excerpt drops one step in hierarchy (DisArnie audit #11 polish). */
.wp-block-latest-posts__post-excerpt {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--c-ink-2);
	margin-top: var(--space-2);
}

/* Re-create the gallery grid for the core/html placeholder gallery.
   (DisArnie round-2 — gallery regression fix; §4 grid spec + §5 placeholder spec.) */
figure.wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-4);
}
figure.wp-block-gallery > .wp-block-image { margin: 0; }
@media (max-width: 600px) {
	figure.wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	figure.wp-block-gallery { grid-template-columns: 1fr; }
}

/* R2-8: search input onto the grey ramp (one rule, matches §4 search spec). */
.wp-block-search__input {
	background: var(--c-bg);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	padding: var(--space-3) var(--space-4);
}
.wp-block-search__button {
	border-radius: var(--r-md);
}

/* R2-9: real disabled-button state for the reference page. Convention:
   component-design.md 'rest/hover/focus-visible/active/disabled' — the disabled
   state must be visible, not just described. */
.wp-block-button .wp-element-button[aria-disabled="true"],
.wp-block-button .wp-element-button.is-disabled,
.wp-block-button .wp-element-button:disabled {
	color: var(--c-ink-3) !important;
	background-color: var(--c-surface-2) !important;
	border-color: var(--c-border) !important;
	cursor: not-allowed;
	opacity: .65;
	text-decoration: none;
	pointer-events: none;
}

/* ---- 14b. Mobile header bar (PB-B5 / §10.5) -------------------------------
   One-row chrome shown below desktop headers on mobile breakpoints only.
   Layout (left -> right): [LOGO] ............ [balance] [account] [cart] [☰]
   The right cluster orders icons so when read right-to-left you get
   hamburger -> cart -> my-account -> balance (UX spec).
   Progressive enhancement: the bar is server-rendered always; CSS hides it on
   desktop and hides desktop headers on mobile (so no parity gap with JS off).
   ------------------------------------------------------------------------ */

/* Default: desktop headers visible, mobile bar hidden. */
.header-mobile.arneiron-mobile-bar { display: none; }

/* On small screens: swap. Breakpoint matches core's default 782 navigation. */
@media (max-width: 782px) {
	/* Hide the desktop header's own chrome (we replace it wholesale). */
	.site-header:not(.header-mobile) {
		display: none !important;
	}
	/* Show the mobile bar. */
	.header-mobile.arneiron-mobile-bar {
		display: block;
	}
	/* Keep it sticky at the top. */
	.header-mobile.arneiron-mobile-bar {
		position: sticky;
		top: 0;
		z-index: 50;
	}
	/* Row: space-between so logo sticks left, icons stick right. */
	.arneiron-mobile-bar__row {
		width: 100%;
		align-items: center;
	}
	/* Right cluster: reversed flex so the LAST child in DOM (hamburger) sits
	   rightmost; reading R->L: hamburger, cart, account, balance. The icons
	   itself wraps each chip; gap keeps them tidy. */
	.arneiron-mobile-bar__icons {
		gap: var(--space-2, 8px);
	}
	.no-js .arneiron-mobile-bar__icons-inner { display: contents; }
}

/* Component: wallet chip (from [arneiron_balance_seam]). */
.arneiron-wallet-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border-radius: var(--r-md);
	background: var(--c-surface-2);
	color: var(--c-ink);
	text-decoration: none;
	font-size: 0.85em;
	line-height: 1;
}
.arneiron-wallet-chip__label { color: var(--c-ink-2); font-size: 0.85em; }
.arneiron-wallet-chip__value { font-weight: 600; }
.arneiron-wallet-chip .woocommerce-Price-amount { font-size: 0.9em; }

/* Component: my-account toggle + dropdown. */
.arneiron-account-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--r-md);
	background: transparent;
	color: var(--c-ink);
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	font-size: 1.1em;
}
.arneiron-account-toggle:hover,
.arneiron-account-toggle[aria-expanded="true"] {
	background: var(--c-surface-2);
	border-color: var(--c-border);
}
.arneiron-account-toggle__screen { /* vis: a way to also show the word if needed */ }
.arneiron-account-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	list-style: none;
	margin: 0;
	padding: var(--space-2, 8px);
	background: var(--c-bg);
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	min-width: 200px;
	z-index: 60;
}
.arneiron-account-menu[hidden],
.arneiron-account-menu[aria-hidden="true"] { display: none; }
.arneiron-account-menu__item { margin: 0; }
.arneiron-account-menu__link {
	display: block;
	padding: 6px 10px;
	color: var(--c-ink);
	text-decoration: none;
	border-radius: var(--r-sm, 4px);
}
.arneiron-account-menu__link:hover {
	background: var(--c-surface-2);
}
.arneiron-account-menu__item--logout .arneiron-account-menu__link {
	color: var(--c-danger, #9a3535);
}
.arneiron-mobile-bar__icons .arneiron-account-toggle,
.arneiron-mobile-bar__icons .arneiron-account-menu {
	position: relative;
}
/* Wrap the my-account icon in a relative wrapper so the absolute menu
   positions against the mobile-bar icons group. */
.arneiron-mobile-bar__icons-inner > .arneiron-account-toggle,
.arneiron-mobile-bar__icons-inner > .arneiron-account-menu {
	position: relative;
}

/* Component: cart chip. */
.arneiron-cart-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px;
	border-radius: var(--r-md);
	background: transparent;
	color: var(--c-ink);
	text-decoration: none;
	line-height: 1;
}
.arneiron-cart-chip:hover { background: var(--c-surface-2); }
.arneiron-cart-chip__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--c-accent, var(--c-ink));
	color: var(--c-on-accent, #fff);
	font-size: 0.75em;
	font-weight: 600;
}
.arneiron-cart-chip__icon,
.arneiron-wallet-chip__icon { font-size: 1.1em; }
.arneiron-cart-chip__total { color: var(--c-ink-2); font-size: 0.85em; }

/* When cart/wallet is empty, hide the empty count so the chip stays tidy. */
.arneiron-cart-chip[data-cart-count="0"] .arneiron-cart-chip__count { display: none; }

/* Hamburger reuse: the theme already styles .nav-toggle; the bar variant uses
   the same .nav-toggle classes so JS hooks (`bindNavDisclosure` in theme.js)
   work without modification. */

/* Account dropdown: hide on outside-click/tap (progressive enhancement).
   Without JS, the menu is still keyboard-reachable via anchor focus. */
.no-js .arneiron-account-menu[hidden] { display: block; }


/* ---- 14c. Mobile drawer (off-canvas) --------------------------------------
   Slides in from the right when the mobile-bar hamburger is tapped. Driven by
   the [data-state] attribute set by theme.js bindMobileMenu(). The drawer
   markup lives in parts/mobile-menu.html.
   ------------------------------------------------------------------------ */

.arneiron-mobile-drawer {
	/* Hidden by default. The drawer uses position: fixed so it never affects
	   desktop layout even when visible — and on desktop it isn't toggled. */
	position: fixed;
	inset: 0;
	z-index: 100;
	pointer-events: none; /* re-enabled below when open */
	visibility: hidden;
}

.arneiron-mobile-drawer[data-state="open"] {
	pointer-events: auto;
	visibility: visible;
}

/* Scrim: click-outside-to-close. */
.arneiron-mobile-drawer__scrim {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba( 10, 13, 18, 0.45 );
	opacity: 0;
	transition: opacity 0.2s ease;
	border: 0;
	padding: 0;
	cursor: default;
}
.arneiron-mobile-drawer[data-state="open"] .arneiron-mobile-drawer__scrim {
	opacity: 1;
}

/* Panel: slides in from the right. */
.arneiron-mobile-drawer__panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 110;
	display: flex;
	flex-direction: column;
	gap: var(--space-4, 16px);
	width: min( 320px, 86vw );
	max-width: 360px;
	padding: var(--space-4, 16px);
	background: var(--c-bg);
	color: var(--c-ink);
	border-left: 1px solid var(--c-border);
	box-shadow: -8px 0 24px rgba( 0, 0, 0, 0.08 );
	transform: translateX( 100% );
	transition: transform 0.22s cubic-bezier( 0.22, 0.61, 0.35, 1 ), opacity 0.22s ease;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.arneiron-mobile-drawer[data-state="open"] .arneiron-mobile-drawer__panel {
	transform: translateX( 0 );
}

/* Panel content ---------------------------------------------------------- */
.mobile-menu-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-2, 8px);
	padding-bottom: var(--space-3, 12px);
	border-bottom: 1px solid var(--c-border);
}
.mobile-menu-head .arneiron-site-logo img { max-height: 32px; width: auto; }
.mobile-menu-close {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	background: transparent;
	color: var(--c-ink);
	cursor: pointer;
	font-size: 1.25em;
	line-height: 1;
}
.mobile-menu-close:hover { background: var(--c-surface-2); }

.arneiron-mobile-drawer__divider {
	border: 0;
	border-top: 1px solid var(--c-border);
	margin: 0;
}

/* Server-rendered mobile nav (from [arneiron_mobile_nav]). */
.arneiron-mobile-nav-wrap { display: block; }
.arneiron-mobile-nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.arneiron-mobile-nav .arneiron-mobile-nav { /* nested submenu */
	padding-left: var(--space-3, 12px);
	border-left: 1px solid var(--c-border);
	margin-left: var(--space-2, 8px);
	margin-top: 2px;
}
.arneiron-mobile-nav__item { margin: 0; }
.arneiron-mobile-nav__link {
	display: block;
	padding: var(--space-2, 8px) 0;
	color: var(--c-ink);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid transparent;
}
.arneiron-mobile-nav__link:hover,
.arneiron-mobile-nav__link.is-current {
	color: var(--c-accent, var(--c-ink));
	border-bottom-color: currentColor;
}

/* Social icons inside the drawer. */
.mobile-menu-social { display: block; }
.arneiron-social {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: var(--space-2, 8px);
}
.arneiron-social__item { margin: 0; }
.arneiron-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--c-border);
	border-radius: var(--r-md);
	background: transparent;
	color: var(--c-ink-2);
	text-decoration: none;
}
.arneiron-social__link:hover {
	background: var(--c-surface-2);
	color: var(--c-ink);
}
.arneiron-social__icon {
	font-size: 0;
	width: 16px; height: 16px;
	background-color: currentColor;
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
}
.arneiron-social__link--x .arneiron-social__icon       { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/></svg>"); }
.arneiron-social__link--github .arneiron-social__icon  { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.1.79-.25.79-.56 0-.28-.01-1.02-.02-2-3.2.7-3.88-1.54-3.88-1.54-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.23-1.28-5.23-5.69 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.04 11.04 0 0 1 5.78 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1 0 4.42-2.69 5.39-5.25 5.68.41.36.78 1.07.78 2.15 0 1.55-.01 2.8-.01 3.18 0 .31.21.67.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.1.79-.25.79-.56 0-.28-.01-1.02-.02-2-3.2.7-3.88-1.54-3.88-1.54-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.23-1.28-5.23-5.69 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.04 11.04 0 0 1 5.78 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1 0 4.42-2.69 5.39-5.25 5.68.41.36.78 1.07.78 2.15 0 1.55-.01 2.8-.01 3.18 0 .31.21.67.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5z'/></svg>"); }
.arneiron-social__link--linkedin .arneiron-social__icon { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4.98 3.5C4.98 4.88 3.87 6 2.5 6S0 4.88 0 3.5 1.12 1 2.5 1s2.48 1.12 2.48 2.5zM.04 8h4.92v16H.04V8zm8.06 0h4.71v2.19h.07c.66-1.2 2.27-2.46 4.67-2.46 5 0 5.92 3.29 5.92 7.56V24h-4.92v-7.06c0-1.68-.03-3.85-2.34-3.85-2.34 0-2.7 1.83-2.7 3.72V24H8.1V8z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4.98 3.5C4.98 4.88 3.87 6 2.5 6S0 4.88 0 3.5 1.12 1 2.5 1s2.48 1.12 2.48 2.5zM.04 8h4.92v16H.04V8zm8.06 0h4.71v2.19h.07c.66-1.2 2.27-2.46 4.67-2.46 5 0 5.92 3.29 5.92 7.56V24h-4.92v-7.06c0-1.68-.03-3.85-2.34-3.85-2.34 0-2.7 1.83-2.7 3.72V24H8.1V8z'/></svg>"); }

/* Body-scroll lock when the drawer is open. */
body.mobile-drawer-open { overflow: hidden; }

/* Reduced motion: drop the slide animation. */
@media ( prefers-reduced-motion: reduce ) {
	.arneiron-mobile-drawer,
	.arneiron-mobile-drawer__scrim,
	.arneiron-mobile-drawer__panel {
		transition: none !important;
	}
}

/* Desktop: hide the drawer markup entirely (its parent header-mobile is already
   hidden, but this is a defence-in-depth). */
@media ( min-width: 783px ) {
	.arneiron-mobile-drawer { display: none; }
}

/* ---- 15. Print ----------------------------------------------------------- */
@media print {
	.site-header, .site-footer, .sidebar, .skip-link { display: none !important; }
	body { color: #000; background: #fff; }
	a::after { content: " (" attr(href) ")"; font-size: .9em; color: #444; }
}
