/* ── Chainfax · the Simple view (night directive 2026-10-19) ──────────────────────────────────────────────
   Phone first (390), then two columns at 768 and three at 1440. Neon only: Simple uses the Neon palette of
   style.css and adds no theme of its own. No inline style anywhere (CSP style-src 'self'): sizes that depend on data
   (the bars) are set by app.js through the CSSOM. Tap targets are 44 px or more. */

/* the view switch, in the header at every width */
.viewswitch{ display:inline-flex; border:1px solid var(--border); border-radius:10px; overflow:hidden }
.viewswitch button{ background:none; border:0; border-right:1px solid var(--border); color:var(--ink-2); min-height:44px;
  padding:0 14px; font:inherit; font-size:13px; letter-spacing:.02em; cursor:pointer }
.viewswitch button:last-child{ border-right:0 }
.viewswitch button[aria-pressed=true]{ background:var(--surface); color:var(--ink); font-weight:700 }
header .asof{ font-family:var(--gs-mono) }
:root[data-layout=phone] header .viewswitch{ order:3 }
:root[data-layout=phone] header .asof{ order:4; flex:0 0 100% }

/* the frame a panel opens in: ← Simple above, See everything in Full below */
#simple{ padding:0 var(--gutter) }
.sp-frame-top{ display:flex; align-items:center; gap:var(--sp-3); flex-wrap:wrap; margin:var(--sp-2) 0 var(--sp-3) }
.sp-back{ display:inline-flex; align-items:center; min-height:44px; padding:0 14px; border:1px solid var(--border); border-radius:10px;
  color:var(--ink); text-decoration:none; font-family:var(--gs-mono); font-size:13px }
.sp-title{ margin:0; font-size:20px }
.sp-frame-foot{ padding:0 var(--gutter) var(--sp-4) }
.sp-seefull{ min-height:44px; padding:0 16px; border:1px solid var(--border); border-radius:10px; background:none; color:var(--ink);
  font:inherit; font-size:14px; cursor:pointer }
/* the one panel: Full's own section, alone; Focus's template folds its footnotes away (the receipt and the notes),
   and its "how this is measured" stays a closed fold */
:root[data-route=panel] main > :not(.sp-target){ display:none !important }
:root[data-route=panel] main{ padding-top:0 }
:root[data-route=panel] main .tk-basis, :root[data-route=panel] main .tk-rules, :root[data-route=panel] main .tk-note{ display:none }
:root[data-route=panel] main .sp-target .phead .pexp, :root[data-route=panel] main .sp-target .phead .psum{ display:none }
/* the frame's title is the panel's plain name (the approved v1.2 names); Full's own heading is not repeated under it */
:root[data-route=panel] main .sp-target .phead{ display:none }

/* ── U3 · room to trade: one control, both views ── */
.roomctl{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-2); margin:0 0 var(--sp-3) }
.roomctl .rt-label{ font-family:var(--gs-mono); font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-right:var(--sp-1) }
.roomctl .rt-opt{ min-width:56px; min-height:44px; padding:0 14px; border:1px solid var(--border); border-radius:10px; background:none; color:var(--ink-2);
  font-family:var(--gs-mono); font-size:14px; cursor:pointer }
.roomctl .rt-opt[aria-pressed=true]{ background:var(--surface); color:var(--ink); font-weight:700; border-color:color-mix(in srgb, var(--s1) 55%, var(--border)) }
#boardBody .lpm th.sel, #boardBody .lpm td.sel{ background:color-mix(in srgb, var(--s1) 9%, transparent) }

/* ── U4 · the screen, phone first ── */
#simple [hidden], #spFrameFoot[hidden]{ display:none !important }
#simple{ overflow-wrap:anywhere }
#simpleHome{ max-width:1180px; margin:0 auto; padding-bottom:var(--sp-4) }
/* 2 · the promise, and how to read this page (an inline expander, never an overlay) */
.sc-promise{ display:flex; align-items:flex-start; gap:var(--sp-2); margin:var(--sp-3) 0 var(--sp-2) }
.sc-promise-line{ margin:0; flex:1 1 auto; font-size:16px; line-height:1.45; color:var(--ink) }
.sc-q{ flex:0 0 auto; min-width:44px; min-height:44px; border:1px solid var(--border); border-radius:22px; background:none; color:var(--ink-2);
  font:inherit; font-size:16px; font-weight:700; cursor:pointer }
.sc-howto{ margin:0 0 var(--sp-3); padding:0 var(--sp-3); border:1px solid var(--border); border-radius:12px; background:var(--surface) }
.sc-howto-btn{ display:flex; align-items:center; width:100%; min-height:44px; padding:0; border:0; background:none; color:var(--ink);
  font:inherit; font-size:14px; font-weight:700; text-align:left; cursor:pointer }
.sc-howto-btn::after{ content:"\25BE"; margin-left:auto; color:var(--muted) }
.sc-howto-btn[aria-expanded=false]::after{ content:"\25B8" }
.sc-howto-body ul{ margin:0 0 var(--sp-2); padding-left:1.2em; color:var(--ink-2); line-height:1.5 }
.sc-howto-body li{ margin:0 0 6px }
.sc-gotit{ min-height:44px; margin:0 0 var(--sp-3); padding:0 16px; border:1px solid var(--border); border-radius:10px; background:none; color:var(--ink);
  font:inherit; cursor:pointer }
/* 3 · the six cards: one column on a phone, two at 768, three at 1440; a skeleton is a card's own size */
.sc-cards{ display:grid; grid-template-columns:minmax(0,1fr); gap:var(--sp-3); align-items:start; margin:0 0 var(--sp-4) }
@media (min-width:600px){ .sc-cards{ grid-template-columns:repeat(2, minmax(0,1fr)) } }
@media (min-width:1100px){ .sc-cards{ grid-template-columns:repeat(3, minmax(0,1fr)) } }
.sc-card{ min-width:0; min-height:180px; border:1px solid var(--border); border-left:3px solid var(--tok, var(--border)); border-radius:14px; background:var(--surface) }
.sc-card.skeleton{ border-left-color:var(--border); opacity:.55 }
.sc-main{ display:flex; flex-direction:column; align-items:stretch; gap:6px; width:100%; min-height:180px; padding:var(--sp-3); border:0; border-radius:14px;
  background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer }
.sc-main:focus-visible{ outline:2px solid var(--s1); outline-offset:-2px }
.sc-head{ display:flex; align-items:baseline; justify-content:space-between; gap:var(--sp-2) }
.sc-name{ font-size:14px; font-weight:600; color:var(--ink-2) }
.sc-sym{ flex:0 0 auto; font-family:var(--gs-mono); font-size:12px; letter-spacing:.08em; color:var(--tok-text, var(--muted)) }
.sc-price{ font-size:32px; line-height:1.15; font-weight:700; font-variant-numeric:tabular-nums }
.sc-line{ display:flex; align-items:baseline; gap:var(--sp-2); font-size:15px }
.sc-line .k{ color:var(--muted); font-size:12px }
.sc-card .spark{ height:44px; border-bottom:0; color:var(--tok-text, var(--ink-2)) }
.sc-nohist{ display:flex; align-items:center; min-height:44px; font-size:12px; color:var(--muted) }
.sc-room{ font-size:13px; color:var(--ink-2) }
.sc-more{ padding:0 var(--sp-3) var(--sp-3); border-top:1px solid var(--grid); font-size:13px; color:var(--ink-2) }
.sc-more p{ margin:var(--sp-2) 0 0 }
.sc-more .k{ color:var(--muted); font-family:var(--gs-mono); font-size:12px }
/* 4 · the one ratio card: a link into Ratios */
.sc-ratio{ display:flex; flex-direction:column; gap:6px; min-height:44px; margin:0 0 var(--sp-4); padding:var(--sp-3); border:1px solid var(--border); border-radius:14px;
  background:var(--surface); color:var(--ink); text-decoration:none }
.sc-ratio:focus-visible{ outline:2px solid var(--s1); outline-offset:-2px }
.sc-ratio .sr-line1{ font-size:22px; font-weight:700; font-variant-numeric:tabular-nums }
.sc-ratio .sr-end{ color:var(--tok-text) }
.sc-ratio .spark{ height:44px; border-bottom:0 }
.sc-ratio .sr-plain{ font-size:13px; color:var(--ink-2) }
/* 5 · the wallet: chips above one field; the result is a portfolio card */
.sc-h{ margin:0 0 var(--sp-2); font-size:16px }
.sc-wallet{ margin:0 0 var(--sp-4); padding:var(--sp-3); border:1px solid var(--border); border-radius:14px; background:var(--surface) }
.sw-chips{ display:flex; flex-wrap:wrap; gap:var(--sp-2); margin:0 0 var(--sp-2) }
.sw-chips:empty{ display:none }
.sw-chip{ display:inline-flex; max-width:100%; border:1px solid var(--border); border-radius:22px; overflow:hidden }
.sw-chip-go{ display:inline-flex; flex-direction:column; align-items:flex-start; justify-content:center; min-width:0; min-height:44px; padding:4px 12px; border:0;
  background:none; color:var(--ink); font:inherit; font-size:13px; text-align:left; cursor:pointer; overflow-wrap:anywhere }
.sw-chip-addr{ font-family:var(--gs-mono); font-size:11.5px; color:var(--muted) }
.sw-chip-x{ flex:0 0 auto; min-width:44px; min-height:44px; border:0; border-left:1px solid var(--border); background:none; color:var(--ink-2); font:inherit; font-size:18px; cursor:pointer }
.sw-saved-line{ margin:0 0 var(--sp-3); font-size:12px; color:var(--muted) }
.sw-form{ display:flex; flex-wrap:wrap; gap:var(--sp-2) }
.sw-form input{ flex:1 1 260px; min-width:0; min-height:44px; padding:0 12px; border:1px solid var(--border); border-radius:10px; background:var(--plane); color:var(--ink);
  font-family:var(--gs-mono); font-size:16px }
.sw-form select{ flex:1 1 200px; min-height:44px; max-width:100%; font-size:13px }
.sw-go{ flex:0 0 auto; min-height:44px; padding:0 20px; border:1px solid var(--s1); border-radius:10px; background:var(--s1); color:var(--plane); font:inherit; font-weight:700; cursor:pointer }
.sw-privacy{ margin:var(--sp-2) 0 var(--sp-3); font-size:12px; color:var(--muted) }
.sw-result .note{ margin:0; font-size:13px; color:var(--ink-2) }
.sw-card{ display:flex; flex-direction:column; gap:var(--sp-2) }
.sw-head{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:var(--sp-2) }
.sw-head .k{ font-family:var(--gs-mono); font-size:11.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted) }
.sw-total{ font-size:32px; line-height:1.15; font-weight:700; font-variant-numeric:tabular-nums }
.sw-change{ font-size:14px }
.sw-bars{ display:flex; flex-direction:column; gap:6px; margin:var(--sp-1) 0 }
.sw-bar{ display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:var(--sp-2); font-size:13px }
.sw-bar-label{ font-family:var(--gs-mono); font-size:12px; color:var(--tok-text, var(--ink-2)) }
.sw-bar-track{ height:10px; border-radius:5px; background:var(--grid); overflow:hidden }
.sw-bar-fill{ display:block; width:0; height:100%; background:var(--tok, var(--s1)) }
.sw-bar-usd{ color:var(--ink-2); font-variant-numeric:tabular-nums }
.sw-note{ margin:0; font-size:12px; color:var(--muted) }
.sw-save{ align-self:flex-start; min-height:44px; padding:0 16px; border:1px solid var(--border); border-radius:10px; background:none; color:var(--ink); font:inherit; cursor:pointer }
.sw-save:disabled{ color:var(--muted); cursor:default }
/* 6 · More: plain links, each into one panel */
.sc-more-row{ margin:0 0 var(--sp-4) }
.sc-more-row ul{ display:grid; grid-template-columns:minmax(0,1fr); gap:var(--sp-2); margin:0; padding:0; list-style:none }
@media (min-width:600px){ .sc-more-row ul{ grid-template-columns:repeat(2, minmax(0,1fr)) } }
@media (min-width:1100px){ .sc-more-row ul{ grid-template-columns:repeat(4, minmax(0,1fr)) } }
.sc-more-row a{ display:flex; align-items:center; gap:var(--sp-2); min-height:44px; padding:0 var(--sp-3); border:1px solid var(--border); border-radius:10px;
  color:var(--ink); text-decoration:none; font-size:14px }
.sc-more-row a::after{ content:"\2192"; margin-left:auto; color:var(--muted) }
.sc-more-row a:focus-visible{ outline:2px solid var(--s1); outline-offset:2px }
/* 7 · the footer: the standing line, About, the address, the stamp (yellow past 20 minutes, red past 60) */
.sc-foot{ padding:var(--sp-3) 0 0; border-top:1px solid var(--grid); font-size:12.5px; color:var(--muted) }
.sc-foot .standing{ margin:0 0 var(--sp-1); color:var(--ink-2) }
.sc-links{ display:flex; flex-wrap:wrap; gap:0 var(--sp-4); margin:0 }
.sc-links a{ display:inline-flex; align-items:center; min-height:44px; color:var(--ink-2) }
.sc-stamp{ display:inline-block; margin:var(--sp-1) 0 0; padding:2px 8px; border-radius:6px; font-family:var(--gs-mono); font-size:12px; color:var(--muted) }
.sc-stamp.warn{ background:#FFD23F; color:#07070C }
.sc-stamp.bad{ background:var(--neg); color:#07070C }
