/* The extension's pop-out and card line as the Coin Stroke final draws them (.claude/mockups/icon-system-a.html,
   commit 12300d2; owner decisions in .claude/research/icon-system-brief.md rounds 3 and 4). src/ does not draw this
   look yet, so process/ext-views.mjs writes the markup with the demo's figures and this file styles it, inside each
   piece's shadow root. Every colour, size and radius is a --sm-* name from assets/hero.css (the skin), never a literal.
   Activate is a solid outline, swap a dashed outline, a filled layer is what you have now, gold is maxxed only. */
:host { all: initial; display: block; font-family: var(--sm-font); font-size: var(--sm-text-md); line-height: 1.4; color: var(--sm-ink); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
p { margin: 0; }
svg { display: block; flex: none; overflow: visible; }
button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: inherit; }
.key { width: 16px; height: 16px; }

/* ---------- the grid card line (214px in the sheet; here the width of the card's mount) ---------- */
.cl { display: block; width: 100%; padding: var(--space-s6) var(--space-xs); border: 1px solid var(--sm-border); border-radius: var(--sm-radius-sm); background: var(--sm-surface); line-height: 1.3; }
.cl[aria-expanded="true"] { border-color: var(--sm-word); }
.cl-top { display: flex; align-items: center; gap: var(--space-s6); }
.cl-fig { font-size: var(--sm-text-lg); font-weight: 800; color: var(--sm-money); white-space: nowrap; }
.cl-lab { font-size: var(--sm-text-sm); font-weight: 700; color: var(--sm-money); white-space: nowrap; }
.cl-rows { display: grid; gap: var(--space-2xs); margin-top: var(--space-2xs); }
/* the count: muted while a step is left, money green once complete */
.cl-count { display: block; margin-top: var(--space-2xs); font-size: var(--sm-text-sm); font-weight: 700; line-height: 1.3; color: var(--sm-muted); }
.cl-count--done { color: var(--sm-money); }
.cl-st { display: flex; align-items: flex-start; gap: var(--space-s6); font-size: var(--sm-text-sm); font-weight: 700; line-height: 16px; }
.cl-st b { font-weight: 800; }
.cl-st--later { color: var(--sm-muted); font-weight: 600; }
.cl-fly { display: inline-flex; align-items: flex-start; color: var(--sm-money); font-weight: 800; line-height: 1; font-size: 26px; }
.cl-fly-d { font-size: 0.5em; margin: 0.1em 1px 0 0; }
.cl-fly-n { letter-spacing: -0.03em; }
.cl-fly-cb { display: flex; flex-direction: column; margin: 0.08em 0 0 var(--space-3xs); }
.cl-fly-c { font-size: 0.5em; }
.cl-fly-b { font-size: var(--sm-text-xs); font-weight: 700; margin-top: 1px; line-height: 1.1; }
.cl-wm { margin-top: var(--space-2xs); font-size: var(--sm-text-xl); font-weight: 900; font-style: italic; letter-spacing: -0.03em; line-height: 1; color: var(--sm-word); }

/* ---------- the pop-out ---------- */
.pop { width: 320px; border-radius: var(--sm-radius-lg); box-shadow: var(--sm-shadow-float); overflow: hidden; background: var(--sm-surface); }
.cap { background: var(--sm-brand); color: var(--sm-on-brand); padding: var(--space-sm) var(--space-s10) var(--space-sm) var(--space-sm); }
.cap-top { display: flex; align-items: center; gap: var(--space-xs); min-height: 20px; }
.cap-eyebrow { font-weight: 700; color: var(--sm-on-brand-muted); line-height: 1.35; }
.cap-close { margin-left: auto; color: var(--sm-on-brand); }
.cap-main { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s10); margin-top: var(--space-s6); }
.cap-amt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-s6); }
.cap-fig { font-size: var(--sm-text-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; color: var(--sm-money-on-brand); }
.cap-lab { font-size: var(--sm-text-lg); font-weight: 700; }
.cap-sub { font-weight: 700; }
.cap-next { display: flex; align-items: flex-start; gap: var(--space-xs); margin-top: var(--space-s10); font-size: var(--sm-text-lg); font-weight: 700; line-height: 1.35; }
.cap-next .keys { display: inline-flex; gap: var(--space-3xs); margin-top: var(--space-3xs); }
.cap-next b { font-weight: 800; }
.cap--maxxed .cap-fig { font-size: var(--sm-text-3xl); font-weight: 900; }
.cap-badge { margin-top: var(--space-s10); font-size: var(--sm-text-2xl); font-weight: 900; font-style: italic; letter-spacing: -0.03em; color: var(--sm-accent); }
.body { padding: var(--space-sm) var(--space-sm); }
.sec + .sec { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--sm-border); }
.sech { display: flex; align-items: flex-start; gap: var(--space-xs); font-size: var(--sm-text-lg); font-weight: 700; line-height: 20px; }
.sech .key { margin-top: 1px; }
.sech b { font-weight: 800; }
/* the swap heading's own figure column: the total after the best swap */
.sech--fig .sech-tx { flex: 1 1 auto; }
.sech-fig { flex: none; margin-left: auto; padding-left: var(--space-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sech .money { color: var(--sm-money); }
.src { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: var(--space-s10); align-items: start; padding: var(--space-xs) 0; }
.src + .src { border-top: 1px solid var(--sm-border); }
.nm { font-weight: 700; line-height: 1.35; }
.sub { font-size: var(--sm-text-sm); color: var(--sm-muted); }
.sub b { color: var(--sm-ink); font-weight: 800; }
.amt { display: grid; justify-items: end; gap: var(--space-2xs); font-weight: 800; white-space: nowrap; }
.amt--money { color: var(--sm-money); }
.btn { display: inline-grid; place-items: center; min-height: 32px; padding: 0 var(--space-sm); border-radius: var(--sm-radius-sm); background: var(--sm-btn-bg); color: var(--sm-btn-fg); font-weight: 700; white-space: nowrap; }
.btn--sec { background: transparent; color: var(--sm-ink); box-shadow: inset 0 0 0 1px var(--sm-border); }
.note { margin-top: var(--space-s6); font-size: var(--sm-text-sm); color: var(--sm-muted); }
.foot { margin-top: var(--space-sm); padding-top: var(--space-xs); border-top: 1px solid var(--sm-border); font-size: var(--sm-text-sm); color: var(--sm-muted); }
/* the 32px tiles: a category glyph, or the multiple. Filled grey = have now (green glyph); a solid ink edge = to
   activate; a dashed ink edge = a swap. Edge, fill and dash differ, so a state never rests on colour alone. */
.ct, .mt { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: var(--sm-radius-sm); }
.ct--act { background: var(--sm-sunk); border: 1.5px solid var(--sm-ink); color: var(--sm-ink); }
.ct--on { background: var(--sm-money-tint); color: var(--sm-money); }
.mt { grid-auto-flow: column; place-content: center; align-items: baseline; gap: 0; font-weight: 800; line-height: 1; }
.mt b { font-size: var(--sm-text-md); font-weight: 800; letter-spacing: -0.03em; }
.mt i { font-style: normal; font-size: var(--sm-text-xs); font-weight: 700; margin-left: 1px; }
.mt--have { background: var(--sm-money-tint); color: var(--sm-money); }
.mt--swap { background: var(--sm-sunk); border: 1.5px dashed var(--sm-ink); color: var(--sm-ink); }
/* the swap options: tile rows that lead with the total after the swap */
.swm { display: flex; align-items: center; gap: var(--space-2xs); margin: var(--space-2xs) 0 var(--space-xs) var(--space-lg); font-size: var(--sm-text-sm); line-height: 1.3; color: var(--sm-muted); }
.tip-i { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--sm-word); }
.opt { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: var(--space-s10); align-items: start; padding: var(--space-s10) 0; }
.opt + .opt { border-top: 1px solid var(--sm-border); }
/* the best row: a 1.5px cobalt frame with "Best" set into a gap in its top edge (src styles.ts .sm-opt--best) */
.opt--best { position: relative; margin: var(--space-xs) calc(var(--space-xs) * -1) var(--space-2xs); padding: var(--space-sm) var(--space-xs) var(--space-s10); border: 1.5px solid var(--sm-word); border-radius: var(--sm-radius-sm); }
.opt--best + .opt { border-top: 0; }
.opt-lbl { position: absolute; top: 0; left: var(--space-xs); transform: translateY(-50%); margin: 0; padding: 0 var(--space-2xs); background: var(--sm-surface); color: var(--sm-word); font-size: var(--sm-text-sm); font-weight: 800; line-height: 1.2; }
/* the swap's own value on the right, like the Activate row's amount, with its Swap button under it */
.opt-end { display: grid; justify-items: end; row-gap: var(--space-s6); text-align: right; }
.opt-val { margin: 0; font-size: var(--sm-text-md); font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
