/* rs-ui.css — classic RuneScape-website look on top of the original Next.js CSS.
   A framed gold column on a cobblestone wall; dark-brown boxes with gold trim,
   plaque-style section titles in the pixel font, black nav cells with a gold selected cell, gold
   "click here" buttons and a parchment footer. Texture lives only on the page
   background; every UI element is flat colour.
   Loaded after the page's own stylesheets (injected by server.js). Pairs with
   rs-ui.js (hover action text, right-click "Choose Option" menu, shortcuts). */


:root {
  /* Headings use the game's own bold pixel font: plain, blocky, no fancy serif. */
  --font-title: var(--font-rs-bold);
  --col-max: 1240px;
  /* gold trim */
  --gold-hi: #f6dc92;
  --gold: #d7b061;
  --gold-mid: #b88c3d;
  --gold-lo: #7d5a22;
  --gold-dk: #45300f;
  /* box colours */
  --box: #2b2113;
  --box-2: #231b0f;
  --box-strip: #47391f;
  --box-strip-2: #3a2e18;
  --box-line: #5e4b27;
  --tan: #cdaa62;
  --tan-2: #bf9b53;
  --tan-ink: #2a1c07;
  --link: #ffb31a;
  --link-hover: #ffe27a;
  /* hover / menu target colours: people, items, places, things */
  --ui-menu-bg: #5d5447;
  --ui-menu-hi: #6e6555;
  --ui-t-wallet: #ffff00;
  --ui-t-item: #ff9040;
  --ui-t-place: #ff981f;
  --ui-t-link: #00ffff;
  /* the gold side rails of the page column, drawn with stacked shadows */
  --rails:
    -1px 0 0 #000, -3px 0 0 var(--gold-lo), -6px 0 0 var(--gold), -8px 0 0 var(--gold-mid), -10px 0 0 var(--gold-dk), -11px 0 0 #000,
    1px 0 0 #000, 3px 0 0 var(--gold-lo), 6px 0 0 var(--gold), 8px 0 0 var(--gold-mid), 10px 0 0 var(--gold-dk), 11px 0 0 #000;
  --frame-all: 0 0 0 1px #000, 0 0 0 3px var(--gold-lo), 0 0 0 6px var(--gold), 0 0 0 8px var(--gold-mid), 0 0 0 10px var(--gold-dk), 0 0 0 11px #000;
  --gold-box: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), 0 0 0 3px var(--gold), 0 0 0 4px var(--gold-mid), 0 0 0 5px #000;
}

/* ---------------------------------------------------------------- page: cobblestone wall */
html { background: #0c0a06; }
body {
  background-color: #1a140a;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15) 22%, rgba(0, 0, 0, .15) 78%, rgba(0, 0, 0, .55)),
    linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .5)),
    url("/ui/wall.png");
  background-size: auto, auto, 320px 320px;
  background-attachment: fixed, fixed, fixed;
  image-rendering: auto;
}
::selection { background: #7a5a18; color: #ffff00; text-shadow: none; }

/* The page is one framed column: the header, the content and the footer each
   carry the same width and gold side rails so they join into a single frame. */
.topbar, .shell-main, .footer {
  width: min(var(--col-max), calc(100% - 64px));
  margin-left: auto;
  margin-right: auto;
}
.shell-main {
  max-width: none;
  background: linear-gradient(180deg, #1d160c, #181208);
  box-shadow: var(--rails), 0 0 40px rgba(0, 0, 0, .7);
  padding-left: clamp(10px, 1.6vw, 22px);
  padding-right: clamp(10px, 1.6vw, 22px);
}

/* ---------------------------------------------------------------- header banner + nav bar */
.topbar {
  position: relative;
  top: auto;
  margin-top: 16px;
  background:
    radial-gradient(ellipse 38% 120% at 88% 60%, rgba(255, 130, 20, .30), transparent 70%),
    radial-gradient(ellipse 24% 90% at 72% 40%, rgba(255, 190, 60, .14), transparent 70%),
    linear-gradient(180deg, #2c1a0c, #140c05);
  border-bottom: 0;
  box-shadow: var(--frame-all), 0 0 40px rgba(0, 0, 0, .7);
  z-index: 2;
}
.topbar-inner {
  max-width: none;
  flex-wrap: wrap;
  row-gap: 0;
  padding: 12px clamp(10px, 1.6vw, 22px) 0;
}
.brand { font-size: 30px; gap: 12px; }
.brand img { width: 46px; height: 46px; filter: drop-shadow(2px 2px 0 #000) drop-shadow(0 0 10px rgba(255, 170, 40, .35)); transition: transform .2s ease; }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-name {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--gold-hi);
  text-shadow: 2px 2px 0 #000;
}
.brand small { font-family: var(--font-rs); color: #e7cf92; letter-spacing: .06em; }

/* Desktop: the nav drops to its own bar of equal black cells under the banner */
@media (min-width: 981px) {
  .topbar-inner { padding-bottom: 0; }
  .topbar-inner > .brand { padding-bottom: 12px; }
  .topbar-inner > .topbar-right { padding-bottom: 12px; }
  .topnav {
    order: 3;
    flex: 1 0 100%;
    margin: 0 calc(-1 * clamp(10px, 1.6vw, 22px));
    padding: 4px 6px;
    gap: 3px;
    background: linear-gradient(180deg, #0d0a05, #000);
    border-top: 1px solid var(--gold-lo);
    box-shadow: inset 0 1px 0 var(--gold-dk);
  }
  .topnav .rs-tab { flex: 1 1 0; justify-content: center; }
}

/* Nav cells and in-page tabs: black cells, gold rule, the selected cell is gold */
.rs-tab {
  font-family: var(--font-rs-bold);
  color: var(--rs-yellow);
  background: linear-gradient(180deg, #1b150c, #050403);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo), inset 0 1px 0 1px rgba(246, 220, 146, .08);
  padding: 7px 14px;
  transition: color .1s, background .1s;
}
.rs-tab:hover { color: #fff; background: linear-gradient(180deg, #2f2412, #0d0a05); }
.rs-tab[aria-current=page], .rs-tab[aria-selected=true] {
  color: #2a1a04;
  text-shadow: 0 1px 0 rgba(255, 245, 200, .5);
  background: linear-gradient(180deg, #fff1b0 0%, #f4c948 45%, #d99d12 100%);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #8a5f0c, inset 0 1px 0 1px #fff7cf;
}
.rs-tab[aria-current=page]::after, .rs-tab[aria-selected=true]::after { display: none; }
.rs-tab[aria-current=page] .px, .rs-tab[aria-selected=true] .px { filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .35)); }
.rs-tab[aria-selected=true] .ac-count { color: #5a3a06; opacity: 1; }
.topbar-mobile-nav { background: #000; padding-top: 4px; padding-bottom: 4px; border-top: 1px solid var(--gold-lo); }

/* Keyboard hints on the primary nav (1–6), only where a keyboard is likely */
@media (hover: hover) and (pointer: fine) {
  .topnav { counter-reset: rsnav; }
  .topnav .rs-tab { counter-increment: rsnav; }
  .topnav .rs-tab::before {
    content: counter(rsnav);
    position: absolute;
    top: 3px;
    right: 6px;
    font-size: 11px;
    line-height: 1;
    color: var(--gold-lo);
    text-shadow: none;
  }
  .topnav .rs-tab:hover::before { color: var(--gold); }
  .topnav .rs-tab[aria-current=page]::before { color: #8a5f0c; }
}

/* ---------------------------------------------------------------- page headings */
.shell-main h1, .dialog-title {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0;
}
.shell-main h1:not(.ov-headline) { color: var(--rs-orange); text-shadow: 2px 2px 0 #000; }
.shell-main h1.ov-headline { font-family: var(--font-rs); font-weight: 400; letter-spacing: 0; }
.ov-headline { color: #fff3cf; text-shadow: 2px 2px 0 #000; }
.eyebrow { color: var(--gold); }
.subline, .ov-subline { color: #d9c9a0; }

/* ---------------------------------------------------------------- boxes */
.rs-panel {
  background: var(--box);
  box-shadow: var(--gold-box), 0 6px 18px rgba(0, 0, 0, .55);
  margin: 6px;
}
/* Title strip: a dark bar with a line-and-diamond ornament, the title on a gold plaque */
.rs-panel > .rs-panel-title, .dialog-frame .dialog-title {
  position: relative;
  min-height: 34px;
  padding: 4px 10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14'%3E%3Cpath d='M0 7h22' stroke='%23b88c3d' stroke-width='1'/%3E%3Cpath d='M11 2l5 5-5 5-5-5z' fill='%232b2113' stroke='%23d7b061'/%3E%3Cpath d='M11 5l2 2-2 2-2-2z' fill='%23d7b061'/%3E%3C/svg%3E") left 4px center / 22px 14px repeat-x,
    linear-gradient(180deg, #4a3a1f, #2c2213);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 #6d5730, inset 0 -1px 0 var(--gold-lo);
  color: var(--tan-ink);
  font-size: 16px;
  text-shadow: none;
}
.rs-panel > .rs-panel-title .title-left, .dialog-frame .dialog-title > :first-child {
  margin-left: 14px;
  min-width: 0;
  padding: 3px 20px 3px 16px;
  background: linear-gradient(180deg, #fbe7a6 0%, #e2bd66 45%, #b98a33 100%);
  color: #2a1a04;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 245, 200, .55);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  box-shadow: inset 0 1px 0 #fff4c8, inset 0 -1px 0 #7d5a22;
}
.rs-panel > .rs-panel-title .title-left .px { filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .45)); }
.rs-panel > .rs-panel-title .title-left .chip { text-shadow: 1px 1px 0 #000; font-family: var(--font-rs); letter-spacing: 0; }
.rs-panel > .rs-panel-title .title-right {
  padding: 2px 6px;
  background: #2b2113;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo);
  color: #d9c9a0;
  text-shadow: 1px 1px 0 #000;
}
.rs-panel-body { color: #eadcb8; }

/* Recessed wells and the stat ticker */
.rs-inset, .ticker {
  background: var(--box-2);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--box-line), inset 2px 2px 0 rgba(0, 0, 0, .35);
}
.ticker { box-shadow: var(--gold-box); margin: 8px 6px; }
.ticker-cell { border-right-color: var(--box-line); }

/* Stat tiles: dark caption strip over a tan body, like the feature boxes */
.stat-tile {
  position: relative;
  padding: 0 0 10px;
  gap: 4px;
  background: linear-gradient(180deg, var(--tan) 0%, var(--tan-2) 100%);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-lo), inset 0 0 0 1px #e4c887;
  text-shadow: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.stat-tile .stat-label {
  padding: 6px 12px;
  margin-bottom: 4px;
  background: linear-gradient(180deg, #4b3c20, #342a16);
  box-shadow: inset 0 -1px 0 #000;
  color: #fff;
  font-family: var(--font-rs-bold);
  text-shadow: 1px 1px 0 #000;
}
.stat-tile .stat-value { padding: 0 12px; color: var(--tan-ink); text-shadow: 0 1px 0 rgba(255, 240, 200, .5); }
.stat-tile .stat-sub { padding: 0 12px; color: #5a4520; }
.stat-tile .stat-sub a, .stat-tile a { color: #6b3a00; text-decoration: underline; text-shadow: none; }
.stat-tile:hover, .asset-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold), 0 8px 16px rgba(0, 0, 0, .5); }
.hs-podium-tile, .rs-tile { background: var(--box); box-shadow: var(--gold-box); }
.hs-podium-tile.r1 { background: linear-gradient(180deg, #4d3b16, var(--box)); }

/* Asset cards and sub-boxes: dark body, gold rule, lighter caption row */
.asset-card {
  position: relative;
  background: var(--box-2);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--box-line);
  transition: transform .12s ease, box-shadow .12s ease;
}
.asset-card .asset-head { margin: -12px -12px 0; padding: 8px 12px; background: linear-gradient(180deg, var(--box-strip), var(--box-strip-2)); box-shadow: inset 0 -1px 0 #000; }
.asset-card .asset-symbol { font-family: var(--font-rs-bold); color: #fff; }

/* ---------------------------------------------------------------- buttons */
.rs-btn {
  font-family: var(--font-rs-bold);
  color: var(--gold-hi);
  background: linear-gradient(180deg, #3d2f18, #1f170b);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo), inset 0 1px 0 1px rgba(246, 220, 146, .12);
  text-shadow: 1px 1px 0 #000;
  transition: filter .1s, transform .05s, color .1s;
}
.rs-btn:hover:not(:disabled) { filter: brightness(1.2); color: #fff; }
.rs-btn:active:not(:disabled) { transform: translate(1px, 1px); filter: brightness(.95); }
/* Primary: the bright gold "click here" button */
.rs-btn.primary {
  color: #2a1a04;
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 248, 210, .6);
  background: linear-gradient(180deg, #fff3b8 0%, #f7d25a 40%, #e2a615 60%, #f0bd2c 100%);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #8a5f0c, inset 0 2px 0 0 #fffbe0, 0 0 0 2px rgba(0, 0, 0, .25);
}
.rs-btn.primary:hover:not(:disabled) { color: #000; filter: brightness(1.08); }
.rs-btn.primary .px { filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .3)); }
.rs-btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--gold-lo); color: #d9c9a0; }
.rs-btn:disabled { filter: grayscale(.6) brightness(.75); cursor: not-allowed; }
.close-x { background: #1f170b; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo); }
.close-x:hover { background: #3a120c; }

/* Inputs: light field with a gold rim, like the site search box */
.rs-input {
  background: linear-gradient(180deg, #0e0b06, #1b140a);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo), inset 2px 2px 0 rgba(0, 0, 0, .5);
}
.rs-input:focus-within { box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold), 0 0 10px rgba(255, 190, 60, .3); }
.rs-input input { caret-color: var(--rs-yellow); }

/* ---------------------------------------------------------------- text links */
.rs-link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(255, 179, 26, .45); }
.rs-link:hover { color: var(--link-hover); text-decoration-color: currentColor; }
a.addr:hover, a.addr:focus-visible { color: var(--rs-yellow); }

/* ---------------------------------------------------------------- tables & feeds */
.rs-table th {
  font-family: var(--font-rs-bold);
  color: var(--gold-hi);
  background: linear-gradient(180deg, var(--box-strip), var(--box-strip-2));
  border-bottom: 1px solid #000;
  box-shadow: inset 0 -1px 0 var(--gold-lo);
}
.rs-table td { border-bottom-color: #3d311b; }
.rs-table tbody tr:nth-child(2n) { background: rgba(0, 0, 0, .18); }
.rs-table tbody tr { transition: background .08s, box-shadow .08s; }
.rs-table tbody tr:hover { background: rgba(255, 200, 80, .09); box-shadow: inset 3px 0 0 var(--gold); }
.rs-table tbody tr:hover td { color: #fff5d6; }
.rs-table tbody tr.rsui-row-link { cursor: pointer; }
.feed-item { border-bottom-color: #3d311b; transition: background .08s, box-shadow .08s; }
.feed-item:hover { background: rgba(255, 200, 80, .07); box-shadow: inset 3px 0 0 var(--gold); }
.pager { border-top: 1px solid #000; box-shadow: inset 0 1px 0 var(--gold-lo); }

/* Chips and badges */
.chip { background: #17110a; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #4f3e1f; }
.level-badge { background: #120d06; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo); }
.kbd { background: #17110a; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo); }

/* XP bars: segmented like an in-game progress bar */
.xp-bar { background: #0d0a05; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #3d311b; }
.xp-bar > span { background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(0, 0, 0, .22) 7px 8px), linear-gradient(180deg, #7dff8e 0, #2fcf4c 35%, #15902b 100%); }
.xp-bar.gold > span { background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(0, 0, 0, .22) 7px 8px), linear-gradient(180deg, #fff09a 0, #ffd24a 35%, #b07c0e 100%); }

/* Dialogs share the gold box */
.dialog-frame { position: relative; background: var(--box); box-shadow: var(--gold-box), 0 14px 40px rgba(0, 0, 0, .7); }

/* ---------------------------------------------------------------- footer: parchment strip */
.footer {
  margin-bottom: 24px;
  background: linear-gradient(180deg, #d4b36d, #c19c52);
  border-top: 0;
  position: relative;
  box-shadow: var(--frame-all), 0 0 40px rgba(0, 0, 0, .7);
  color: var(--tan-ink);
  text-shadow: none;
}
.footer-inner { max-width: none; color: #3d2b0e; padding-left: clamp(10px, 1.6vw, 22px); padding-right: clamp(10px, 1.6vw, 22px); }
.footer .rs-link-quiet, .footer a { color: #3d2b0e; text-decoration: underline; text-decoration-color: rgba(61, 43, 14, .45); }
.footer .rs-link-quiet:hover, .footer a:hover { color: #000; }
.footer button.rs-link-quiet { text-decoration: underline; }
.footer .chip { text-shadow: 1px 1px 0 #000; }
.footer .px { filter: none; }

/* Scrollbars: gold thumb in a dark channel */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #120d06; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #3d311b; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #d7b061, #9a7430); box-shadow: inset 0 0 0 1px #000, inset 2px 2px 0 #f6dc92, inset -2px -2px 0 #6b4a14; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #e8c574, #a98038); }
::-webkit-scrollbar-corner { background: #120d06; }

/* Keyboard focus is always visible */
:focus-visible { outline: 1px solid var(--rs-yellow); outline-offset: 2px; }
.rs-btn:focus-visible, .rs-tab:focus-visible { outline: 1px solid var(--rs-yellow); outline-offset: 1px; }

@media (max-width: 760px) {
  .topbar, .shell-main, .footer { width: calc(100% - 16px); }
  .brand { font-size: 24px; }
  .brand img { width: 36px; height: 36px; }
}

/* ================================================================ rs-ui.js overlays */

/* Hover action text ("Inspect 0xabc…  / 3 more options") */
.rsui-hover {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;
  pointer-events: none;
  font-family: var(--font-rs-bold);
  font-size: 16px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #000;
  opacity: 0;
  transition: opacity .08s;
  will-change: transform;
}
.rsui-hover.is-on { opacity: 1; }
.rsui-hover .rsui-more { color: #fff; opacity: .9; }

/* Target colours shared by hover text and the menu */
.rsui-t-wallet { color: var(--ui-t-wallet); }
.rsui-t-item { color: var(--ui-t-item); }
.rsui-t-place { color: var(--ui-t-place); }
.rsui-t-link { color: var(--ui-t-link); }
.rsui-t-plain { color: #fff; }

/* Right-click "Choose Option" menu */
.rsui-menu {
  position: fixed;
  z-index: 10001;
  min-width: 150px;
  max-width: min(92vw, 420px);
  padding: 0 0 3px;
  background: var(--ui-menu-bg);
  box-shadow: 0 0 0 1px #000, 0 6px 18px rgba(0, 0, 0, .55);
  font-family: var(--font-rs-bold);
  font-size: 16px;
  line-height: 1;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  user-select: none;
  animation: rsui-pop .07s ease-out;
}
@keyframes rsui-pop { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.rsui-menu-head {
  margin: 1px 1px 3px;
  padding: 3px 5px 4px;
  background: #000;
  color: var(--ui-menu-bg);
  text-shadow: none;
}
.rsui-menu-item {
  display: block;
  width: 100%;
  padding: 3px 7px 4px 5px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  color: #fff;
  background: none;
  border: 0;
  font: inherit;
  text-shadow: inherit;
}
.rsui-menu-item:hover, .rsui-menu-item.is-active { background: var(--ui-menu-hi); color: var(--rs-yellow); }
.rsui-menu-item:hover .rsui-act, .rsui-menu-item.is-active .rsui-act { color: var(--rs-yellow); }
.rsui-menu-item:focus { outline: none; }

/* Examine / toast message: a small parchment note */
.rsui-note {
  position: fixed;
  z-index: 10002;
  max-width: min(90vw, 380px);
  padding: 8px 12px 9px;
  background: var(--rs-parchment);
  background-image: repeating-linear-gradient(0deg, transparent 0 7px, rgba(0, 0, 0, .045) 7px 8px);
  color: var(--rs-ink);
  text-shadow: none;
  font-family: var(--font-rs);
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--rs-parchment-deep), inset 0 0 0 2px var(--rs-parchment-dark), 0 6px 16px rgba(0, 0, 0, .5);
  pointer-events: none;
  animation: rsui-note 3.6s ease forwards;
}
.rsui-note b { font-family: var(--font-rs-bold); font-weight: 400; color: #6b3500; }
.rsui-note.is-toast { left: 50%; bottom: 22px; transform: translateX(-50%); }
@keyframes rsui-note {
  0% { opacity: 0; translate: 0 6px; }
  6% { opacity: 1; translate: 0 0; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* Keyboard shortcuts panel */
.rsui-help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .6);
  animation: rsui-fade .12s ease-out;
}
@keyframes rsui-fade { from { opacity: 0; } to { opacity: 1; } }
.rsui-help {
  position: relative;
  isolation: isolate;
  width: min(92vw, 500px);
  background: var(--box);
  box-shadow: var(--gold-box), 0 12px 40px rgba(0, 0, 0, .6);
  animation: rsui-pop .12s ease-out;
}
.rsui-help-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px 5px 12px;
  color: #2a1a04;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 16px;
  text-shadow: 0 1px 0 rgba(255, 245, 200, .55);
  background: linear-gradient(180deg, #fbe7a6 0%, #e2bd66 45%, #b98a33 100%);
  border-bottom: 1px solid #000;
}
.rsui-help-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.rsui-help-row { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 15px; color: var(--rs-cream); }
.rsui-help-row .rsui-keys { display: flex; gap: 4px; flex-wrap: wrap; }
.rsui-help-sep { height: 0; border-top: 1px solid #000; border-bottom: 1px solid var(--gold-lo); margin: 4px 0; }
.rsui-help-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--rs-cream); }
.rsui-help-toggle .rs-btn { min-width: 64px; }
.rsui-help-toggle .rs-btn[aria-pressed=true] { color: var(--rs-green); }
.rsui-help-toggle .rs-btn[aria-pressed=false] { color: var(--rs-red); }

/* The "?" help chip in the footer area */
.rsui-kbd-hint {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-family: var(--font-rs-bold);
  font-size: 14px;
  color: var(--gold);
  background: linear-gradient(180deg, #3d2f18, #1f170b);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo), 0 4px 12px rgba(0, 0, 0, .5);
  cursor: pointer;
  opacity: .82;
  transition: opacity .12s, color .12s;
}
.rsui-kbd-hint:hover { opacity: 1; color: var(--rs-yellow); }
@media (hover: none), (pointer: coarse) { .rsui-kbd-hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .stat-tile:hover, .asset-card:hover { transform: none; }
  .rsui-note { animation: none; }
}

/* ---------------------------------------------------------------- vault: fee engine icons */
/* Pons fees -> Vault -> Stock basket use their own pixel icons (static/ui/*.svg); the
   page's generic icons inside those three boxes are hidden, so React's markup is untouched. */
.vt-flow .vt-step-icon {
  width: 56px;
  height: 56px;
  background-color: #17110a;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--gold-lo, #7d5a22), inset 2px 2px 0 rgba(0, 0, 0, .4);
}
.vt-flow .vt-step-icon svg { display: none; }
.vt-flow > .vt-step:nth-of-type(1) .vt-step-icon { background: #17110a url("/ui/pons-fees.svg") center / 40px 40px no-repeat; }
.vt-flow > .vt-step:nth-of-type(2) .vt-step-icon { background: #17110a url("/ui/vault.svg") center / 40px 40px no-repeat; }
.vt-flow > .vt-step:nth-of-type(3) .vt-step-icon { background: #17110a url("/ui/stock-basket.svg") center / 40px 40px no-repeat; }

/* X (Twitter) button: the official X mark in white instead of the pixel icon */
a.rs-btn.icon[href*="x.com/"] {
  background: url("/ui/x-logo.png") center / 16px 16px no-repeat, linear-gradient(180deg, #3d2f18, #1f170b);
}
a.rs-btn.icon[href*="x.com/"] svg { visibility: hidden; }
