/* Bell15 site: shared tokens and parts (the picked draft C). Colours and type come from the owner's two packs:
   V158 (black desktop #050505, note window #1a1a1a, text #f1f1f1 / #aeaeae) and V272 (editor #080808, panel #202020,
   text #f7f7f7 / #727272, blue command chip #168fe0). Green and red mean Up and Down, right and wrong, nothing else. */
@font-face { font-family: "Onest"; src: url("/assets/fonts/onest-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; src: url("/assets/fonts/onest-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Victor Mono"; src: url("/assets/fonts/victor-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Victor Mono"; src: url("/assets/fonts/victor-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --desk: #050505;          /* V158 desktop */
  --page: #080808;          /* V272 editor ground */
  --win: #181818;           /* note window body (V158 #1a1a1a, one step down for depth) */
  --win-bar: #1d1d1d;
  --panel: #202020;         /* V272 input */
  --raise: #2a2a2a;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --ink: #f4f4f4;
  --ink-2: #b4b4b4;
  --ink-3: #8f8f8f;
  --ink-4: #727272;         /* V272 secondary: large or quiet text only */
  --accent: #168fe0;
  --accent-ink: #45abf2;
  --accent-bg: rgba(22, 143, 224, .15);
  --accent-ring: rgba(22, 143, 224, .42);
  --up: #10b981;
  --down: #f43f5e;
  --up-bg: rgba(16, 185, 129, .14);
  --down-bg: rgba(244, 63, 94, .14);
  --r-win: 16px;
  --r-ctl: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-long: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-press: cubic-bezier(0.4, 0, 0.2, 1);
  --sans: "Onest", ui-sans-serif, sans-serif;
  --mono: "Victor Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* the hidden attribute always wins: a component's own display (.pill, .chip, .net) must never show what is hidden */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  font-feature-settings: "calt" 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tab { font-variant-numeric: tabular-nums; }
.sr { font-size: 15px; position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }

/* header */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 40; height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 0 40px; pointer-events: none; }
.hdr > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 20px; letter-spacing: -.01em;
  min-height: 44px; }
.brand img { width: 28px; height: 28px; display: block; }
.hdr-right { display: flex; align-items: center; gap: 10px; }

/* buttons */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--panel); color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line); transition: background-color 160ms var(--ease-press), transform 150ms var(--ease-press), box-shadow 160ms var(--ease-press); }
.pill:hover { background: var(--raise); }
.pill:active { transform: scale(.97); }
.pill.solid { background: var(--ink); color: #0a0a0a; box-shadow: none; }
.pill.solid:hover { background: #ffffff; }
.pill.blue { background: var(--accent); color: #fff; box-shadow: none; }
.pill.blue:hover { background: #2a9df0; }
.pill[aria-disabled="true"], .pill:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pill .addr { font-family: var(--mono); font-size: 14px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); }
.pill .dot.warn { background: #f5a524; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
  display: inline-grid; place-items: center; transition: background-color 160ms var(--ease-press), transform 150ms var(--ease-press); }
.round-btn:hover { background: var(--raise); }
.round-btn:active { transform: scale(.94); }
.round-btn svg { width: 18px; height: 18px; }
.round-btn[aria-expanded="true"] { background: var(--ink); color: #0a0a0a; }

/* V272 command chip: a fragment that names a place in the product */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 9px; background: var(--accent-bg);
  box-shadow: inset 0 0 0 1px var(--accent-ring); color: var(--accent-ink); font-weight: 500; text-decoration: none; cursor: pointer; border: 0;
  font-size: inherit; line-height: 1; vertical-align: baseline; transition: background-color 160ms var(--ease-press), transform 150ms var(--ease-press); }
.chip:hover { background: rgba(22, 143, 224, .26); }
.chip:active { transform: scale(.96); }
.chip.quiet { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.chip.quiet:hover { background: var(--raise); color: var(--ink); }

/* V158 note window */
.note { background: var(--win); border-radius: var(--r-win); box-shadow: 0 0 0 1px var(--line), 0 40px 90px rgba(0, 0, 0, .55); overflow: hidden; }
.note-bar { position: relative; height: 42px; display: flex; align-items: center; justify-content: center; padding: 0 16px; background: var(--win-bar);
  border-bottom: 1px solid var(--line); }
.note-bar .dots { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; }
.note-bar .dots i { width: 12px; height: 12px; border-radius: 50%; background: #3a3a3a; display: block; }
.note-bar .t { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 140px); }
.note-body { padding: 22px 26px 8px; }
.note-title { margin: 0 0 14px; font-size: 24px; line-height: 1.18; font-weight: 600; letter-spacing: -.015em; }
.note-h { margin: 14px 0 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.note-foot { padding: 10px 26px 16px; font-size: 13px; color: var(--ink-4); text-align: center; }
.cl { list-style: none; margin: 0; padding: 0; }
.cl li { display: flex; align-items: center; gap: 10px; min-height: 30px; font-size: 15px; color: var(--ink-2); }
.cl li b { color: var(--ink); font-weight: 500; }
.box { flex: none; width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #6a6a6a; display: inline-grid; place-items: center; }
.box.on { background: var(--accent); box-shadow: none; }
.box.on::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.bl { list-style: none; margin: 0; padding: 0; }
.bl li { position: relative; padding-left: 18px; min-height: 28px; font-size: 15px; color: var(--ink-2); }
.bl li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: #5c5c5c; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; background: var(--ink); vertical-align: -0.15em; animation: blink 0.94s steps(1) infinite; }
.caret.solid { animation: none; }
@keyframes blink { 0%, 53% { opacity: 1; } 53.01%, 100% { opacity: 0; } }

/* score bracket: the signature. A 0 to 100 rail, a notch at the price of the call, a bracket to the outcome */
.bracket { display: block; width: 100%; max-width: 460px; height: auto; }
.pos { color: var(--up); } .neg { color: var(--down); }
.sign-up::before { content: "\25B2\00A0"; font-size: .8em; }
.sign-down::before { content: "\25BC\00A0"; font-size: .8em; }

/* popover menu */
.menu { position: fixed; z-index: 60; min-width: 220px; max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 14px; background: #1c1c1c; box-shadow: 0 0 0 1px var(--line-2), 0 24px 60px rgba(0,0,0,.6);
  transform-origin: top right; animation: pop 250ms var(--ease) both; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px;
  background: transparent; text-align: left; text-decoration: none; font-size: 15px; cursor: pointer; color: var(--ink); }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--raise); }
.menu .k { color: var(--ink-4); font-size: 13px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }

/* toasts (Sonner values: 400 ms in, 4 s, three at most) */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; min-width: 240px; max-width: 360px; padding: 12px 16px; border-radius: 12px; background: #222; box-shadow: 0 0 0 1px var(--line-2), 0 16px 40px rgba(0,0,0,.5);
  font-size: 15px; animation: toastIn 400ms var(--ease) both; }
.toast.out { animation: toastOut 150ms ease-out both; }
.toast small { display: block; color: var(--ink-3); font-size: 13px; }
@keyframes toastIn { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(8px); opacity: 0; } }

/* wallet picker and account panel: web/src/wallet-ui.ts draws them (.wk-*); these variables give them the note-window look */
:root {
  --wk-scrim: rgba(0, 0, 0, .6);
  --wk-bg: var(--win);
  --wk-fg: var(--ink);
  --wk-line: var(--line-2);
  --wk-row: var(--panel);
  --wk-muted: var(--ink-3);
  --wk-accent: var(--accent-ink);
  --wk-error: #ffb3c0;
  --wk-radius: 12px;
}
.wk-panel { box-shadow: 0 40px 100px rgba(0, 0, 0, .7); }

/* the wallet is on another network: one quiet bar under the header with the switch button (wallet-ui.ts fills it) */
.net-notice { position: fixed; z-index: 45; top: 72px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 12px; background: #1f1416; box-shadow: 0 0 0 1px rgba(244, 63, 94, .35); color: var(--ink); font-size: 15px; }
.net-notice[hidden] { display: none; }
.net-notice button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ink); color: #0a0a0a; font-weight: 500; cursor: pointer; }

@media (max-width: 760px) { .chip { min-height: 44px; } .quick .chip, .field .chip, .res-head .chip { min-height: 44px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .caret { animation: none; }
}
