/* Portfolio: the statement. Bitcoin totalled first (lead figure and an allocation meter), then the
   wallet ledger beside the wallet's Series Notes positions. Loaded after board.css, so it owns the page.
   Balances flip in place when a pushed snapshot changes them; rows never move. */

.panel.pf-workspace { display: block; min-width: 0; padding: 0; background: var(--ground-fill); border-radius: 0; }
.pf-workspace[hidden], .pf-workspace [hidden] { display: none !important; }
.pf-workspace ::selection, .pf-action ::selection { color: var(--text); background: var(--selection); }
.pf-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.pf-muted, .pf-meta, .pf-footnote { margin: 0; color: var(--text-muted); font-size: .8125rem; line-height: 1.55; }
.pf-numeric, #pf-count { font-family: var(--fontfam-term); font-variant-numeric: tabular-nums; }
.pf-workspace a { text-underline-offset: 3px; }
.pf-workspace :is(a, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.pf-workspace .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.pf-workspace .btn svg { flex: 0 0 16px; width: 16px; height: 16px; }
.pf-workspace .btn:focus-visible { border-color: var(--focus); outline: none; box-shadow: none; }
.pf-workspace .btn:disabled { opacity: .45; cursor: not-allowed; }
.pf-workspace .pf-primary { background: var(--positive); border-color: var(--positive); color: var(--on-positive); font-weight: 600; }
.pf-workspace .pf-primary:hover:not(:disabled) { background: var(--positive-soft); border-color: var(--positive-soft); }
.pf-workspace a, .pf-workspace button, .pf-workspace summary { transition: color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out; }

/* ---------- Head: Bitcoin as the lead figure ---------- */
.pf-lead { display: grid; justify-items: end; gap: 6px; text-align: right; }
.pf-lead-label { font: var(--colhead); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pf-lead-figure { display: flex; align-items: baseline; gap: 8px; font-weight: 400; }
#pf-btc-total { white-space: nowrap; font-family: var(--font-display); font-stretch: 72%; font-weight: 600; font-size: 3.5rem; line-height: .9; letter-spacing: -.01em; font-feature-settings: "tnum" 1, "lnum" 1; color: var(--positive); }
#pf-btc-total i { display: inline-block; font-style: normal; }
.pf-lead-unit { font: 500 .8125rem/1 var(--fontfam-term); color: var(--text-soft); }
.pf-lead-note { font: 400 .75rem/1.4 var(--fontfam-term); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.pf-lead[data-stale="true"] #pf-btc-total { text-decoration: underline dotted var(--network-label); text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* ---------- Where your Bitcoin is ---------- */
.pf-allocation { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); align-items: center; gap: 20px 48px; padding: 24px var(--pane-x) 26px; border-top: 1px solid var(--terminal-rule); border-bottom: 1px solid var(--terminal-rule); }
.pf-allocation-copy h2 { margin: 0; font-family: var(--font-display); font-weight: 650; font-size: 1.125rem; line-height: 1.2; letter-spacing: -.01em; color: var(--text); }
.pf-allocation-copy p { margin: 6px 0 0; max-width: 46ch; color: var(--text-soft); font-size: .8125rem; line-height: 1.55; }
.pf-allocation-copy b { font-weight: 600; color: var(--text); }
.pf-allocation-copy a { color: var(--positive); }
.pf-allocation-copy a:hover { color: var(--positive-soft); }
.pf-meter { display: flex; height: 8px; overflow: hidden; background: var(--rule-strong); }
.pf-meter > i { display: block; flex: 0 0 auto; width: var(--w, 0%); height: 100%; transition: width 420ms cubic-bezier(.16, 1, .3, 1); }
.pf-meter > i + i { box-shadow: -2px 0 0 var(--ground); }
.pf-meter[data-empty="true"] { background: repeating-linear-gradient(90deg, var(--rule-strong) 0 6px, transparent 6px 10px); }
[data-part="native"] { --part: var(--rule-bright); }
[data-part="wrapped"] { --part: var(--text-soft); }
[data-part="collateral"] { --part: var(--positive); }
.pf-meter > i { background: var(--part); }
.pf-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; margin: 14px 0 0; }
.pf-legend > div { display: grid; gap: 4px; min-width: 0; }
.pf-legend dt { display: flex; align-items: center; gap: 8px; font: var(--colhead); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pf-legend dt::before { content: ''; flex: 0 0 8px; height: 8px; background: var(--part); }
.pf-legend dd { margin: 0; padding-left: 16px; font-family: var(--font-display); font-stretch: 72%; font-weight: 600; font-size: 1.5rem; line-height: 1.05; font-feature-settings: "tnum" 1, "lnum" 1; color: var(--text); overflow-wrap: anywhere; }
.pf-legend [data-part="collateral"] dd { color: var(--positive); }

/* ---------- Statement: wallet | positions ---------- */
.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: stretch; gap: 0; max-width: none; margin: 0; padding: 0 var(--pane-x); font-size: .875rem; line-height: 1.5; }
/* Page-ID scoped: terminal.css flattens .pf-holdings with ID specificity (its :is() list holds #ad-proposal-detail). */
#portfolio-page.pf-workspace .pf-layout > .pf-holdings { min-width: 0; padding: 28px 40px 56px 0; border: 0; border-radius: 0; background: transparent; container-type: inline-size; }
.main-layout--page .pf-layout > .pf-reference { min-width: 0; padding: 28px 0 56px 40px; border: 0; border-left: 1px solid var(--terminal-rule); }
.pf-ledger-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; margin: 0 0 12px; }
.pf-holdings-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.pf-workspace :is(.pf-holdings-title h2, .pf-reference h2) { margin: 0; font-family: var(--font-display); font-stretch: 100%; font-weight: 650; font-size: 1.25rem; line-height: 1.15; letter-spacing: -.012em; color: var(--text); }
#pf-count { font: 400 .75rem/1.4 var(--fontfam-term); letter-spacing: 0; text-transform: none; color: var(--text-muted); }
#pf-status { display: inline-flex; align-items: center; gap: 8px; font: 400 .75rem/1.4 var(--fontfam-term); color: var(--text-muted); white-space: nowrap; }
#pf-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#pf-status[data-state="stale"] { color: var(--network-label); }

.pf-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 20px; padding: 0 0 18px; }
.pf-search { position: relative; display: block; }
.pf-search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.pf-workspace input:not([type="checkbox"]), .pf-action input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--terminal-control); color: var(--text); font: inherit; font-size: .875rem; caret-color: var(--positive); transition: border-color 160ms ease-out; }
.pf-workspace input:not([type="checkbox"]):hover, .pf-action input:hover { border-color: var(--rule-bright); }
.pf-workspace input:not([type="checkbox"]):focus-visible, .pf-action input:focus-visible { border-color: var(--positive); outline: none; box-shadow: none; }
.pf-workspace #pf-search { padding-left: 40px; }
.pf-workspace input::placeholder, .pf-action input::placeholder { color: var(--text-muted); opacity: 1; }
.pf-zero { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text-soft); font-size: .8125rem; cursor: pointer; white-space: nowrap; }
.pf-zero input { position: absolute; left: 0; top: 50%; width: 34px; height: 20px; margin: -10px 0 0; opacity: 0; cursor: pointer; z-index: 1; }
.pf-switch { position: relative; flex: 0 0 34px; height: 20px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--terminal-inset); transition: background-color 160ms ease-out, border-color 160ms ease-out; }
.pf-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); transition: left 200ms cubic-bezier(.16, 1, .3, 1), background-color 160ms ease-out; }
.pf-zero input:checked + .pf-switch { border-color: rgb(var(--positive-rgb) / .5); background: rgb(var(--positive-rgb) / .12); }
.pf-zero input:checked + .pf-switch::after { left: 17px; background: var(--positive); }
.pf-zero input:focus-visible + .pf-switch { outline: 2px solid var(--focus); outline-offset: 2px; }
.pf-zero:hover { color: var(--text); }
.pf-add { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 18px 0 20px; border-top: 1px solid var(--terminal-rule); }
.pf-add label { display: grid; flex: 1; gap: 8px; min-width: 220px; font-size: .8125rem; color: var(--text-soft); }
.pf-add input { font-family: var(--fontfam-term) !important; }
#pf-add-error { width: 100%; margin: 0; color: var(--danger); }
#pf-add-error:empty { display: none; }

.pf-columns, .pf-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 184px; column-gap: 24px; }
/* The ledger hangs 14px past the column so a row's rules span exactly as far as its hover and open fills. */
.pf-columns { margin-inline: -14px; padding: 0 14px 10px; border-bottom: 1px solid var(--rule-strong); font: var(--colhead); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pf-columns span:nth-child(2) { text-align: right; }
.pf-row { position: relative; align-items: center; min-height: 80px; margin: 0 -14px; padding: 14px; border-bottom: 1px solid var(--terminal-rule); scroll-margin-block: 16px; transition: background-color 200ms ease-out; }
.pf-row:hover { background: var(--terminal-inset); }
.pf-row:last-child { border-bottom: 0; }
.pf-row[data-open="true"] { background: var(--terminal-control); box-shadow: -2px 0 0 var(--positive); }
.pf-identity { display: grid; justify-items: start; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.pf-symbol { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.pf-symbol strong { font-family: var(--font-display); font-weight: 650; font-size: 1.125rem; line-height: 1.1; letter-spacing: -.01em; color: var(--text); }
.pf-asset-kind { padding: 2px 6px; border: 1px solid var(--rule-strong); border-radius: 3px; font: var(--colhead); letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); }
.pf-asset-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.pf-asset-meta .pf-muted { font-size: .75rem; }
.pf-asset-meta .aera-address { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: var(--text-muted); }
.pf-balance { display: grid; grid-template-rows: auto 18px; justify-items: end; gap: 4px; min-width: 0; text-align: right; }
.pf-amount { display: block; max-width: 100%; overflow-x: auto; overflow-y: hidden; box-sizing: border-box; padding: 0 0 2px; white-space: nowrap; font-family: var(--font-display); font-stretch: 72%; font-weight: 600; font-size: 2rem; line-height: 1.05; letter-spacing: -.005em; font-feature-settings: "tnum" 1, "lnum" 1; color: var(--text); scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
.pf-amount i { display: inline-block; font-style: normal; }
.pf-amount:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.pf-change { min-height: 18px; font: 400 .75rem/18px var(--fontfam-term); color: var(--text-muted); }
.pf-amount-hint { display: block; font-size: .75rem; white-space: nowrap; }
.pf-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.pf-workspace .pf-actions .btn { min-height: 40px; padding: 0 14px; }
.pf-actions [data-pf-action=wrap], .pf-actions [data-pf-action=unwrap], .pf-actions [data-balance-action=wrap], .pf-actions [data-balance-action=unwrap] { border-color: transparent; color: var(--text-soft); }
.pf-actions [data-pf-action=remove] { flex-basis: 100%; justify-content: flex-end; min-height: 32px !important; padding: 0 !important; border: 0; font-size: .75rem; color: var(--text-muted); }
.pf-actions > .pf-muted { flex-basis: 100%; text-align: right; font: 400 .75rem/1.4 var(--fontfam-term); color: var(--text-muted); }
#pf-updates { margin: 16px 0 0; overflow-wrap: anywhere; }
#pf-updates:empty { display: none; }
.pf-empty { padding: 40px 0; font-size: .875rem; line-height: 1.6; }
.pf-empty p { margin: 0; max-width: 48ch; color: var(--text-soft); }
.pf-loading { display: grid; gap: 20px; margin-top: 24px; }
.pf-loading span { display: block; width: 100%; height: 44px; background: var(--terminal-inset); }

/* ---------- Side column: positions, updates, scope ---------- */
.pf-reference > section + section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--terminal-rule); }
.pf-side-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pf-workspace .pf-sub { margin: 18px 0 8px; font: var(--colhead); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pf-position-note { margin: 0; font-size: .75rem; line-height: 1.5; color: var(--text-muted); }
.pf-state[data-state="idle"] { color: var(--text-muted); }
.pf-series-link { font-size: .75rem; color: var(--text-soft); }
.pf-series-link:hover { color: var(--positive-soft); }
#pf-positions-state { font: 400 .75rem/1.4 var(--fontfam-term); }
.pf-series { display: grid; }
.pf-series[data-stale="true"] dd { text-decoration: underline dotted; text-underline-offset: 4px; }
.pf-position { display: grid; gap: 12px; margin: 0; padding: 16px 0 18px; border-top: 1px solid var(--terminal-rule); color: var(--text); text-decoration: none; transition: background-color 200ms ease-out; }
.pf-position:last-child { border-bottom: 1px solid var(--terminal-rule); }
.pf-position:hover { background: var(--terminal-inset); box-shadow: -14px 0 0 var(--terminal-inset), 14px 0 0 var(--terminal-inset); }
.pf-position-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-position-head strong { font-family: var(--font-display); font-weight: 650; font-size: 1.0625rem; letter-spacing: -.01em; }
.pf-state { display: inline-flex; align-items: center; gap: 6px; font: var(--colhead); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.pf-state::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pf-state[data-state="active"] { color: var(--positive); }
.pf-position dl { display: grid; gap: 6px; margin: 0; }
.pf-position dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pf-position dt { color: var(--text-soft); font-size: .8125rem; }
.pf-position dd { margin: 0; font: 400 .8125rem/1.5 var(--fontfam-term); font-variant-numeric: tabular-nums slashed-zero; text-align: right; overflow-wrap: anywhere; }
.pf-position-go { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; color: var(--positive); }
.pf-position-go svg { position: relative; left: 0; width: 15px; height: 15px; transition: left 200ms cubic-bezier(.16, 1, .3, 1); }
.pf-position:hover .pf-position-go svg { left: 4px; }
.pf-position:hover .pf-position-go { color: var(--positive-soft); }
.pf-positions-empty { display: grid; justify-items: start; gap: 16px; padding-top: 14px; border-top: 1px solid var(--terminal-rule); }
.pf-positions-empty p { max-width: 38ch; }

.pf-sync { position: relative; }
.pf-sync[data-quiet="true"] > h2, .pf-sync[data-quiet="true"] .pf-discovery-heading, .pf-sync[data-quiet="true"] .pf-progress { display: none; }
.pf-sync[data-quiet="true"] .pf-discovery { margin-top: 0; }
.main-layout--page .pf-reference > .pf-sync[data-quiet="true"] { margin-top: 8px; padding-top: 0; border-top: 0; }
.pf-discovery { display: grid; gap: 8px; min-width: 0; margin-top: 16px; }
.pf-discovery-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8125rem; color: var(--text-soft); }
#pf-coverage { font-size: .75rem; color: var(--text); }
.pf-progress { position: relative; height: 3px; background: var(--rule-strong); }
#pf-progress-fill { position: absolute; inset: 0; display: block; background: var(--text-soft); transform: scaleX(0); transform-origin: left center; transition: transform 240ms ease-out; }
.pf-discovery[data-state="synced"] #pf-progress-fill { background: var(--positive); }
.pf-discovery[data-state="paused"] #pf-progress-fill { background: var(--text-muted); }
.pf-discovery-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#pf-discovery-state { min-height: 18px; font-size: .75rem; line-height: 18px; }
#pf-discovery-state[data-gateway-notice="true"] { color: var(--network-label); }
.pf-sync-details > summary { box-sizing: border-box; display: flex; align-items: center; width: fit-content; min-height: 44px; padding: 0 2px; list-style: none; cursor: pointer; font-size: .8125rem; color: var(--text-soft); text-decoration: underline; text-decoration-color: var(--rule-bright); text-underline-offset: 4px; }
.pf-sync-details > summary::-webkit-details-marker { display: none; }
.pf-sync-details > summary:hover { color: var(--text); }
.pf-sync-popover { position: absolute; z-index: 30; bottom: calc(100% - 8px); right: 0; width: min(400px, calc(100vw - 48px)); max-height: min(440px, 55dvh); overflow: auto; box-sizing: border-box; padding: 22px; color: var(--text); }
.pf-sync-popover h2 { margin: 0 0 16px !important; font-size: 1rem !important; }
.pf-sync-popover dl { display: grid; gap: 16px; margin: 0; }
.pf-sync-popover dl > div { display: grid; gap: 4px; }
.pf-sync-popover dt { font-size: .75rem; color: var(--text-muted); }
.pf-sync-popover dd { margin: 0; font: .8125rem/1.5 var(--fontfam-term); overflow-wrap: anywhere; }
.pf-sync-popover p { margin: 16px 0 0; font-size: .8125rem; line-height: 1.6; color: var(--text-soft); overflow-wrap: anywhere; }
.pf-scope h2 { margin-bottom: 14px !important; }
.pf-wallet-line { display: grid; gap: 6px; margin-bottom: 16px; }
#pf-wallet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font: 400 .8125rem/1.5 var(--fontfam-term); }
#pf-wallet > .pf-muted { font-family: var(--font-sans, inherit); font-size: .75rem; }
.pf-scope .pf-footnote { margin: 0 0 10px; }

/* ---------- Disconnected ---------- */
.pf-workspace[data-connected="false"] .pf-layout { display: block; }
#portfolio-page.pf-workspace[data-connected="false"] .pf-layout > .pf-holdings { padding-right: 0; }
.pf-workspace[data-connected="false"] :is(.pf-ledger-heading, .pf-reference, .pf-toolbar, .pf-columns, .pf-allocation, .pf-lead) { display: none; }
/* Outranks the side column's narrow-screen grid, so it stays hidden at every width until connection. */
.pf-workspace[data-connected="false"] .pf-layout > .pf-reference { display: none; }
.pf-welcome { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; padding: 24px 0 64px; border-top: 1px solid var(--terminal-rule); }
.pf-welcome-intro { padding-top: 28px; }
.pf-welcome h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 650; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.015em; color: var(--text); }
.pf-welcome-intro > p { margin: 0; max-width: 40ch; color: var(--text-soft); font-size: 1.0625rem; line-height: 1.55; }
.pf-welcome .pf-primary { margin-top: 28px; min-height: 48px; padding: 0 20px; gap: 10px; font-size: .9375rem; }
.pf-rootstock-mark { display: inline-block; flex: none; width: 18px; height: 20px; background: currentColor; mask: url("/assets/fa8f72d73ef2796e7da4edf623f80c7c1a9d8a5a989a81200bf61cada955d539/rsk-logo-colour.svg") center / contain no-repeat; -webkit-mask: url("/assets/fa8f72d73ef2796e7da4edf623f80c7c1a9d8a5a989a81200bf61cada955d539/rsk-logo-colour.svg") center / contain no-repeat; }
.pf-welcome-details { align-self: start; margin: 0; padding-top: 28px; }
.pf-welcome-details > div { padding: 18px 0; border-bottom: 1px solid var(--terminal-rule); }
.pf-welcome-details > div:first-child { padding-top: 0; }
.pf-welcome-details dt { margin-bottom: 6px; font-size: .9375rem; font-weight: 600; color: var(--text); }
.pf-welcome-details dd { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--text-soft); }

/* ---------- Wallet dialogs (appended to the body; protected focus and the shared review) ---------- */
.pf-action-overlay { z-index: 12000; }
.pf-action { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; box-sizing: border-box; }
.pf-action h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 650; font-size: 1.375rem; letter-spacing: -.012em; }
.pf-action p { font-size: .875rem; line-height: 1.55; overflow-wrap: anywhere; color: var(--text-soft); }
.pf-action form { display: grid; gap: 16px; }
.pf-action label { display: grid; gap: 8px; font-size: .8125rem; color: var(--text-soft); }
.pf-action input[name="recipient"] { font-family: var(--fontfam-term); }
.pf-action input[name="amount"] { min-height: 64px; font-family: var(--font-display); font-stretch: 72%; font-weight: 600; font-size: 2rem; line-height: 1; font-feature-settings: "tnum" 1, "lnum" 1; }
.pf-action input[name="amount"]::placeholder { color: var(--rule-bright); }
.pf-amount-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -6px; }
.pf-action [data-available] { margin: 0; font: 400 .75rem/1.5 var(--fontfam-term); color: var(--text-muted); }
.pf-action [data-max] { flex-shrink: 0; min-height: 36px !important; font-size: .75rem; }
.pf-action .btn.pf-primary { background: var(--positive); border-color: var(--positive); color: var(--on-positive); font-weight: 600; }
.pf-action .btn.pf-primary:hover:not(:disabled) { background: var(--positive-soft); border-color: var(--positive-soft); }
.pf-action .btn.pf-primary:disabled { background: var(--terminal-control); border-color: var(--rule-strong); color: var(--text-muted); opacity: 1; }
.pf-action .btn { min-height: 44px; }
.pf-action [data-form-status] { margin: 0; color: var(--text-soft); }
.pf-action [data-form-status]:empty { display: none; }
.aera-review-overlay { z-index: 12010; }

/* ---------- Narrower workspaces ---------- */
@media (max-width: 1180px) {
  .pf-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  #portfolio-page.pf-workspace .pf-layout > .pf-holdings { padding-right: 32px; }
  .main-layout--page .pf-layout > .pf-reference { padding-left: 32px; }
}
@media (max-width: 960px) {
  .pf-allocation { grid-template-columns: minmax(0, 1fr); }
  .pf-layout { grid-template-columns: minmax(0, 1fr); }
  #portfolio-page.pf-workspace .pf-layout > .pf-holdings { padding: 24px 0 32px; }
  .main-layout--page .pf-layout > .pf-reference { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 32px; padding: 28px 0 48px; border-left: 0; border-top: 1px solid var(--terminal-rule); }
  .pf-reference > section + section { margin: 0; padding: 0; border: 0; }
  .pf-reference > .pf-positions { grid-column: 1 / -1; }
  .pf-welcome { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@container (max-width: 600px) {
  .pf-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .pf-search { grid-column: 1 / -1; }
  .pf-columns { display: none; }
  .pf-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; margin-inline: 0; padding: 16px 0; }
  .pf-actions > .pf-muted { flex-basis: auto; text-align: left; }
  .pf-row:first-child { border-top: 1px solid var(--terminal-rule); }
  .pf-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .pf-actions [data-pf-action=remove] { flex-basis: auto; }
  .pf-workspace input:not([type="checkbox"]) { font-size: 1rem; }
  .pf-add { flex-direction: column; align-items: stretch; }
  .pf-add label { min-width: 0; }
  .pf-amount { font-size: 1.75rem; }
}
@media (max-width: 960px) {
  .pf-lead { justify-items: start; text-align: left; }
}
@media (max-width: 760px) {
  #pf-btc-total { font-size: 2.75rem; }
}
@media (max-width: 600px) {
  .main-layout--page .pf-layout > .pf-reference { grid-template-columns: minmax(0, 1fr); }
  .pf-reference > section + section { padding-top: 24px; border-top: 1px solid var(--terminal-rule); }
  .pf-legend { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pf-legend > div { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .pf-legend dd { padding-left: 0; font-size: 1.25rem; text-align: right; }
  .pf-action input { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  #pf-progress-fill, .pf-meter > i, .pf-row, .pf-position, .pf-position-go svg, .pf-switch, .pf-switch::after, .pf-workspace a, .pf-workspace button, .pf-workspace summary, .pf-workspace input { transition: none; }
}
