/*
 * account.css — MyAccount shell (sidebar identity + grouped nav + content).
 *
 * Phase 3 F-CSS-015: editorial `--chn-ed-*` sand sub-palette removed from
 * inline <style id="chn-account-editorial-css"> emit in
 * mu-plugins/chn-account-editorial.php and mapped here onto approved
 * `--chn-color-*` + `--chn-font-*` tokens from `tokens.css`. The aliases stay
 * so the 200+ existing `var(--chn-ed-…)` references in the editorial
 * stylesheet keep resolving without touching every selector.
 *
 * Phase B3 (2026-05-20): /my-account/ bg parity + tab refinement.
 *   • Page shell repainted to `--chn-color-surface` (white) so /my-account/
 *     stops dropping onto a cream/sand canvas while every neighbouring route
 *     uses pure white. Identity card + dashboard cards keep their cream
 *     `--chn-color-card` so they still lift off the white shell.
 *   • Editorial grain `::before` overlay removed (was the second half of the
 *     diverged "sand paper" treatment).
 *   • Sidebar nav wrapped as a single bordered panel; group labels rendered
 *     tighter; active item gets a subtle navy tint behind its left-border
 *     accent so the active tab is discoverable at a glance.
 *   • Eyebrow "CARIBBEAN HOME NETWORK" suffix suppressed on page headers.
 *   • Content cap raised from 880 → min(1080px, 100%) so dashboard cards
 *     breathe instead of leaving a third of the viewport empty.
 *   • Mobile nav switched from a 2-col tile grid to a horizontal-scroll pill
 *     row with snap behaviour; 44 px tap target preserved.
 *
 * Specificity note: `chn-account-editorial.php` emits its <style> block at
 * `wp_head` priority 50, AFTER this stylesheet is linked. Where equal
 * specificity exists, the inline block wins → the overrides below use either
 * a slightly deeper selector chain or `!important` (matching the precedent
 * the editorial CSS itself uses).
 *
 * Approved palette source: tokens.css (single source of truth).
 *   --chn-ed-ink        -> --chn-color-primary     (#0b3b94, EXACT)
 *   --chn-ed-ink-deep   -> --chn-color-primary-700 (#082c6f, ~)
 *   --chn-ed-accent     -> --chn-color-accent      (#f3802d, EXACT)
 *   --chn-ed-accent-dim -> --chn-color-accent-700  (#d96812, ~)
 *   --chn-ed-graphite   -> --chn-color-text        (#1d2733, EXACT)
 *   --chn-ed-muted      -> --chn-color-muted       (#5b6772, normalised cool)
 *   --chn-ed-rule       -> --chn-color-border      (#e5e1da)
 *   --chn-ed-rule-soft  -> --chn-color-paper-deep  (#efe7d3, soft warm hairline)
 *   --chn-ed-paper      -> --chn-color-paper       (#f5efe4, EXACT)
 *   --chn-ed-paper-deep -> --chn-color-paper-deep  (#efe7d3, EXACT)
 *   --chn-ed-card       -> --chn-color-card        (#fffdf8, EXACT)
 *   --chn-ed-card-deep  -> --chn-color-card-deep   (#faf5e8, EXACT)
 *   --chn-ed-serif/sans/mono -> --chn-font-serif/sans/mono (EXACT).
 */

body.woocommerce-account,
body.chn-account--loggedout,
body.chn-shell--account {
	--chn-ed-ink:        var(--chn-color-primary);
	--chn-ed-ink-deep:   var(--chn-color-primary-700);
	--chn-ed-accent:     var(--chn-color-accent);
	--chn-ed-accent-dim: var(--chn-color-accent-700);
	--chn-ed-graphite:   var(--chn-color-text);
	--chn-ed-muted:      var(--chn-color-muted);
	--chn-ed-rule:       var(--chn-color-border);
	--chn-ed-rule-soft:  var(--chn-color-paper-deep);
	--chn-ed-paper:      var(--chn-color-paper);
	--chn-ed-paper-deep: var(--chn-color-paper-deep);
	--chn-ed-card:       var(--chn-color-card);
	--chn-ed-card-deep:  var(--chn-color-card-deep);

	--chn-ed-serif: var(--chn-font-serif);
	--chn-ed-sans:  var(--chn-font-sans);
	--chn-ed-mono:  var(--chn-font-mono);
}

body.chn-shell--account { background: var(--chn-color-paper); }

/* ============================================================================
 * Phase B3 overrides — bg parity + tab refinement (logged-in /my-account/)
 * ============================================================================ */

/* B3-1 — page shell on white, matching the rest of the site.
 * The editorial mu-plugin paints `body` AND `main.site-main` + the Elementor
 * section wrappers in sand/paper to stop a "beige strip past the 1240px grid"
 * from showing. Now that the body is white, every wrapper above the WC shell
 * also needs to be white — otherwise the visible content area stays cream. */
html body.woocommerce-account {
	background: var(--chn-color-surface) !important;
}
html body.woocommerce-account main.site-main,
html body.woocommerce-account .elementor-section-wrap,
html body.woocommerce-account .elementor-widget-theme-post-content,
html body.woocommerce-account .elementor-element[data-element_type="section"] {
	background: var(--chn-color-surface) !important;
}
/* Kill the SVG grain overlay emitted by chn-account-editorial.php inline CSS. */
html body.woocommerce-account::before {
	content: none !important;
	background-image: none !important;
	display: none !important;
}

/* B3-2 — let content stretch on wider screens (was capped at 880px). */
html body.woocommerce-account .woocommerce-MyAccount-content {
	max-width: min(1080px, 100%) !important;
}

/* B3-2b / B4W4 — dashboard greeting alignment fix + sidebar unification.
 *
 * History:
 *   B3-2b: identity + nav + content were all direct children of `.woocommerce`
 *   with no explicit grid placement, so auto-placement dropped identity into
 *   row1/col2 and left a 304px empty cell to the left. The fix was explicit
 *   grid-row/grid-column on all three siblings.
 *
 *   B4W4: an inline-JS step in `chn-account-editorial.php` now wraps identity
 *   + nav into a single `<div class="chn-account-sidebar">` so the pair can
 *   share a sticky container and visually merge into one panel. The wrapper
 *   becomes the col-1 grid item; content stays in col 2. The pre-B4W4
 *   per-element grid placements are no longer needed for the wrapped case
 *   but are retained as a no-JS fallback (if the JS fails to run, identity +
 *   nav will still appear in col 1 rows 1+2 the old way). */
/* Sidebar OUTER wrapper occupies col 1; content occupies col 2. The outer
 * wrapper STRETCHES (`align-self: stretch`) so its height = whole grid row
 * height — that gives the inner `position: sticky` panel a tall containing
 * block to travel through, including on short architect pages where the
 * content body is shorter than the inner panel. */
html body.woocommerce-account .woocommerce > .chn-account-sidebar {
	grid-column: 1 !important;
	grid-row: 1 !important;
	align-self: stretch !important;
}
/* The grid row sizes naturally to the taller of (sidebar inner panel) or
 * (content body). The previous `min-height: calc(100vh - 188px)` clamp was
 * added so the sticky inner panel had viewport-tall travel even when content
 * was short — but that left visible empty whitespace below short content on
 * /orders/, /subscriptions/, /downloads/, /my-plans/, /plan-sales/, etc.
 *
 * Sticky still works without the clamp: the inner panel is capped at
 * `max-height: calc(100vh - 64px)` (≤ ~836px on 900h viewport) and its
 * natural height is sidebar identity + nav = ~544px. As long as the grid
 * row ≥ sidebar inner natural height (which it is, because the sidebar
 * wrapper IS one of the row's grid items and contributes its height), the
 * sticky element has its full natural size as containing block. On a short
 * content page the sticky element simply doesn't travel — but there's
 * nothing for the user to scroll past anyway. (Phase B4 R3 cross-cutting fix.)
 *
 * `grid-template-rows: minmax(0,1fr)` keeps the original guarantee of a
 * single grid row so explicit per-item grid-row placements still work. */
html body.woocommerce-account .woocommerce {
	grid-template-rows: minmax(0, 1fr) !important;
}
/* Pre-B4W4 fallbacks if the wrap JS fails to run: keep identity in row 1,
 * nav in row 2 so they at least appear in the sidebar column rather than
 * collapsing into the content column via auto-placement. */
html body.woocommerce-account .woocommerce > .chn-ed-identity {
	grid-column: 1 !important;
	grid-row: 1 !important;
}
html body.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation {
	grid-column: 1 !important;
	grid-row: 2 !important;
}
html body.woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
	grid-column: 2 !important;
	grid-row: 1 !important;
}

/* B4W4 — unified sidebar panel (identity card + nav links as ONE bordered
 * surface). Two-level structure:
 *   .chn-account-sidebar         → outer grid cell, STRETCHES to fill row
 *   .chn-account-sidebar__inner  → position: sticky, holds the visible chrome
 * The split is necessary because `position: sticky` is bounded by the
 * sticky element's CONTAINING BLOCK. Putting sticky directly on the grid
 * cell limits travel to the cell's own height (= wrapper height after
 * `align-self: start`), which can be SHORTER than the cell row on short
 * pages → sticky scrolls away too early. With the outer cell stretching to
 * fill the row and the inner being sticky inside it, the inner panel has
 * the full grid row height as travel range. */
html body.woocommerce-account .chn-account-sidebar {
	width: 100%;
	display: block;
	position: relative;
	/* `align-self: stretch` on the grid placement above makes this fill the
	 * grid row height; no explicit height needed. */
}
html body.woocommerce-account .chn-account-sidebar__inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	position: sticky;
	/* Header on /my-account/ is NOT itself sticky (position: relative,
	 * scrolls away with content) — once the user has scrolled past the
	 * 92-104px Elementor header, the entire viewport top is free, so a
	 * small breathing-room top offset is correct. 32px matches the prior
	 * nav-only sticky top. */
	top: 32px;
	/* Cap the panel to viewport-minus-top-offset so longer architect nav
	 * lists don't push the panel past the viewport bottom on scroll.
	 * Only the nav scrolls internally — identity card stays pinned at the
	 * top of the panel via flex-shrink: 0 below. */
	max-height: calc(100vh - 64px);
}
/* Identity card inside the inner panel: drops its independent panel chrome
 * (margin-bottom, full border-radius, shadow) so it becomes the top half of
 * the unified panel. Border-bottom is the seam between identity + nav. */
html body.woocommerce-account .chn-account-sidebar__inner > .chn-ed-identity {
	flex: 0 0 auto;
	margin-bottom: 0 !important;
	border-radius: 4px 4px 0 0 !important;
	border-bottom: 1px solid var(--chn-color-border) !important;
	box-shadow: none !important;
}
/* Suppress the orange ::after accent that previously sat under identity.
 * In the unified panel the accent is on the outer wrapper instead. */
html body.woocommerce-account .chn-account-sidebar__inner > .chn-ed-identity::after {
	display: none !important;
}
/* Top-of-panel orange accent (replaces the identity::after accent that's
 * now hidden). Positioned on the inner panel so it stays glued to the panel
 * top edge as the panel sticks/unsticks. */
html body.woocommerce-account .chn-account-sidebar__inner::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 36px;
	height: 2px;
	background: var(--chn-color-accent);
	z-index: 2;
}
/* Nav fills the remaining vertical space inside the inner panel; its UL
 * scrolls internally if the list is taller than (panel-height - identity).
 * The previous `position: sticky` rule on the nav (from the editorial
 * mu-plugin) must be reset to static so it doesn't fight the inner sticky. */
html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: static !important;
	top: auto !important;
}
html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation > ul {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--chn-color-border) transparent;
	border-top: 0 !important;
	border-radius: 0 0 4px 4px !important;
	margin-top: 0 !important;
}
html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation > ul::-webkit-scrollbar {
	width: 6px;
}
html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation > ul::-webkit-scrollbar-thumb {
	background: var(--chn-color-border);
	border-radius: 999px;
}
html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation > ul::-webkit-scrollbar-track {
	background: transparent;
}
/* Greeting paragraph: cap to dashboard-grid width + a light card-deep band so
 * it reads as a deliberate intro slab rather than floating text. Aligns flush
 * with the cards beneath it (both share the .woocommerce-MyAccount-content
 * left edge) — no more "dead space" effect at any column count. */
html body.woocommerce-account .woocommerce-MyAccount-content .chn-dash-greet {
	margin: 0 0 18px !important;
	padding: 12px 16px !important;
	background: var(--chn-color-card) !important;
	border: 1px solid var(--chn-color-border) !important;
	border-radius: 4px !important;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
	max-width: 100% !important;
}

/* B3-3 — suppress the redundant "CARIBBEAN HOME NETWORK" suffix on the page
 * header eyebrow. Keeps the tab slug, drops the suffix that repeats site-wide
 * branding on every single tab. */
body.woocommerce-account .chn-ed-pageheader__eyebrow span { display: none !important; }

/* B3-4 — wrap the whole sidebar nav in one bordered panel card so it reads as
 * a single surface (identity card still sits above as a separate slab).
 * The editorial nav's per-item left-border accent stays; we just frame it. */
body.woocommerce-account .woocommerce-MyAccount-navigation > ul {
	background: var(--chn-color-card) !important;
	border: 1px solid var(--chn-color-border) !important;
	border-radius: 4px !important;
	padding: 8px 0 !important;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li > a {
	padding-left: 18px !important;
	padding-right: 14px !important;
}
/* B3-5 — discoverable active state: navy left-border accent + faint navy tint. */
body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.is-active > a,
body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.woocommerce-MyAccount-navigation-link--is-active > a {
	background: rgba(11, 59, 148, .055) !important;
}
/* B3-6 — tighter group label (smaller eyebrow, no full-width rule). */
body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.chn-ed-grouplabel {
	padding: 16px 18px 4px !important;
	font-size: 9.5px !important;
	letter-spacing: .24em !important;
}
body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.chn-ed-grouplabel::after {
	display: none !important;
}

/* B3-7 — sharper identity card edge: stronger bottom accent, no soft shadow. */
body.woocommerce-account .chn-ed-identity {
	box-shadow: none !important;
}
body.woocommerce-account .chn-ed-identity::after {
	height: 2px !important;
}

/* B3-8 — table chrome: subtle row hover so the table reads as interactive
 * (currently every row blends in). */
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tbody tr:hover td,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table tbody tr:hover td {
	background: var(--chn-color-card-deep) !important;
}
/* B4W4 — /my-account/orders/ bespoke chrome.
 * The theme override at woocommerce/myaccount/orders.php wraps the order-status
 * text in `<mark class="order-status status-<slug>"><span>…</span></mark>` so
 * the pill-chip CSS can target it. Also ships `.chn-empty.chn-empty--orders`
 * for the zero-orders branch (Lucide cart icon + brand CTA). The cross-cutting
 * `min-width: 0` grid fix is owned by the W4-my-account-dashboard sister agent
 * (CHROME-5 in _phaseB4-chrome-spotted.md). */

/* B4W4-1 — order-status pill chip with per-status hue map. */
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__cell-order-status mark.order-status {
	display: inline-block !important;
	padding: 5px 12px !important;
	border-radius: 999px !important;
	background: var(--chn-color-paper-deep) !important;
	color: var(--chn-color-primary) !important;
	font-family: var(--chn-font-sans) !important;
	font-size: 10.5px !important;
	letter-spacing: .16em !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-transform: uppercase !important;
	white-space: nowrap;
	border: 1px solid transparent;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark.status-completed,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark.status-processing {
	background: rgba(16, 122, 73, .12) !important;  /* emerald @ 12% — success state token candidate */
	color: #0a6a3d !important;
	border-color: rgba(16, 122, 73, .25) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark.status-on-hold,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark.status-pending {
	background: rgba(243, 128, 45, .14) !important;
	color: var(--chn-color-accent-700) !important;
	border-color: rgba(243, 128, 45, .3) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark.status-failed,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark.status-cancelled,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-status mark.status-refunded {
	background: var(--chn-color-card-deep) !important;
	color: var(--chn-color-muted) !important;
	border-color: var(--chn-color-border) !important;
}

/* B4W4-2 — action-button hierarchy (Pay solid / View outline / Cancel muted). */
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	margin-right: 6px;
	margin-bottom: 4px;
	font-family: var(--chn-font-sans) !important;
	font-weight: 700 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 4px !important;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button:last-child { margin-right: 0; }
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button:hover { transform: translateY(-1px); }
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button.pay {
	background: var(--chn-color-primary) !important;
	color: #ffffff !important;
	border: 1px solid var(--chn-color-primary) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button.pay:hover {
	background: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button.view {
	background: transparent !important;
	color: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button.view:hover {
	background: rgba(11, 59, 148, .055) !important;
	color: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button.cancel {
	background: transparent !important;
	color: var(--chn-color-muted) !important;
	border: 1px solid var(--chn-color-border) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-button.button.cancel:hover {
	color: var(--chn-color-text) !important;
	border-color: var(--chn-color-muted) !important;
	background: var(--chn-color-card-deep) !important;
}

/* B4W4-3 — pagination chrome: outline primary buttons, 44 px tap target. */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination {
	display: flex !important;
	gap: 12px;
	justify-content: flex-start;
	margin: 28px 0 8px !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination .woocommerce-button.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 11px 22px !important;
	background: var(--chn-color-surface) !important;
	color: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
	border-radius: 4px !important;
	font-family: var(--chn-font-sans) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination .woocommerce-button.button:hover {
	background: var(--chn-color-primary) !important;
	color: #ffffff !important;
}

/* B4W4-4 — order-number link gets accent-orange border-bottom on hover. */
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
	color: var(--chn-color-primary);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .15s ease;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a:hover {
	border-bottom-color: var(--chn-color-accent);
}

body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table {
	table-layout: fixed;
	width: 100%;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__header-order-number { width: 13%; }
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__header-order-date { width: 18%; }
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__header-order-status { width: 17%; }
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__header-order-total { width: 25%; }
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table .woocommerce-orders-table__header-order-actions { width: 27%; }
body.woocommerce-account .woocommerce-MyAccount-content .chn-order-total {
	align-items: baseline;
	display: grid;
	gap: 2px 8px;
	grid-template-columns: minmax(0, auto) auto;
	justify-content: start;
	max-width: 100%;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-order-total strong {
	color: var(--chn-color-text);
	font-variant-numeric: tabular-nums;
	min-width: 0;
	overflow-wrap: anywhere;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-order-total > span {
	color: var(--chn-color-muted);
	font-size: 10px;
	font-weight: 750;
	letter-spacing: .1em;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-order-total small {
	color: var(--chn-color-muted);
	font-size: 11px;
	grid-column: 1 / -1;
}

/* B4W4-5 — empty state hook. B3-11a/b styles the .chn-empty card + CTA. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty--orders {
	margin: 12px 0 32px;
}

/* B4W4-6 — orders-table mobile card-stack layout.
 * Phones: each tr → vertical card. Hide thead, stack td as flex rows with a
 * `::before { content: attr(data-title) }` label on the left and the value on
 * the right. Actions cell stacks vertically so each button is full-width and
 * 40+ px tall. */
@media (max-width: 900px) {
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders,
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table.shop_table_responsive {
		display: block !important;
		overflow-x: visible !important;
		white-space: normal !important;
		width: 100% !important;
		max-width: 100% !important;
		border: none !important;
		background: transparent !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders thead {
		display: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody {
		display: block !important;
		width: 100% !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr {
		display: block !important;
		width: 100% !important;
		border: 1px solid var(--chn-color-border) !important;
		border-radius: 4px !important;
		margin-bottom: 12px;
		background: var(--chn-color-card) !important;
		overflow: hidden;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr td,
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr th {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center;
		flex-wrap: wrap;
		gap: 10px;
		padding: 11px 14px !important;
		border-bottom: 1px solid var(--chn-color-paper-deep) !important;
		text-align: right !important;
		width: 100% !important;
		box-sizing: border-box;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr td:last-child,
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr th:last-child {
		border-bottom: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr td::before,
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr th::before {
		content: attr(data-title);
		font-family: var(--chn-font-sans);
		font-size: 10px;
		letter-spacing: .16em;
		text-transform: uppercase;
		font-weight: 700;
		color: var(--chn-color-muted);
		flex: 0 0 auto;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr td.woocommerce-orders-table__cell-order-actions {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 6px;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr td.woocommerce-orders-table__cell-order-actions::before {
		text-align: left;
		flex: 0 0 100%;
		margin-bottom: 2px;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.shop_table_responsive.my_account_orders tbody tr td.woocommerce-orders-table__cell-order-actions .woocommerce-button.button {
		width: 100%;
		min-height: 40px;
		margin-right: 0;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content .chn-order-total {
		justify-content: end;
		text-align: right;
	}
}

/* B3-9 — addresses tab (`/my-account/edit-address/`): give the billing +
 * shipping blocks card chrome so the page stops looking like a debug screen.
 * The WC template renders two `<address>` blocks plus h3s + an "Add" link. */
body.woocommerce-account .woocommerce-MyAccount-content .u-columns,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address,
body.woocommerce-account .woocommerce-MyAccount-content .u-column1,
body.woocommerce-account .woocommerce-MyAccount-content .u-column2,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses .col-1,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses .col-2 {
	background: var(--chn-color-card);
	border: 1px solid var(--chn-color-border);
	border-radius: 4px;
	padding: 22px 24px 20px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
	width: auto !important;
	float: none !important;
	position: relative;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address::before,
body.woocommerce-account .woocommerce-MyAccount-content .u-column1::before,
body.woocommerce-account .woocommerce-MyAccount-content .u-column2::before,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses .col-1::before,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses .col-2::before {
	content: "";
	position: absolute;
	top: 0; left: 0;
	width: 28px; height: 2px;
	background: var(--chn-color-accent);
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title {
	margin-top: 0;
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
	margin: 0 !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title .edit {
	font-family: var(--chn-font-sans);
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--chn-color-primary);
	text-decoration: none;
	border-bottom: 1px solid var(--chn-color-border);
	padding-bottom: 1px;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title .edit:hover {
	border-bottom-color: var(--chn-color-accent);
	color: var(--chn-color-primary-700);
}
body.woocommerce-account .woocommerce-MyAccount-content address {
	font-style: normal;
	font-family: var(--chn-font-sans);
	font-size: 14px;
	line-height: 1.55;
	color: var(--chn-color-text);
	margin: 12px 0 0;
}

/* B3-10 — account-details password block. Currently a card-deep fieldset
 * floats free in the form. Restyle as a refined card so it harmonises with
 * the rest of the form rather than dropping in as an alien panel. */
body.woocommerce-account .woocommerce-MyAccount-content fieldset {
	background: var(--chn-color-card) !important;
	border: 1px solid var(--chn-color-border) !important;
	border-radius: 4px !important;
	padding: 20px 22px !important;
	margin: 24px 0 !important;
}
body.woocommerce-account .woocommerce-MyAccount-content fieldset legend {
	font-family: var(--chn-font-sans);
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--chn-color-muted);
	padding: 0 8px;
}

/* B3-11a — empty-state CTA contrast fix.
 * `chn-account-empty-states.php` paints `.chn-empty__btn` as navy bg + white
 * text, but the editorial `body.woocommerce-account .woocommerce-MyAccount-content a`
 * rule wins on specificity and re-colours the label navy → invisible navy-on-
 * navy chip. Re-assert white on the CTA's own selector and add a hover
 * darken state. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty__btn {
	color: #ffffff !important;
	background: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty__btn:hover {
	color: #ffffff !important;
	background: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty__btn--ghost {
	color: var(--chn-color-primary) !important;
	background: var(--chn-color-surface) !important;
	border: 1px solid var(--chn-color-primary) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty__btn--ghost:hover {
	color: var(--chn-color-primary-700) !important;
	background: rgba(11, 59, 148, .055) !important;
	border-color: var(--chn-color-primary-700) !important;
}

/* B3-11b — empty-state card chrome harmonised with the white shell.
 * The default `.chn-empty` panel was painted card-deep against the cream body;
 * now that the body is white, the contrast is too low. Switch to card cream
 * surface with a 1 px hairline so the panel reads as a deliberate slab. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty {
	background: var(--chn-color-card) !important;
	border: 1px solid var(--chn-color-border) !important;
	border-radius: 4px !important;
	padding: 36px 32px 32px !important;
	text-align: center;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty__icon {
	color: var(--chn-color-primary);
	margin-bottom: 14px;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty h3 {
	margin: 0 0 10px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty p {
	color: var(--chn-color-muted);
	max-width: 52ch;
	margin: 0 auto 18px !important;
}

/* B3-12 — mobile: switch the nav from a 2-col tile grid to a horizontal
 * scroll pill row. WCAG 44 px tap targets retained. */
@media (max-width: 900px) {
	/* B4W4 — force single column to honour viewport width.
	 * Editorial mu-plugin sets `.woocommerce { grid-template-columns: 1fr }`
	 * on mobile, but plain `1fr` resolves to the wider min-content of any grid
	 * item (long unbreakable strings inside the sidebar wrapper / nav links
	 * pushed the column out to ~950 px on a 375 vp). `minmax(0, 1fr)` clamps
	 * the track to the available viewport width, restoring proper mobile flow. */
	html body.woocommerce-account .woocommerce {
		grid-template-columns: minmax(0, 1fr) !important;
	}
	/* Undo the desktop explicit grid placement so the mobile single-column
	 * stack (identity → nav → content) flows naturally. The editorial mu-
	 * plugin's `@media (max-width: 900px)` rule sets `.woocommerce` to one
	 * `1fr` column, and `grid-column: 2` from B3-2b would otherwise drop the
	 * content into a non-existent column. */
	html body.woocommerce-account .woocommerce > .chn-account-sidebar,
	html body.woocommerce-account .woocommerce > .chn-ed-identity,
	html body.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation,
	html body.woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
		grid-column: 1 !important;
		grid-row: auto !important;
		min-width: 0 !important;
	}
	/* B4W4 — drop sticky on mobile + decouple identity/nav back into their
	 * own surfaces so the existing horizontal-scroll pill row treatment
	 * below still applies cleanly to the nav. */
	html body.woocommerce-account .chn-account-sidebar,
	html body.woocommerce-account .chn-account-sidebar__inner {
		position: static !important;
		top: auto !important;
		display: block !important;
		max-height: none !important;
		overflow: visible !important;
		height: auto !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner::before {
		display: none !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .chn-ed-identity {
		margin-bottom: 18px !important;
		border-radius: 4px !important;
		border-bottom: 1px solid var(--chn-color-border) !important;
		flex: none !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .chn-ed-identity::after {
		display: block !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation {
		flex: none !important;
		min-height: 0 !important;
		overflow: visible !important;
		display: block !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation > ul {
		overflow-y: visible !important;
		flex: none !important;
		min-height: 0 !important;
	}
	/* B4W4 — drop sticky on mobile + decouple identity/nav back into their
	 * own surfaces so the existing horizontal-scroll pill row treatment
	 * below still applies cleanly to the nav. */
	html body.woocommerce-account .chn-account-sidebar,
	html body.woocommerce-account .chn-account-sidebar__inner {
		position: static !important;
		top: auto !important;
		display: block !important;
		max-height: none !important;
		overflow: visible !important;
		height: auto !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner::before {
		display: none !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .chn-ed-identity {
		margin-bottom: 18px !important;
		border-radius: 4px !important;
		border-bottom: 1px solid var(--chn-color-border) !important;
		flex: none !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .chn-ed-identity::after {
		display: block !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation {
		flex: none !important;
		min-height: 0 !important;
		overflow: visible !important;
		display: block !important;
	}
	html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation > ul {
		overflow-y: visible !important;
		flex: none !important;
		min-height: 0 !important;
	}

	html body.woocommerce-account .woocommerce-MyAccount-navigation,
	html body.woocommerce-account .chn-account-sidebar__inner > .woocommerce-MyAccount-navigation {
		/* chn2 wave 7 polish — wrap the scroller in a positioned container
		 * so we can layer a discoverable scroll affordance over the right
		 * edge instead of relying only on the subtle mask. The second
		 * selector matches what the sidebar-wrap JS produces at runtime
		 * and beats the static-position override one line up. */
		position: relative !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		gap: 0 !important;
		padding: 6px !important;
		border-radius: 999px !important;
		background: var(--chn-color-card) !important;
		border: 1px solid var(--chn-color-border) !important;
		/* Phase B4 R3 — fade-edge affordance so users know the row scrolls
		 * horizontally. The mask creates a subtle 32px fade-to-transparent
		 * on both inline edges; combined with the scroll-snap behaviour
		 * and the chevron indicator below the cue is unambiguous. */
		mask-image: linear-gradient(
			to right,
			transparent 0,
			#000 24px,
			#000 calc(100% - 24px),
			transparent 100%
		);
		-webkit-mask-image: linear-gradient(
			to right,
			transparent 0,
			#000 24px,
			#000 calc(100% - 24px),
			transparent 100%
		);
		/* Hide native scrollbar so the mask isn't sliced by an OS scroll track. */
		scrollbar-width: none;
	}
	/* chn2 wave 7 polish — explicit right-edge chevron so users can tell at
	 * a glance that the tab strip scrolls horizontally. Hidden when the
	 * user reaches the end (toggled by JS via .is-scrolled-end). */
	html body.woocommerce-account .woocommerce-MyAccount-navigation::after {
		content: "›";
		position: absolute;
		top: 50%;
		right: 4px;
		transform: translateY(-50%);
		width: 22px;
		height: 22px;
		line-height: 20px;
		text-align: center;
		font-size: 18px;
		font-weight: 700;
		color: var(--chn-color-primary, #0b3b94);
		background: var(--chn-color-card, #fffdf8);
		border: 1px solid var(--chn-color-border, #e5e1da);
		border-radius: 50%;
		box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
		pointer-events: none;
		transition: opacity .15s ease;
	}
	html body.woocommerce-account .woocommerce-MyAccount-navigation.is-scrolled-end::after {
		opacity: 0;
	}
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul::-webkit-scrollbar {
		display: none;
	}
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li {
		flex: 0 0 auto !important;
		scroll-snap-align: start;
	}
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li > a {
		border-bottom: none !important;
		border-radius: 999px !important;
		padding: 11px 18px !important;
		min-height: 44px !important;
		font-size: 13px !important;
		white-space: nowrap !important;
		margin: 0 !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.is-active > a,
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.woocommerce-MyAccount-navigation-link--is-active > a {
		background: var(--chn-color-primary) !important;
		color: #ffffff !important;
		border-bottom: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.woocommerce-MyAccount-navigation-link--customer-logout > a {
		border-top: none !important;
		margin-top: 0 !important;
		padding-top: 11px !important;
	}
	/* Addresses stack on tablet/phone. */
	body.woocommerce-account .woocommerce-MyAccount-content .u-columns,
	body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 480px) {
	html body.woocommerce-account .woocommerce-MyAccount-navigation > ul {
		margin-inline: -8px; /* let the pill row touch the gutter edges */
		border-radius: 0 !important;
		border-left: none !important;
		border-right: none !important;
	}
}

/* ============================================================================
 * Phase B4 CHROME-CONDENSE — reduce the inflated chrome that made every tab
 * feel oversized on /my-account/. Each rule targets a specific size knob set
 * by either `chn-account-editorial.php` (inline <style>, priority 50, beats
 * link rel rules at equal specificity) or `chn-account-dashboard.php`.
 *
 * Sizing philosophy (Kemar 2026-05-20):
 *   • Aim ~75-80% of current sizes; keep utility pages calm, not cramped.
 *   • Hero card values shrink hardest (56 → 36) because "0" / "4" / "312"
 *     don't need to be loud — the label + meta carries the meaning.
 *   • Padding tightens 22-26 → 16-18; table rows 16 → 11-12.
 *   • Page-header titles cap at 32 (was 32-46 clamp).
 *   • Inputs unchanged (15 px / 11x14 — still WCAG-comfortable).
 *
 * Cross-cutting blue-on-blue contrast fix at the bottom of this block:
 * `chn-account-editorial.php` paints `.woocommerce-MyAccount-content a` navy
 * at spec (0,3,0), which beats `.chn-button` (0,1,0) and turns brand buttons
 * into invisible navy-on-navy chips. Same pattern as B3-11a; here applied to
 * the generic `.chn-button` so every account tab gets readable buttons.
 * ============================================================================ */

/* B4-C1 — page header: 32px cap (was clamp 32→46). Utility pages don't need
 * a 46 px display title; bigger titles also push everything below further
 * down the fold. Sub margin trimmed too. */
html body.woocommerce-account .chn-ed-pageheader {
	margin: 0 0 24px !important;
	padding-bottom: 16px !important;
}
html body.woocommerce-account .chn-ed-pageheader__title {
	font-size: clamp(26px, 2.4vw, 32px) !important;
	line-height: 1.08 !important;
}
html body.woocommerce-account .chn-ed-pageheader__eyebrow {
	margin-bottom: 8px !important;
	font-size: 10.5px !important;
}
html body.woocommerce-account .chn-ed-pageheader__sub {
	margin-top: 10px !important;
	font-size: 14px !important;
}

/* B4-C2 — dashboard cards: smaller padding + smaller value type. Cards no
 * longer balloon to 250+px tall for a single "0". Value 56 → 36 reads bold
 * without being a billboard.
 *
 * Specificity note: editorial inline-<style> selectors are at (0,2,1) +
 * !important AND emit AFTER this stylesheet at wp_head priority 50 — equal
 * spec + later cascade means editorial wins. The `html` prefix here bumps
 * us to (0,2,2) which beats them irrespective of cascade order. */
html body.woocommerce-account .chn-dash-grid {
	gap: 14px !important;
	margin-top: 4px !important;
}
html body.woocommerce-account .chn-dash-card {
	padding: 18px 20px 16px !important;
	gap: 4px !important;
	min-height: 0 !important;
}
html body.woocommerce-account .chn-dash-card__title {
	font-size: 10px !important;
	margin: 0 0 4px !important;
	letter-spacing: .2em !important;
}
html body.woocommerce-account .chn-dash-card__value {
	font-size: 36px !important;
	margin: 0 0 4px !important;
}
html body.woocommerce-account .chn-dash-card__value--small { font-size: 18px !important; }
html body.woocommerce-account .chn-dash-card__value--icon  { font-size: 22px !important; }
html body.woocommerce-account .chn-dash-card__meta {
	font-size: 12.5px !important;
	margin: 0 0 8px !important;
	line-height: 1.4 !important;
}
html body.woocommerce-account .chn-dash-card__cta a {
	font-size: 11.5px !important;
	padding: 6px 0 !important;
}
/* dashGrid two-col on desktop is editorial default; force 3-col on wide
 * screens so 6-8 dashboard cards don't stretch tall — repeats the auto-fill
 * idea from chn-account-dashboard.php's own CSS that the editorial CSS
 * overwrites. */
@media (min-width: 1100px) {
	html body.woocommerce-account .chn-dash-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

/* B4-C3 — h2 / h3 inside the content area: smaller, less air. */
body.woocommerce-account .woocommerce-MyAccount-content h2 {
	font-size: 22px !important;
	margin: 22px 0 10px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content h3 {
	font-size: 17px !important;
	margin: 18px 0 8px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content h4 {
	font-size: 15px !important;
	margin: 14px 0 6px !important;
}

/* B4-C4 — table row chrome: tighter padding for orders/subs/downloads/etc. */
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table th {
	padding: 10px 14px !important;
	font-size: 10px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-orders-table td {
	padding: 11px 14px !important;
	font-size: 13.5px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
	font-size: 13.5px !important;
}

/* B4-C5 — content max-width: trim 1080 → 1020 for less line-length sprawl on
 * 1440+ desktops (tables read better, cards stay in the eye-scan range). */
html body.woocommerce-account .woocommerce-MyAccount-content {
	max-width: min(1020px, 100%) !important;
}

/* B4-C6 — chn-mp-card (my-plans grid) padding tighten. */
html body.woocommerce-account .chn-mp-card {
	border-radius: 4px !important;
}
html body.woocommerce-account .chn-mp-card__title {
	font-size: 15px !important;
}

/* B4-C7 — chn-sf-stat (my-storefront stats) shrink. */
html body.woocommerce-account .chn-sf-stat {
	padding: 14px 18px !important;
}
html body.woocommerce-account .chn-sf-stat__value {
	font-size: 28px !important;
	margin-top: 4px !important;
}
html body.woocommerce-account .chn-sf-stat__label {
	font-size: 10px !important;
}
html body.woocommerce-account .chn-sf-stats { gap: 12px !important; }
html body.woocommerce-account .chn-sf-card {
	padding: 18px 20px !important;
}
html body.woocommerce-account .chn-sf-card h4 {
	font-size: 17px !important;
	margin: 0 0 10px !important;
	padding-bottom: 8px !important;
}
html body.woocommerce-account .chn-sf h3 {
	font-size: 28px !important;
}

/* B4-C8 — chn-acc-na role-gate card: padding 36 40 → 26 28; h3 32 → 22. */
html body.woocommerce-account .chn-acc-na {
	padding: 26px 28px !important;
}
html body.woocommerce-account .chn-acc-na h3 {
	font-size: 22px !important;
}

/* B4-C9 — branded empty-state panels: padding 48 40 → 32 28; title 28 → 20. */
html body.woocommerce-account .chn-empty {
	padding: 32px 28px 26px !important;
}
html body.woocommerce-account .chn-empty__title {
	font-size: 20px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-empty h3 {
	font-size: 18px !important;
	margin: 0 0 8px !important;
}

/* B4-C10 — addresses card: padding 22 24 20 → 16 18 14. */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address,
body.woocommerce-account .woocommerce-MyAccount-content .u-column1,
body.woocommerce-account .woocommerce-MyAccount-content .u-column2,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses .col-1,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses .col-2 {
	padding: 16px 18px 14px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .u-columns,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses {
	gap: 16px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content address {
	font-size: 13.5px !important;
	margin: 8px 0 0 !important;
}

/* B4-C11 — edit-account fieldset (password block): padding 20 22 → 14 18. */
body.woocommerce-account .woocommerce-MyAccount-content fieldset {
	padding: 14px 18px 10px !important;
	margin: 18px 0 !important;
}

/* B4-C12 — paragraphs inside content: tighter rhythm. */
body.woocommerce-account .woocommerce-MyAccount-content p {
	margin: 0 0 10px !important;
}

/* B4-C13 — BLUE-ON-BLUE CONTRAST FIX.
 * `chn-account-editorial.php` blanket-paints every `a` in the content area
 * navy at spec (0,3,0); this overrides `.chn-button { color: #fff }` (0,1,0)
 * and turns brand primary buttons into invisible navy-on-navy chips. Same
 * problem fixed for `.chn-empty__btn` in B3-11a — extending the fix to:
 *   • `.chn-button` and `.chn-button--primary` (used by "+ Add new plan" on
 *     /my-account/my-plans/ and any other generic CHN button dropped into
 *     account content)
 *   • `.chn-button--ghost` (navy outline on white — keep navy text)
 *   • WC's own submit-button hover state if it picks up the ink colour.
 * Spec: `html body.woocommerce-account .woocommerce-MyAccount-content` is
 * (0,3,1) which beats the editorial `a` rule. */
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button,
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button:hover,
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button:focus,
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button:visited,
html body.woocommerce-account .woocommerce-MyAccount-content button.chn-button,
html body.woocommerce-account .woocommerce-MyAccount-content button.chn-button:hover,
html body.woocommerce-account .woocommerce-MyAccount-content button.chn-button:focus {
	background: var(--chn-color-primary) !important;
	color: #ffffff !important;
	border: 1px solid var(--chn-color-primary) !important;
	text-decoration: none !important;
}
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button:hover,
html body.woocommerce-account .woocommerce-MyAccount-content button.chn-button:hover {
	background: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
/* Ghost variant: navy text + transparent bg + navy border (legible on white). */
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button.chn-button--ghost,
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button.chn-button--ghost:visited,
html body.woocommerce-account .woocommerce-MyAccount-content button.chn-button.chn-button--ghost {
	background: transparent !important;
	color: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
}
html body.woocommerce-account .woocommerce-MyAccount-content a.chn-button.chn-button--ghost:hover,
html body.woocommerce-account .woocommerce-MyAccount-content button.chn-button.chn-button--ghost:hover {
	background: rgba(11, 59, 148, .06) !important;
	color: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
/* The editorial mu-plugin also restyles `.button` to navy bg + #fff text but
 * if any plugin-emitted CSS later in the cascade flips `color` back to navy
 * (some WC default themes do this on focus), re-assert white. */
html body.woocommerce-account .woocommerce-MyAccount-content .button:not(.chn-bm__button),
html body.woocommerce-account .woocommerce-MyAccount-content .button:not(.chn-bm__button):hover,
html body.woocommerce-account .woocommerce-MyAccount-content .button:not(.chn-bm__button):focus,
html body.woocommerce-account .woocommerce-MyAccount-content .button:not(.chn-bm__button):active,
html body.woocommerce-account .woocommerce-MyAccount-content .button:not(.chn-bm__button):visited,
html body.woocommerce-account .woocommerce-MyAccount-content button[type="submit"]:not(.chn-bm__button),
html body.woocommerce-account .woocommerce-MyAccount-content button[type="submit"]:not(.chn-bm__button):hover,
html body.woocommerce-account .woocommerce-MyAccount-content button[type="submit"]:not(.chn-bm__button):focus,
html body.woocommerce-account .woocommerce-MyAccount-content input[type="submit"]:not(.chn-bm__button),
html body.woocommerce-account .woocommerce-MyAccount-content input[type="submit"]:not(.chn-bm__button):hover,
html body.woocommerce-account .woocommerce-MyAccount-content input[type="submit"]:not(.chn-bm__button):focus {
	color: #ffffff !important;
}
/* Ghost-variant buttons WITHIN content (storefront, addresses edit link) — keep
 * their navy text on transparent — they're flagged in code as `.button-edit`
 * or `.chn-sf-actions a.ghost`. The editorial CSS already styles these as
 * transparent bg + navy text; only re-assert on hover so the navy doesn't
 * collapse onto the navy hover-tint. */
html body.woocommerce-account .woocommerce-MyAccount-content .chn-mp-card__btn--view,
html body.woocommerce-account .woocommerce-MyAccount-content .chn-mp-card__btn--view:hover,
html body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-actions a.ghost,
html body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-actions a.ghost:hover {
	color: var(--chn-color-primary) !important;
}

/* B4-C14 — pagination minor: smaller padding so a 6-page bar doesn't push as
 * tall. (Pagination styling was previously at 11x22 → 9x18.) */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination .woocommerce-button.button {
	padding: 9px 18px !important;
	font-size: 11.5px !important;
}

/* B4-C15 — mobile condense: even tighter padding + smaller header. */
@media (max-width: 600px) {
	html body.woocommerce-account .chn-ed-pageheader {
		margin: 0 0 18px !important;
		padding-bottom: 12px !important;
	}
	html body.woocommerce-account .chn-ed-pageheader__title {
		font-size: 24px !important;
	}
	html body.woocommerce-account .chn-dash-card {
		padding: 14px 16px 12px !important;
	}
	html body.woocommerce-account .chn-dash-card__value {
		font-size: 30px !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address,
	html body.woocommerce-account .woocommerce-MyAccount-content .u-column1,
	html body.woocommerce-account .woocommerce-MyAccount-content .u-column2 {
		padding: 14px 16px 12px !important;
	}
	html body.woocommerce-account .chn-empty {
		padding: 24px 20px 20px !important;
	}
	html body.woocommerce-account .chn-acc-na {
		padding: 20px 22px !important;
	}
}

/* ============================================================================
 * Phase B4 Wave 4 batch B — remaining /my-account/ tab refinements.
 *
 * Tabs covered: subscriptions, downloads, edit-address, edit-account, my-plans,
 * my-storefront, plan-sales, my-responses.
 *
 * Cross-cutting fix: kill `.u-columns` clearfix `::before` / `::after` pseudo
 * elements emitted by WC's default CSS. With our `display: grid` rule on
 * `.u-columns`, those pseudos become grid items and consume two phantom cells,
 * which is why the billing card was rendering at row1/col2 and shipping at
 * row2/col1 on the edit-address chooser. `display: none` on the pseudos
 * removes them from the grid item count entirely so the two real address
 * cards land at row1/col1 + row1/col2 as designed.
 *
 * Token reminder (no new tokens — only existing ones):
 *   --chn-color-primary       (#0b3b94)  navy
 *   --chn-color-primary-700   (#082c6f)  deep navy hover
 *   --chn-color-accent        (#f3802d)  orange
 *   --chn-color-accent-700    (#d96812)  deep orange
 *   --chn-color-paper         (#f5efe4)
 *   --chn-color-paper-deep    (#efe7d3)  rule-soft alias
 *   --chn-color-card          (#fffdf8)
 *   --chn-color-card-deep     (#faf5e8)
 *   --chn-color-text          (#1d2733)
 *   --chn-color-muted         (#5b6772)
 *   --chn-color-border        (#e5e1da)
 * Plus the brand-state colour family established for /orders/ status pills
 * (success: rgba(16,122,73,*) — emerald @ 12-25% for chip bg / text).
 * ============================================================================ */

/* W4B-0 — Cross-cutting grid hygiene: kill WC clearfix pseudos on .u-columns
 * so it grids cleanly as 2 real children, not 4 (2 pseudo + 2 real). */
body.woocommerce-account .woocommerce-MyAccount-content .u-columns::before,
body.woocommerce-account .woocommerce-MyAccount-content .u-columns::after,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses::before,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses::after,
body.woocommerce-account .woocommerce-MyAccount-content .chn-account-addresses__grid::before,
body.woocommerce-account .woocommerce-MyAccount-content .chn-account-addresses__grid::after {
	content: none !important;
	display: none !important;
}

/* W4B-1 — edit-address chooser layout: chn-account-addresses wrapper.
 * The theme override at woocommerce/myaccount/my-address.php wraps the
 * chooser in `.chn-account-addresses.chn-account-addresses--chooser` and
 * the inner grid in `.chn-account-addresses__grid`. Existing
 * `.woocommerce-Address` card chrome (B3-9) still applies because we kept
 * the legacy class names. New class targets just add the lede styling +
 * the empty-card variant. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-account-addresses__lede {
	margin: 0 0 18px !important;
	color: var(--chn-color-muted);
	font-family: var(--chn-font-sans);
	font-size: 14px;
	line-height: 1.55;
	max-width: 60ch;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-account-addresses__grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
}
@media (max-width: 900px) {
	body.woocommerce-account .woocommerce-MyAccount-content .chn-account-addresses__grid {
		grid-template-columns: 1fr !important;
	}
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-address-card__title {
	font-family: var(--chn-font-serif) !important;
	font-variation-settings: "opsz" 36, "wght" 600;
	font-size: 18px !important;
	color: var(--chn-color-text) !important;
	margin: 0 !important;
	letter-spacing: -.01em;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-address-card__edit {
	font-family: var(--chn-font-sans) !important;
	font-size: 11px !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--chn-color-primary) !important;
	text-decoration: none !important;
	border-bottom: 1px solid var(--chn-color-border) !important;
	padding-bottom: 1px;
	transition: border-color .15s ease, color .15s ease;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-address-card__edit:hover {
	border-bottom-color: var(--chn-color-accent) !important;
	color: var(--chn-color-primary-700) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-address-card--empty .chn-address-card__body {
	color: var(--chn-color-muted);
	font-style: italic;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-address-card__empty-copy {
	display: block;
	margin-top: 4px;
}

/* W4B-2 — subscriptions status pill chip (same hue map as orders).
 * The theme override at woocommerce/myaccount/my-subscriptions.php wraps
 * the status text in `<mark class="subscription-status order-status
 * subscription-status--<slug>">`. */
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions mark.subscription-status,
body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions mark.subscription-status,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status {
	display: inline-block !important;
	padding: 5px 12px !important;
	border-radius: 999px !important;
	background: var(--chn-color-paper-deep) !important;
	color: var(--chn-color-primary) !important;
	font-family: var(--chn-font-sans) !important;
	font-size: 10.5px !important;
	letter-spacing: .16em !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-transform: uppercase !important;
	white-space: nowrap;
	border: 1px solid transparent;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status.subscription-status--active,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions mark.subscription-status--active,
body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions mark.subscription-status--active {
	background: rgba(16, 122, 73, .12) !important;
	color: #0a6a3d !important;
	border-color: rgba(16, 122, 73, .25) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status.subscription-status--pending,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status.subscription-status--on-hold,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions mark.subscription-status--pending,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions mark.subscription-status--on-hold,
body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions mark.subscription-status--pending,
body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions mark.subscription-status--on-hold {
	background: rgba(243, 128, 45, .14) !important;
	color: var(--chn-color-accent-700) !important;
	border-color: rgba(243, 128, 45, .3) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status.subscription-status--cancelled,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status.subscription-status--expired,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status.subscription-status--pending-cancel,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table mark.subscription-status.subscription-status--switched,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions mark.subscription-status--cancelled,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions mark.subscription-status--expired {
	background: var(--chn-color-card-deep) !important;
	color: var(--chn-color-muted) !important;
	border-color: var(--chn-color-border) !important;
}

/* W4B-2b — subscriptions table action buttons (View / Resubscribe / Cancel)
 * inherit the same three-tier hierarchy used on /orders/ (.view = outline,
 * .pay = primary, .cancel = muted). WC Subs adds `.subscription_renewal_early`
 * and `.subscription_resubscribe` — treat as outline-primary. */
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions .woocommerce-button.button,
body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions .woocommerce-button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	margin-right: 6px;
	margin-bottom: 4px;
	font-family: var(--chn-font-sans) !important;
	font-weight: 700 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 4px !important;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions .woocommerce-button.button:hover {
	transform: translateY(-1px);
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions .woocommerce-button.button.view {
	background: transparent !important;
	color: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions .woocommerce-button.button.view:hover {
	background: rgba(11, 59, 148, .055) !important;
	color: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions .woocommerce-button.button.subscription_renewal_early,
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions .woocommerce-button.button.subscription_resubscribe {
	background: var(--chn-color-primary) !important;
	color: #ffffff !important;
	border: 1px solid var(--chn-color-primary) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions .woocommerce-button.button.cancel {
	background: transparent !important;
	color: var(--chn-color-muted) !important;
	border: 1px solid var(--chn-color-border) !important;
}

/* W4B-2c — subscriptions table mobile card stack (mirrors /orders/ pattern). */
@media (max-width: 900px) {
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions.shop_table_responsive,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions.shop_table_responsive {
		display: block !important;
		overflow-x: visible !important;
		white-space: normal !important;
		width: 100% !important;
		max-width: 100% !important;
		border: none !important;
		background: transparent !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions thead,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions thead {
		display: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody {
		display: block !important;
		width: 100% !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody tr,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody tr {
		display: block !important;
		width: 100% !important;
		border: 1px solid var(--chn-color-border) !important;
		border-radius: 4px !important;
		margin-bottom: 12px;
		background: var(--chn-color-card) !important;
		overflow: hidden;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody tr td,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody tr td {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center;
		flex-wrap: wrap;
		gap: 10px;
		padding: 11px 14px !important;
		border-bottom: 1px solid var(--chn-color-paper-deep) !important;
		text-align: right !important;
		width: 100% !important;
		box-sizing: border-box;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody tr td:last-child,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody tr td:last-child {
		border-bottom: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody tr td::before,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody tr td::before {
		content: attr(data-title);
		font-family: var(--chn-font-sans);
		font-size: 10px;
		letter-spacing: .16em;
		text-transform: uppercase;
		font-weight: 700;
		color: var(--chn-color-muted);
		flex: 0 0 auto;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody tr td.subscription-actions,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody tr td.subscription-actions {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 6px;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody tr td.subscription-actions::before,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody tr td.subscription-actions::before {
		text-align: left;
		flex: 0 0 100%;
		margin-bottom: 2px;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-MyAccount-subscriptions tbody tr td.subscription-actions .woocommerce-button.button,
	html body.woocommerce-account .woocommerce-MyAccount-content table.my_account_subscriptions tbody tr td.subscription-actions .woocommerce-button.button {
		width: 100%;
		min-height: 40px;
		margin-right: 0;
	}
}

/* W4B-3 — downloads table polish + mobile card-stack.
 * WC default emits `.account-downloads` table with cells: download-product /
 * download-remaining / download-expires / download-actions / download-file.
 * Downloads have a DOWNLOAD button per row that already passes through .button.
 * On mobile we use the same card-stack pattern as orders/subscriptions. */
@media (max-width: 900px) {
	html body.woocommerce-account .woocommerce-MyAccount-content table.shop_table.account-downloads.shop_table_responsive,
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads.shop_table_responsive {
		display: block !important;
		overflow-x: visible !important;
		white-space: normal !important;
		width: 100% !important;
		max-width: 100% !important;
		border: none !important;
		background: transparent !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads thead {
		display: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads tbody {
		display: block !important;
		width: 100% !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads tbody tr {
		display: block !important;
		width: 100% !important;
		border: 1px solid var(--chn-color-border) !important;
		border-radius: 4px !important;
		margin-bottom: 12px;
		background: var(--chn-color-card) !important;
		overflow: hidden;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads tbody tr td {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center;
		flex-wrap: wrap;
		gap: 10px;
		padding: 11px 14px !important;
		border-bottom: 1px solid var(--chn-color-paper-deep) !important;
		text-align: right !important;
		width: 100% !important;
		box-sizing: border-box;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads tbody tr td:last-child {
		border-bottom: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads tbody tr td::before {
		content: attr(data-title);
		font-family: var(--chn-font-sans);
		font-size: 10px;
		letter-spacing: .16em;
		text-transform: uppercase;
		font-weight: 700;
		color: var(--chn-color-muted);
		flex: 0 0 auto;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads tbody tr td.download-file .button,
	html body.woocommerce-account .woocommerce-MyAccount-content table.account-downloads tbody tr td.download-actions .button {
		min-height: 40px;
	}
}

/* W4B-4 — my-storefront card hierarchy: edit-button uses ghost variant.
 * The chn-sf-actions inline styles paint `.ghost` already, but the WC
 * blanket `.button` rule wins specificity in some browsers. Re-assert. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-actions a.ghost,
body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-actions button.ghost {
	background: var(--chn-color-surface) !important;
	color: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-actions a.ghost:hover,
body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-actions button.ghost:hover {
	background: rgba(11, 59, 148, .06) !important;
	color: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-actions a.primary {
	background: var(--chn-color-primary) !important;
	color: #ffffff !important;
	border: 1px solid var(--chn-color-primary) !important;
}
/* The chn-sf-pick__actions buttons (logo / banner picker) should also be ghost. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-pick__actions button {
	background: var(--chn-color-surface) !important;
	color: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
}

/* W4B-5 — plan-sales: revenue summary band + status pill chrome + mobile stack. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 20px;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-summary__stat {
	background: var(--chn-color-card);
	border: 1px solid var(--chn-color-border);
	border-radius: 4px;
	padding: 14px 16px;
	position: relative;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-summary__stat::before {
	content: "";
	position: absolute;
	top: 0; left: 0;
	width: 20px;
	height: 2px;
	background: var(--chn-color-accent);
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-summary__label {
	font-family: var(--chn-font-sans);
	font-size: 10px;
	letter-spacing: .2em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--chn-color-muted);
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-summary__value {
	font-family: var(--chn-font-serif);
	font-variation-settings: "opsz" 96, "wght" 600;
	font-size: 24px;
	color: var(--chn-color-text);
	margin-top: 4px;
	letter-spacing: -.02em;
}
/* chn2 #148 item 8 / June 10 backlog #12 — currency-aware Design Sales.
 * Order's billing currency code printed beside each money figure (revenue
 * rollups + per-row amount) because the woocommerce_currency_symbol filter
 * customises both JMD + USD to "US $". Without the code suffix architects
 * can't tell their JMD sales apart from their USD sales. */
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-summary__curcode,
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-table__curcode {
	font-family: var(--chn-font-sans);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .14em;
	color: var(--chn-color-muted);
	margin-left: 4px;
	vertical-align: 0.18em;
}
/* Plan-sales table reuses the orders-table chrome — the status mark already
 * matches the .order-status .status-<slug> selector pattern from B4W4-1. */
@media (max-width: 700px) {
	body.woocommerce-account .woocommerce-MyAccount-content .chn-ps-summary {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 900px) {
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-ps-table.shop_table_responsive {
		display: block !important;
		overflow-x: visible !important;
		white-space: normal !important;
		width: 100% !important;
		max-width: 100% !important;
		border: none !important;
		background: transparent !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-ps-table thead {
		display: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-ps-table tbody {
		display: block !important;
		width: 100% !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-ps-table tbody tr {
		display: block !important;
		width: 100% !important;
		border: 1px solid var(--chn-color-border) !important;
		border-radius: 4px !important;
		margin-bottom: 12px;
		background: var(--chn-color-card) !important;
		overflow: hidden;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-ps-table tbody tr td {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center;
		flex-wrap: wrap;
		gap: 10px;
		padding: 11px 14px !important;
		border-bottom: 1px solid var(--chn-color-paper-deep) !important;
		text-align: right !important;
		width: 100% !important;
		box-sizing: border-box;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-ps-table tbody tr td:last-child {
		border-bottom: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-ps-table tbody tr td::before {
		content: attr(data-title);
		font-family: var(--chn-font-sans);
		font-size: 10px;
		letter-spacing: .16em;
		text-transform: uppercase;
		font-weight: 700;
		color: var(--chn-color-muted);
		flex: 0 0 auto;
	}
}

/* W4B-6 — my-responses: status pill chrome (accepted = success / pending = warn)
 * + branded empty-state already comes from chn-empty. The table reuses the
 * woocommerce-orders-table chrome via the shared class. Mobile card-stack
 * mirrors the other tabs. */
body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table mark.chn-mr-status {
	display: inline-block !important;
	padding: 5px 12px !important;
	border-radius: 999px !important;
	background: var(--chn-color-paper-deep) !important;
	color: var(--chn-color-primary) !important;
	font-family: var(--chn-font-sans) !important;
	font-size: 10.5px !important;
	letter-spacing: .16em !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-transform: uppercase !important;
	white-space: nowrap;
	border: 1px solid transparent;
}
body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table mark.chn-mr-status--accepted {
	background: rgba(16, 122, 73, .12) !important;
	color: #0a6a3d !important;
	border-color: rgba(16, 122, 73, .25) !important;
}
body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table mark.chn-mr-status--pending {
	background: rgba(243, 128, 45, .14) !important;
	color: var(--chn-color-accent-700) !important;
	border-color: rgba(243, 128, 45, .3) !important;
}
@media (max-width: 900px) {
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table.shop_table_responsive {
		display: block !important;
		overflow-x: visible !important;
		white-space: normal !important;
		width: 100% !important;
		max-width: 100% !important;
		border: none !important;
		background: transparent !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table thead {
		display: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table tbody {
		display: block !important;
		width: 100% !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table tbody tr {
		display: block !important;
		width: 100% !important;
		border: 1px solid var(--chn-color-border) !important;
		border-radius: 4px !important;
		margin-bottom: 12px;
		background: var(--chn-color-card) !important;
		overflow: hidden;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table tbody tr td {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center;
		flex-wrap: wrap;
		gap: 10px;
		padding: 11px 14px !important;
		border-bottom: 1px solid var(--chn-color-paper-deep) !important;
		text-align: right !important;
		width: 100% !important;
		box-sizing: border-box;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table tbody tr td:last-child {
		border-bottom: none !important;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.chn-mr-table tbody tr td::before {
		content: attr(data-title);
		font-family: var(--chn-font-sans);
		font-size: 10px;
		letter-spacing: .16em;
		text-transform: uppercase;
		font-weight: 700;
		color: var(--chn-color-muted);
		flex: 0 0 auto;
	}
}

/* W4B-7 — my-plans card hover lift + verify is-visible carries.
 * The cards inside .chn-my-plans-card are .chn-plan-card from the canonical
 * /house-plans/ template — they inherit the global IntersectionObserver
 * baseline (opacity 0 → 1 via .is-visible). Add a fallback so a slow observer
 * never leaves the cards permanently invisible: any .chn-plan-card that's
 * still at opacity 0 after 1500ms gets forced visible by a fallback rule.
 * This is achieved purely with CSS: when the user has scrolled, the IO
 * activates. We can't gate this on time in CSS, but we can ensure the cards
 * inside our specific surface have a safe minimum opacity. */
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card .chn-plan-card {
	/* Within /my-account/ the card already lives in a scrollable layout, so
	 * if the IO somehow misses, force visible after a generous delay. */
	animation: chn-mp-fallback 1500ms ease-out 1200ms both;
}
@keyframes chn-mp-fallback {
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card .chn-plan-card {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}
/* The footer (status pill + actions) needs to stay below the card. */
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card {
	display: flex;
	flex-direction: column;
	background: transparent;
	border: none;
	gap: 0;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__footer {
	background: var(--chn-color-card);
	border: 1px solid var(--chn-color-border);
	border-top: none;
	border-radius: 0 0 4px 4px;
	padding: 10px 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__meta {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__status {
	font-family: var(--chn-font-sans);
	font-size: 9.5px;
	letter-spacing: .2em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--chn-color-paper-deep);
	color: var(--chn-color-primary);
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__status--publish {
	background: rgba(16, 122, 73, .12);
	color: #0a6a3d;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__status--draft,
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__status--pending {
	background: rgba(243, 128, 45, .14);
	color: var(--chn-color-accent-700);
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__chip {
	font-family: var(--chn-font-sans);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .04em;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 4px;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__chip--incomplete {
	background: rgba(243, 128, 45, .12);
	color: var(--chn-color-accent-700);
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__chip--complete {
	background: rgba(16, 122, 73, .1);
	color: #0a6a3d;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__actions {
	display: flex;
	gap: 6px;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 14px;
	min-height: 30px;
	font-family: var(--chn-font-sans);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__btn--view {
	background: transparent !important;
	color: var(--chn-color-primary) !important;
	border: 1px solid var(--chn-color-primary) !important;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__btn--view:hover {
	background: rgba(11, 59, 148, .055) !important;
	color: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__btn--edit {
	background: var(--chn-color-primary) !important;
	color: #ffffff !important;
	border: 1px solid var(--chn-color-primary) !important;
}
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card__btn--edit:hover {
	background: var(--chn-color-primary-700) !important;
	border-color: var(--chn-color-primary-700) !important;
}
/* My Plans grid layout — 2 col on tablet, 3 col on desktop, 1 col on mobile. */
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}
@media (min-width: 1100px) {
	html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 560px) {
	html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-grid {
		grid-template-columns: 1fr;
	}
}
/* Plan card inside the wrapper: the canonical .chn-plan-card already has its
 * own border, so suppress the wrapper's border to avoid double-line. */
html body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans-card .chn-plan-card {
	border-radius: 4px 4px 0 0 !important;
	border-bottom: none !important;
}

/* W4B-8 — edit-account: clarify password fieldset is a sub-section.
 * The default markup has a single form with the first three text inputs +
 * email + a fieldset wrapping password fields. B3-10 already framed the
 * fieldset; add a top hairline separator and a subtle "Password change"
 * eyebrow above the legend so the section reads as deliberately partitioned. */
body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm fieldset {
	margin-top: 24px !important;
}
body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm fieldset legend {
	background: var(--chn-color-card);
	padding: 0 10px !important;
	font-family: var(--chn-font-sans) !important;
	font-size: 10.5px !important;
	letter-spacing: .2em !important;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--chn-color-muted);
}
body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm fieldset .form-row {
	margin-bottom: 12px;
}
/* Save-button hierarchy: primary navy. */
body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm button[type="submit"] {
	min-height: 44px;
	padding: 12px 24px !important;
}

/* W4B-9 — my-storefront mobile responsiveness: stats grid + banner. */
@media (max-width: 700px) {
	body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
	body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-checks {
		grid-template-columns: 1fr !important;
	}
	body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-row {
		flex-direction: column;
	}
	body.woocommerce-account .woocommerce-MyAccount-content .chn-sf-plans {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* W4B-10 — chn-mr, chn-ps title scoped (matches other-tab title pattern). */
body.woocommerce-account .woocommerce-MyAccount-content .chn-mr__title,
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps__title,
body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans__title {
	display: none !important;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-mr__lede,
body.woocommerce-account .woocommerce-MyAccount-content .chn-ps__lede,
body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans__lede {
	margin: 0 0 18px !important;
	color: var(--chn-color-muted);
	font-family: var(--chn-font-sans);
	font-size: 14px;
	line-height: 1.55;
	max-width: 60ch;
}
body.woocommerce-account .woocommerce-MyAccount-content .chn-my-plans__addbar {
	margin: 0 0 16px !important;
}

/* ============================================================
   Phase B4 re-review follow-ups F-R3-6 / F-R3-7

   F-R3-6: edit-account form fields spanned the full content column
   (~920px on desktop), making email + password fields uncomfortably
   wide. Cap individual input width to a comfortable ~520px so the
   form reads as a focused account-details surface instead of a wall
   of empty whitespace. Two-up name fields keep their column width
   via WC's stock `.form-row-first` / `.form-row-last`.

   F-R3-7: edit-address "Add billing address" / "Add shipping address"
   anchor was styled as accent-orange uppercase (loud, doesn't match
   peer-tab CTA hierarchy on subscriptions / orders / downloads which
   use subtle navy text-buttons). Re-style to match peers: subtle
   navy, small caps, no chunky uppercase orange.
   ============================================================ */
html body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm {
	max-width: 640px;
}
html body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm .form-row-wide input[type="text"],
html body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm .form-row-wide input[type="email"],
html body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm .form-row-wide input[type="password"],
html body.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm fieldset input[type="password"] {
	max-width: 520px;
}
html body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses .woocommerce-Address .edit,
html body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses a.edit,
html body.woocommerce-account .woocommerce-MyAccount-content .u-columns .woocommerce-Address a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--chn-color-primary);
	font-family: var(--chn-font-sans);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	background: transparent;
	padding: 8px 12px;
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-sm, 4px);
	transition: background .15s ease, border-color .15s ease;
}
html body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses a.edit:hover,
html body.woocommerce-account .woocommerce-MyAccount-content .u-columns .woocommerce-Address a:hover {
	background: rgba(11, 59, 148, .06);
	border-color: var(--chn-color-primary);
	color: var(--chn-color-primary);
}

/* Fixed-currency order and subscription summaries: keep values and actions
 * inside their cells, rather than the legacy nowrap/scroll table treatment. */
@media (max-width: 768px) {
	html body.woocommerce-account .woocommerce-MyAccount-content table.subscription_details,
	html body.woocommerce-account .woocommerce-MyAccount-content table.order_details {
		display: table;
		table-layout: fixed;
		width: 100%;
		max-width: 100%;
		white-space: normal;
		overflow: visible;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.subscription_details td,
	html body.woocommerce-account .woocommerce-MyAccount-content table.order_details :is(th, td) {
		white-space: normal !important;
		overflow-wrap: anywhere;
		min-width: 0;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.subscription_details td:first-child {
		width: 35%;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.order_details .product-name {
		width: 50%;
	}
	html body.woocommerce-account .woocommerce-MyAccount-content table.subscription_details .button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		max-width: 100%;
		min-height: 44px;
		margin: 4px 0;
		white-space: normal;
		overflow-wrap: anywhere;
		line-height: 1.4;
	}
}
