/*
 * Xcoins crypto widget styles. Brand tokens inline so the widget is
 * self-contained on any page (homepage, T1, blog modal).
 */
.xcw {
	--xcw-navy: #273045; --xcw-rich-black: #111620; --xcw-dark-grey: #1F242D;
	--xcw-true-blue: #015ADF; --xcw-bright-blue: #1A9CFC; --xcw-slate: #788196;
	--xcw-off-white: #F9FDFF; --xcw-soft-white: #EEEFF2; --xcw-line: rgba(255,255,255,.08); --xcw-fees: #1A9CFC;
	/* The same green the prices hub uses for a rise (.prc-chg.is-up), so a gain is
	   one colour across the site rather than a new one invented per component. */
	--xcw-gain: #3ad68b;
	--xcw-display: 'Saira', system-ui, sans-serif; --xcw-body: 'Inter', system-ui, sans-serif;

	box-sizing: border-box; width: 100%; max-width: 536px;
	display: flex; flex-direction: column; gap: 12px;
	background: rgba(31,36,45,.5);
	backdrop-filter: blur(14px);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 24px; padding: 24px;
	/* liquid-glass card: outer lift + a faint inner top edge to catch the light, per the design's GLASS effect */
	box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 60px -20px rgba(0,0,0,.6);
	color: var(--xcw-off-white); font-family: var(--xcw-body);
	position: relative;
	/* reserve height so hydration causes no layout shift */
	min-height: 420px;
}
.xcw *, .xcw *::before, .xcw *::after { box-sizing: border-box; }

/* tabs */
/* Optional caption where the tabs would be — Figma 1082:3655 ("Convert crypto"). */
.xcw__title { margin: 0; font-family: var(--xcw-display); font-weight: 700; font-size: 18px; line-height: 1; color: var(--xcw-off-white); }
/* Optional helper line under the fields — Figma 1082:3680. */
.xcw__note { margin: 0; font-family: var(--xcw-body); font-size: 12px; line-height: 1.25; color: var(--xcw-slate); }

/* Optional preset-amount chips — Figma 1087:6836. Same pill geometry as the
   site's .xc-pills row (40px tall, 21.5px radius, slate border), redefined here
   because the widget ships its own stylesheet and can't depend on that one. */
.xcw__amounts { display: flex; flex-wrap: wrap; gap: 12px; }
.xcw__amount-chip {
	display: inline-flex; align-items: center; justify-content: center;
	/* 14px, not the site pill's 20px: T9 puts six chips in a 452px-wide card and
	   the frame keeps them on one row. */
	box-sizing: border-box; min-height: 40px; padding: 0 14px;
	border: 1px solid var(--xcw-slate); border-radius: 21.5px; background: transparent;
	font-family: var(--xcw-display); font-weight: 700; font-size: 16px; line-height: 1;
	color: var(--xcw-soft-white); cursor: pointer; white-space: nowrap;
}
.xcw__amount-chip:hover { border-color: var(--xcw-bright-blue); background: rgba(26,156,252,.1); }
.xcw__amount-chip.is-active { border-color: var(--xcw-bright-blue); background: rgba(26,156,252,.16); color: var(--xcw-off-white); }

.xcw__tabs { display: flex; gap: 6px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); padding: 4px; border-radius: 999px; width: fit-content; }
.xcw__tab { font-family: var(--xcw-display); font-weight: 700; font-size: 14px; padding: 12px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--xcw-slate); cursor: pointer; line-height: 1; }
.xcw__tab.is-active { background: var(--xcw-true-blue); color: #fff; }

/* "Paying with: X · Change" row — replaces the Buy/Sell tabs when the widget
   is method-locked (see template-parts/crypto-widget.php's method_label). */
.xcw__paying-with {
	order: -2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	font-family: var(--xcw-body); font-size: 14px; color: var(--xcw-slate);
}
.xcw .xcw__paying-with a { color: var(--xcw-bright-blue); font-weight: 600; text-decoration: none; }
.xcw .xcw__paying-with a:hover { text-decoration: underline; }

/* Payment-method switcher — the same row as a real dropdown (T2/T3, when the
   caller passes `methods`). Figma 415:15860 (D) / 415:15870 (M): a field-styled
   52px row (p-17, r-14, bg rgba(0,0,0,.3), 1px rgba(255,255,255,.05)) with the
   "Change ⌄" affordance on the right. z-index 2 so it paints ABOVE
   .xcw__loading — switching method is pure navigation and must stay usable even
   if the rate API never resolves and the spinner overlay sticks. */
.xcw__pm { order: -2; position: relative; z-index: 2; }
.xcw__pm-btn {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	width: 100%; padding: 17px; cursor: pointer; text-align: left;
	background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); border-radius: 14px;
	color: var(--xcw-off-white);
}
.xcw__pm-btn:hover { background: rgba(0,0,0,.42); }
.xcw__pm-label {
	font-family: var(--xcw-body); font-weight: 400; font-size: 14px; line-height: 1.25;
	color: var(--xcw-off-white);
	min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.xcw__pm-cta { display: inline-flex; align-items: center; gap: 4px; flex: none; font-family: var(--xcw-display); font-weight: 700; font-size: 16px; line-height: 1; color: var(--xcw-bright-blue); }
.xcw__pm-caret { width: 16px; height: 16px; transition: transform .18s ease; }
.xcw__pm-btn[aria-expanded="true"] .xcw__pm-caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .xcw__pm-caret { transition: none; } }

/* Country switcher (T4) — the same row, with a flag ahead of the label, so the
   trigger's left side becomes a flex pair instead of a bare span. Figma 891:4318. */
.xcw__pm-main { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.xcw__flag {
	flex: none; width: 22px; height: 16px; border-radius: 3px;
	background-size: cover; background-position: center;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
/* Narrow screens: "You're in: United Kingdom · GBP" + "Change" doesn't fit on
   one line, and ellipsising it hides the currency — which is the whole point
   of the row. Let it wrap instead and the row grows by one line. */
@media (max-width: 560px) {
	.xcw__pm--country .xcw__pm-label {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
	}
	.xcw__pm--country .xcw__pm-btn { align-items: flex-start; }
	.xcw__pm--country .xcw__pm-cta { padding-top: 2px; }
}
/* No country list passed: the row is a plain div, not a menu trigger. */
.xcw__pm-btn--static { cursor: default; }
.xcw__pm-btn--static:hover { background: rgba(0,0,0,.3); }
/* (0,2,0) — a bare .xcw__pm-cta loses to xcoins-pages.css's `.xcoins-main a`
   (0,1,1) on virtual pages and renders dim blue-on-blue. Same fight as .xcw__cta. */
.xcw a.xcw__pm-cta { text-decoration: none; color: var(--xcw-bright-blue); }
.xcw a.xcw__pm-cta:hover { text-decoration: underline; }
/* NOTE: the method menu's own rules (.xcw__menu--method, .xcw__opt--pm) live
   with the other dropdown rules further down — they override same-specificity
   base rules, so they must come AFTER them in source order. */

/* fields */
.xcw__field { background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); border-radius: 14px; padding: 16px; }
.xcw__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xcw__field-main { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.xcw__field label { display: block; font-family: var(--xcw-body); font-weight: 400; font-size: 14px; line-height: 18px; letter-spacing: 2px; text-transform: uppercase; color: var(--xcw-slate); }
.xcw__amount-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; width: 100%; min-width: 0; }
.xcw__amount { width: 100%; height: 24px; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--xcw-off-white); font-family: var(--xcw-display); font-weight: 800; font-size: 24px; line-height: 24px; padding: 0; }
.xcw__amount-wrap .xcw__amount { flex: 1 1 80px; width: auto; min-width: 80px; }
/*
 * THE BADGE HUGS THE NUMBER, and that is the whole reason this rule exists.
 *
 * Figma 864:6291 puts the ✓ pill 10px after the last digit and leaves the rest of
 * the row empty before the currency chip — the badge is a caption on the figure,
 * not a second item on a toolbar. With the input still `flex: 1 1 80px` it eats
 * every spare pixel and lands the pill against the chip instead, ~150px away from
 * the number it describes.
 *
 * So the input stops growing and is sized to its VALUE. `field-sizing: content`
 * does that natively and exactly; where it is unsupported, crypto-widget.js keeps
 * the `size` attribute in step with the value (sizeAmountFields()), which is the
 * pre-field-sizing way to say the same thing and is accurate to about a character.
 * Both, deliberately: one is exact, the other is universal.
 *
 * Scoped to `.has-fees` — only the field showing the badge — so the OTHER box
 * keeps a full-width input and its whole row stays clickable. That box is the one
 * the visitor types in, and shrinking its hit area to the width of the digits
 * already in it would be a real loss for no design reason.
 *
 * `flex-shrink: 1` with `min-width: 0`: flexbox wraps the badge to its own line
 * before it shrinks anything (which is what the mobile frame 864:7031 draws), so
 * the number is only ever squeezed when it could not fit a line of its own.
 */
.xcw__amount-wrap.has-fees .xcw__amount { flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; field-sizing: content; }
.xcw__amount::-webkit-outer-spin-button, .xcw__amount::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* currency selector */
.xcw__sel { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.06); border: 0; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--xcw-off-white); cursor: pointer; font-family: var(--xcw-body); white-space: nowrap; }
.xcw__sel[disabled] { cursor: default; opacity: .9; }
.xcw__sel-icon { width: 20px; height: 20px; border-radius: 50%; display: block; }
.xcw__sel-caret { width: 10px; height: 6px; opacity: .7; }

/* Sell mode: the coin field is what you're giving up, so it visually moves
   above the swap button (fiat field moves below) — the fiat/coin SELECTOR
   inside each field never moves (.xcw__sel--fiat/.xcw__sel--coin stay put in
   markup+JS), only field position changes. `.xcw` children default to flex
   `order: 0`, so bracket the reordered pair with explicit orders: tabs always
   first, the rate/error/CTA/footnote/loading group always last, regardless
   of mode — otherwise, in sell mode, .xcw__field--receive's order:-1 would
   sort it ABOVE .xcw__tabs (also order 0) instead of just above the swap
   button, and .xcw__field--spend's order:1 would sort it BELOW the (order 0)
   trailing group instead of just below the swap button. */
.xcw__title { order: -3; }
.xcw__tabs { order: -2; }
/* Between the two fields and the live-rate bar, in both modes: order 1 ties with
   .is-sell's spend field, and DOM order (this note is written after both fields)
   settles the tie the right way round. */
.xcw__amounts, .xcw__note { order: 1; }
.xcw__rate, .xcw__error, .xcw__cta, .xcw__foot, .xcw__loading { order: 2; }
.xcw.is-sell .xcw__field--spend { order: 1; }
.xcw.is-sell .xcw__field--receive { order: -1; }

/*
 * Calculator order — the coin field on top, no visible labels (Figma 1082:2592 /
 * 1087:5608). Same ordering as .is-sell, but a separate class because
 * crypto-widget.js owns .is-sell and rewrites it from the mode on every render.
 * The labels are hidden rather than removed: the <label> elements stay in the DOM
 * and the amount inputs carry their own aria-labels.
 */
.xcw--crypto-first .xcw__field--spend { order: 1; }
.xcw--crypto-first .xcw__field--receive { order: -1; }

.xcw--crypto-first .xcw__field label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* swap */
/* Negative block margin pulls the ⇅ button toward both fields. The card is a
   flex column with `gap: 12px`, which put 12px above AND below a 34px control —
   more air than the pair of fields it sits between needs. -6px each side halves
   it without touching the gap every other child relies on. */
.xcw__swap { display: flex; justify-content: center; position: relative; z-index: 1; margin-block: -6px; }
.xcw__swap-btn { width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); color: var(--xcw-bright-blue); font-size: 14px; cursor: pointer; display: grid; place-items: center; }

/* rate bar */
.xcw__rate { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); border-radius: 14px; font-size: 12px; color: #cfd6e2; min-height: 60px; }
.xcw__rate-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xcw__rate-text { font-family: var(--xcw-display); font-weight: 700; font-size: 18px; color: var(--xcw-off-white); }

/* "All inclusive, net delivery" pill — sits in .xcw__amount-wrap beside the
   received amount (see template-parts/crypto-widget.php). Lives in this block
   rather than next to the amount-field rules because the fee colour and the ✓
   are the same vocabulary as the .xcw__fees-box summary further down.

   9px, smaller than the 12px summary it shares that vocabulary with: this
   sentence is three times the length of the old "All fees included" and has to
   sit BESIDE a 24px amount inside the field, where the summary has a row of its
   own. `line-height` stays 16px on purpose — the pill keeps its 24px height, so
   dropping the type moves nothing else in the card. */
.xcw__fees { display: inline-flex; align-items: center; gap: 5px; flex: none; font-family: var(--xcw-body); font-size: 9px; line-height: 16px; font-weight: 600; color: var(--xcw-fees); background: rgba(26,156,252,.10); border: 1px solid rgba(26,156,252,.30); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.xcw__fees::before { content: "\2713"; }
/* An author `display` declaration beats the UA stylesheet's `[hidden] { display:
   none }`, so without this the badge would be marked hidden in sell mode and stay
   on screen — the same trap .xcw__gw[hidden] documents below. */
.xcw__fees[hidden] { display: none; }

/* 15s refresh countdown ring */
.xcw__count { position: relative; width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; }
.xcw__count svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.xcw__count-bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 3; }
.xcw__count-fg { fill: none; stroke: var(--xcw-bright-blue); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.xcw__count-num { position: relative; font-family: var(--xcw-display); font-weight: 700; font-size: 12px; color: var(--xcw-off-white); }
@media (prefers-reduced-motion: reduce) { .xcw__count-fg { transition: none; } }

/* cta */
/* `.xcw .xcw__cta` (not just `.xcw__cta`): on virtual T1-T4 pages, `xcoins-pages.css`
   has `.xcoins-main a { color: var(--bright-blue) }` at (0,1,1) — a single-class
   rule here loses that fight and the CTA text renders dim blue instead of white. */
.xcw .xcw__cta { display: block; width: 100%; padding: 16px 24px; text-align: center; background: var(--xcw-true-blue); color: #fff; border: 0; border-radius: 999px; font-family: var(--xcw-display); font-weight: 700; font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer; }
.xcw .xcw__cta:hover { background: #0146b0; }
.xcw__foot { margin: 0; font-family: var(--xcw-body); font-size: 12px; line-height: 15px; color: var(--xcw-slate); text-align: center; }
.xcw__error { margin-top: 10px; font-size: 12px; color: #ff6b6b; text-align: center; }

/* dropdown menus */
.xcw__sel-wrap { position: relative; }
/* No inner scroll: the menus size to their content (was max-height 260px +
   overflow-y auto, which put a scrollbar inside the glass card). Nothing is ever
   hidden behind an invisible scroll — a menu taller than the viewport is reached
   by scrolling the PAGE, since it's absolutely positioned in normal flow.
   Revisit if the Matrix ever grows to dozens of coins/fiats. */
.xcw__menu { position: absolute; right: 0; z-index: 30; margin-top: 6px; min-width: 240px; background: var(--xcw-dark-grey); border: 1px solid var(--xcw-line); border-radius: 12px; padding: 6px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.7); }
.xcw__opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: transparent; border: 0; border-radius: 8px; color: var(--xcw-off-white); font-size: 13px; cursor: pointer; text-align: left; }
.xcw__opt:hover { background: rgba(255,255,255,.06); }
.xcw__opt img { border-radius: 50%; flex-shrink: 0; }

/* Payment-method menu (see .xcw__pm above). Full-width under its trigger, which
   spans the card — unlike the fiat/coin menus that hang off a small chip. */
.xcw__menu--method { left: 0; right: 0; min-width: 0; }
/* `.xcw a.xcw__opt` (0,2,1): the method items are links, and on virtual T1-T4
   pages xcoins-pages.css has `.xcoins-main a { color: var(--bright-blue) }` at
   (0,1,1) — the same fight the .xcw__cta comment describes. */
.xcw a.xcw__opt { text-decoration: none; color: var(--xcw-off-white); }
.xcw a.xcw__opt:hover, .xcw a.xcw__opt:focus-visible { background: rgba(255,255,255,.06); color: var(--xcw-off-white); }
.xcw a.xcw__opt[aria-current="true"] { background: rgba(26,156,252,.12); color: var(--xcw-bright-blue); }
/* Payment logos are wide and not round (unlike coin/fiat icons) — don't clip
   them to a circle, and letterbox them inside the 20px box. */
.xcw__opt--pm img { border-radius: 0; object-fit: contain; }

/* Country menu: two columns on desktop — the active-country list is long
   enough that a single column runs off the bottom of the viewport.
   `:not([hidden])` is load-bearing: the closed state relies on the `hidden`
   ATTRIBUTE, whose `display:none` comes from the UA sheet — any author
   `display` here wins outright and the menu renders permanently open. */
.xcw__menu--country:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
@media (max-width: 480px) { .xcw__menu--country:not([hidden]) { grid-template-columns: 1fr; } }
.xcw__opt--country span:not(.xcw__flag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* loading / busy */
.xcw__loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(17,22,32,.6); border-radius: 24px; }
.xcw.is-ready .xcw__loading { display: none; }
.xcw__spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--xcw-bright-blue); border-radius: 50%; animation: xcw-spin .8s linear infinite; }
.xcw.is-busy .xcw__rate-text { opacity: .5; }
@keyframes xcw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .xcw__spinner { animation: none; } }

/* modal (native <dialog>) */
.xcw-dialog { border: 0; background: transparent; padding: 0; max-width: 460px; width: 92vw; color: inherit; }
.xcw-dialog::backdrop { background: rgba(8,12,20,.7); backdrop-filter: blur(4px); }
.xcw-dialog .xcw { max-width: none; }

/* mobile design: outer card border is a touch more subtle (0.08 vs desktop's 0.1) */
@media (max-width: 880px) {
	.xcw { border-color: rgba(255,255,255,.08); }
	/* glass-border glint (mirrors the .glass-border class on the homepage USP cards): directional corner highlights over the flat border — bright top-left (direct light), softer bottom-right (refraction). */
	.xcw::before {
		content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
		background:
			radial-gradient(circle at 0% 0%, rgba(255,255,255,.32) 0%, rgba(255,255,255,.32) 3%, rgba(255,255,255,.14) 45%, transparent 52%),
			radial-gradient(circle at 100% 100%, rgba(255,255,255,.4) 3%, rgba(255,255,255,.16) 43%, transparent 46%),
			linear-gradient(135deg, rgba(249,253,255,.12) 50%, rgba(249,253,255,.14) 50%, rgba(249,253,255,.22) 100%);
		-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
		-webkit-mask-composite: xor;
		mask-composite: exclude;
	}
}
.xcw-dialog__close { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--xcw-line); background: var(--xcw-dark-grey); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
.xcw-trigger { font-family: 'Saira', system-ui, sans-serif; font-weight: 700; font-size: 15px; padding: 12px 24px; border-radius: 999px; border: 0; background: #015ADF; color: #fff; cursor: pointer; }

/* ---------------------------------------------------------------------------
   Payment-method row + fee disclosure (buy only)

   Both ship in template-parts/crypto-widget.php, not built by JS, so the widget
   reserves their height up front and never shifts when it hydrates or when a
   quote lands. These rules therefore describe markup that is already on screen
   before any script runs.

   `order: 1` groups them with .xcw__amounts / .xcw__note — after both amount
   fields, before the live-rate bar (order 2). The tie with .is-sell's spend
   field is settled by DOM order, and these sit later in the markup, which is
   the right way round. See the ordering note above.
--------------------------------------------------------------------------- */
.xcw__gw, .xcw__fees-box { order: 1; }
/* Both set `display` below, and an author display declaration beats the UA
   stylesheet's `[hidden] { display: none }` — so hiding them from JS marked them
   hidden without hiding them, and sell mode kept showing a "Pay with" row and a
   buy fee breakdown that do not apply to selling. Higher specificity, so order
   in the file is not what saves it. */
.xcw__gw[hidden], .xcw__fees-box[hidden] { display: none; }

/* No caption row: each segment names itself ("Xcoins Balance - ACH Deposit"), so a
   "Pay with" label above them repeated the obvious and cost the widget a line of
   height inside heroes whose floor is sized to its tallest state. */
.xcw__gw { position: relative; padding: 8px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); border-radius: 14px; }

/* One control with two states, so the track is the border and the selected
   segment is what is filled — a pair of separate buttons would read as two
   actions rather than one setting. */
.xcw__pay { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: rgba(0,0,0,.25); border: 1px solid var(--xcw-line); border-radius: 999px; }
/* Only one side on offer (no internal gateway outside the US) is not a choice, so
   the group collapses to a single full-width segment rather than leaving a dead
   half. A class rather than `:has(> [hidden])` — the script already knows which
   sides it dropped, and `:has` is unsupported in Firefox before 121, where the
   dead half would be exactly the bug this rule exists to prevent. */
.xcw__pay--single { grid-template-columns: 1fr; }
.xcw__pay-opt[hidden] { display: none; }
/* 11px: these are phrases, not words. At the 13px the old control used, "Xcoins
   Balance - ACH Deposit" does not fit its half of a 452px card, and the widget
   also renders at ~340px on mobile. Line-height is tight for the same reason —
   two lines still have to sit inside a 999px pill without bloating it. */
.xcw__pay-opt { min-width: 0; padding: 7px 8px; background: transparent; border: 0; border-radius: 999px; color: #cfd6e2; font-family: var(--xcw-body); font-size: 11px; line-height: 14px; text-align: center; cursor: pointer; transition: background .15s ease, color .15s ease; }
.xcw__pay-opt:hover:not([aria-checked="true"]) { background: rgba(255,255,255,.06); color: var(--xcw-off-white); }
.xcw__pay-opt[aria-checked="true"] { background: rgba(26,156,252,.16); color: var(--xcw-bright-blue); font-weight: 600; }
/* The pill is the focus ring — an outline inside a rounded segment draws a
   rectangle through it. Same fix the 404 search field needed. */
.xcw__pay-opt:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--xcw-bright-blue); }

/* Ships CLOSED, so the fee rows cost no height until asked for — and expanding
   is user-initiated, which CLS excludes.

   Same container treatment as .xcw__gw above it, so the two read as one pair of
   controls rather than a box followed by loose text. The PADDING lives on the
   summary, not on this box: <summary> is the click target, and padding here
   would leave a dead border of box that looks pressable and is not. */
.xcw__fees-box { background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.05); border-radius: 14px; }
.xcw__fees-toggle { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 13px; list-style: none; cursor: pointer; font-family: var(--xcw-body); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--xcw-fees); }
.xcw__fees-toggle:hover { background: rgba(255,255,255,.04); }
/* Square off the bottom corners once open, so the highlight does not round away
   from the rows it now sits on top of. */
.xcw__fees-box[open] .xcw__fees-toggle { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Safari still paints the default triangle without this. */
.xcw__fees-toggle::-webkit-details-marker { display: none; }
.xcw__fees-toggle::before { content: "\2713"; }
.xcw__fees-toggle::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.xcw__fees-box[open] .xcw__fees-toggle::after { transform: rotate(-135deg) translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .xcw__fees-toggle::after { transition: none; } }
.xcw__fees-toggle:focus-visible { outline: 2px solid var(--xcw-bright-blue); outline-offset: 2px; border-radius: 4px; }

/* In flow, directly under the toggle — the panel is part of the box, and the
   card grows ~59px when it opens.

   That growth is absorbed by the hero, not by the card: every hero the widget
   sits in carries a min-height sized to its OPEN state, so the section itself
   never resizes and the background art never re-crops. Each of those floors is
   commented where it lives. If a third fee row is ever added, they all need
   raising — the alternative was floating this panel over the live-rate bar,
   which kept the card fixed but hid the rate while it was open. */
.xcw__sum { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.05); }
.xcw__sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.xcw__sum-k { min-width: 0; font-family: var(--xcw-body); font-size: 12px; line-height: 16px; color: #cfd6e2; }
/* tabular-nums so a changing figure never re-measures the row. */
.xcw__sum-v { flex: none; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--xcw-body); font-size: 12px; line-height: 16px; color: var(--xcw-off-white); }


/* A gain, not a charge — green, and the value carries a leading "+" written by the
   script. Last row, and deliberately not summed with the fees above it: those are
   what the quote costs, this is what the visitor's tier gives back on top. */
.xcw__sum-row--bonus .xcw__sum-k,
.xcw__sum-row--bonus .xcw__sum-v { color: var(--xcw-gain); font-weight: 600; }
.xcw__sum-row--bonus[hidden] { display: none; }

.xcw.is-busy .xcw__sum { opacity: .5; }

@media (max-width: 480px) {
	.xcw__gw { gap: 6px; }
	.xcw__pay-opt { padding-inline: 6px; }
}
