/* Borro's app with Robinhood's feel and Borro's branding (2026-10-20).
   Taken from how Robinhood feels, not how it looks: one big number,
   a clean line you can scrub, timeframe tabs, a calm order panel that reviews before it submits, a watchlist with
   pills, and a lot of white. Borro's own logo, type and sunset orange throughout; the chart line follows the
   finance convention (green up, red down), so orange stays the color of doing something. Over pro.css's tokens. */

:root {
  --act: #DC6A35;            /* the logo's orange, a touch warmer: buttons, pills, the selected tab */
  --act-ink: #B4511F;        /* the same for small text on white */
  --up: #0B7752;
  --down: #C4453A;
}

body.rh { background: #FFFFFF; }

/* ------------------------------------------------------------------ top bar */
.rh-bar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.rh-bar-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; height: 64px; }
.rh-bar .logo img { height: 24px; }
.rh-search { position: relative; justify-self: start; width: min(560px, 100%); }
.rh-search input { width: 100%; height: 42px; padding: 0 16px 0 42px; border: 1px solid transparent; border-radius: 999px; background: #F3F3F1; font: 500 15px var(--ui); color: var(--ink); outline: 0; transition: background .15s, border-color .15s; }
.rh-search input:focus { background: #fff; border-color: var(--line-2); }
.rh-search svg { position: absolute; left: 15px; top: 13px; color: var(--text-3); }
.rh-results { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(13, 13, 15, .25); padding: 6px; display: none; }
.rh-results.open { display: block; }
.rh-results button { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.rh-results button:hover, .rh-results button.on { background: #F5F5F3; }
.rh-results img { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); }
.rh-results b { font-weight: 650; }
.rh-results small { display: block; color: var(--text-3); font-size: 13px; }
.rh-results span:last-child { font-weight: 600; color: var(--act-ink); }
.rh-links { display: flex; align-items: center; gap: 6px; }
.rh-links a { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.rh-links a:hover { color: var(--act-ink); }
.rh-links a[aria-current] { color: var(--act-ink); }
/* Room either side of the sun/moon button so it doesn't crowd Markets or Connect (2026-10-20). */
.rh-links .theme-toggle { margin: 0 14px 0 10px; }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--act); color: #fff; font: 650 15px var(--ui); cursor: pointer; text-decoration: none; transition: filter .15s, transform .15s; }
.pill-btn:hover { filter: brightness(.95); }
.pill-btn:active { transform: scale(.98); }
.pill-btn.block { width: 100%; height: 48px; font-size: 16px; }

/* ------------------------------------------------------------------ layout */
/* The first screen fits the window exactly, as Robinhood's does (2026-10-20, with a 2000x913 screenshot of it):
   a full-width bar; a ~1,500px block centred under it, the chart column and a 360px order panel 40px apart; and a
   chart sized from the window's height so the title, price, line, ranges and both cards always end on screen. */
.rh-bar .wrap { max-width: none; width: calc(100% - 2 * clamp(20px, 2.4vw, 48px)); }
.rh-main.wrap { width: calc(100% - 2 * clamp(20px, 4vw, 72px)); max-width: 1500px; }
.rh-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding: 32px 0 64px; }
.rh-main > * { min-width: 0; }
.rh-aside { position: sticky; top: 88px; display: grid; gap: 20px; }

/* ------------------------------------------------------------------ the big number and its line */
.crumb { font-size: 14px; color: var(--text-3); }
.crumb a { color: var(--text-3); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.title { margin-top: 6px; font: 650 30px/1.15 var(--ui); letter-spacing: -.02em; }
.big { margin-top: 6px; font: 600 44px/1.1 var(--display); font-stretch: 100%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.delta { margin-top: 8px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta span { color: var(--text-3); font-weight: 500; margin-left: 6px; }

.chart { position: relative; margin-top: 18px; height: clamp(220px, calc(100vh - 540px), 460px); cursor: crosshair; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart.up .line { stroke: var(--up); }
.chart.down .line { stroke: var(--down); }
.chart .base { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .scrub { stroke: var(--text-3); stroke-width: 1; opacity: 0; }
.chart.scrubbing .scrub { opacity: 1; }
.chart .when { position: absolute; top: -18px; transform: translateX(-50%); font-size: 12px; color: var(--text-3); white-space: nowrap; opacity: 0; pointer-events: none; }
.chart.scrubbing .when { opacity: 1; }
.chart .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 14px; }

.ranges { display: flex; gap: 4px; margin-top: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ranges button { position: relative; padding: 8px 12px; border: 0; background: none; font: 650 14px var(--ui); color: var(--ink); cursor: pointer; border-radius: 8px; }
.ranges button:hover { color: var(--act-ink); }
.ranges button[aria-pressed="true"] { color: var(--act-ink); }
.ranges button[aria-pressed="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--act); border-radius: 2px; }

/* ------------------------------------------------------------------ sections under the chart */
.sec2 { margin-top: 40px; }
.sec2 h2 { padding-bottom: 14px; border-bottom: 1px solid var(--line); font: 650 22px var(--ui); letter-spacing: -.01em; }
.earnline { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.earnline b { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.earnline span { color: var(--text-3); font-size: 14px; }
.holdings a { display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.holdings a:hover b { color: var(--act-ink); }
.holdings img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); }
.holdings b { font-weight: 650; transition: color .15s; }
.holdings small { display: block; color: var(--text-3); font-size: 13px; }
.holdings .v { min-width: 84px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1240px) { .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stats-grid div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.stats-grid dt { font-size: 14px; font-weight: 600; color: var(--ink); }
.stats-grid dd { margin-top: 6px; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats-grid dd.hot { color: var(--act-ink); font-weight: 650; }
.about { padding: 18px 0; color: var(--text-2); line-height: 1.6; max-width: 46em; }
/* A section title with a link on the right, as Robinhood's "Show more". */
.sec2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sec2-head h2 { padding: 0; border: 0; }
.sec2-head a { font-weight: 650; font-size: 14px; color: var(--act-ink); text-decoration: none; }
.sec2-head a:hover { text-decoration: underline; }
/* Notes under a stock, as news rows: the category and read time, the title, one line, and the art on the right. */
.newsl { display: grid; }
.news { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.news small { display: block; font-size: 13px; color: var(--text-3); }
.news b { display: block; margin-top: 4px; font-weight: 650; font-size: 16px; letter-spacing: -.01em; transition: color .15s; }
.news span span { display: block; margin-top: 4px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.news img { width: 120px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.news:hover b { color: var(--act-ink); }

/* ------------------------------------------------------------------ the order panel */
.order { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 30px -22px rgba(13, 13, 15, .3); }
/* The card's room is held before its first paint, so the list under it doesn't jump. */
.order:empty { min-height: 520px; }
/* Under the card, as Robinhood keeps its secondary actions: an outlined button to this stock on the Prices tab. */
.side-btn { display: flex; align-items: center; justify-content: center; height: 44px; margin-top: -6px; border: 1px solid var(--act); border-radius: 999px; color: var(--act-ink); font-weight: 650; font-size: 15px; text-decoration: none; transition: background .15s; }
.side-btn:hover { background: color-mix(in srgb, var(--act) 8%, transparent); }
.side-btn[hidden] { display: none; }
.order-head { padding: 20px 22px 0; }
.order-head h2 { font: 650 20px var(--ui); letter-spacing: -.01em; }
.order-tabs { display: flex; gap: 18px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.order-tabs button { position: relative; padding: 0 0 12px; border: 0; background: none; font: 650 15px var(--ui); color: var(--text-3); cursor: pointer; }
.order-tabs button[aria-selected="true"] { color: var(--act-ink); }
.order-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--act); }
.order-body { padding: 8px 22px 22px; }
.orow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 15px; }
.orow > span { color: var(--ink); font-weight: 500; }
.orow b { font-weight: 650; font-variant-numeric: tabular-nums; }
.orow b.hot { color: var(--act-ink); }
.orow input { width: 140px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; text-align: right; font: 650 16px var(--ui); color: var(--ink); background: #fff; outline: 0; }
.orow input:focus { border-color: var(--act); box-shadow: 0 0 0 3px rgba(220, 106, 53, .15); }
.orow.total { border-bottom: 0; }
.order .pill-btn.block { margin-top: 16px; }
.order .foot-note { margin-top: 12px; text-align: center; font-size: 13px; color: var(--text-3); }
.order .foot-note a { color: var(--act-ink); font-weight: 600; text-decoration: none; }
.order .fine { margin-top: 12px; }
.order .review { display: none; }
.order.reviewing .review { display: block; }
.order.reviewing .draft { display: none; }
.review p.sum { margin: 14px 0 4px; font-size: 15px; color: var(--text-2); line-height: 1.55; }
.review .edit { display: block; margin: 10px auto 0; border: 0; background: none; font: 600 14px var(--ui); color: var(--text-3); cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ the watchlist */
.watch { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.watch-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.watch-head h3 { font: 650 16px var(--ui); }
.watch-head span { font-size: 13px; color: var(--text-3); }
.watch-list { max-height: 480px; overflow: auto; }
.wrow { display: grid; grid-template-columns: minmax(0, 1fr) 64px 76px; align-items: center; gap: 12px; width: 100%; padding: 12px 18px; border: 0; border-bottom: 1px solid #F1F1EE; background: none; text-align: left; cursor: pointer; }
.wrow:last-child { border-bottom: 0; }
.wrow:hover, .wrow.on { background: #FAFAF8; }
.wrow b { display: block; font-weight: 650; font-size: 15px; }
.wrow small { display: block; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow svg { width: 64px; height: 26px; }
.wrow svg path { fill: none; stroke-width: 1.5; }
.wrow svg.up path { stroke: var(--up); }
.wrow svg.down path { stroke: var(--down); }
.apr-pill { justify-self: end; min-width: 72px; padding: 6px 8px; border-radius: 8px; background: var(--act); color: #fff; font-weight: 650; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ the billion-dollar layer: motion that means something */
/* The big number rolls into place, digit by digit, and scales with the screen. */
.big { display: flex; align-items: baseline; height: 1.1em; overflow: hidden; font-size: 38px; }
.title { font-size: 32px; }
.delta { margin-top: 6px; font-size: 15px; }

/* Two cards under the chart, side by side, the way a position reads in a trading app. */
.pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.pcard { padding: 18px 22px 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.pcard > span { font-size: 14px; color: var(--text-2); }
.pcard > strong { display: block; margin: 4px 0 10px; font: 600 23px/1.15 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pcard div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pcard div b { font-weight: 650; font-variant-numeric: tabular-nums; }
.pcard div b.hot { color: var(--act-ink); }
.pcard div b.up { color: var(--up); }
.pcard > strong.hotnum { color: var(--act-ink); }
.order-head { padding-top: 14px; }
.order-tabs { margin-top: 0; }

/* The stock dropdown in the order panel: pick any market without leaving the card. */
.asset-pick { position: relative; margin-top: 14px; }
.asset-btn { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.asset-btn:hover, .asset-btn[aria-expanded="true"] { border-color: var(--ink); }
.asset-btn img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); }
.asset-btn b { display: block; font-weight: 650; font-size: 16px; }
.asset-btn small { display: block; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-btn .px { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.asset-btn svg { color: var(--text-3); transition: transform .2s; }
.asset-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.asset-menu { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 8px); padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 24px 50px -20px rgba(13, 13, 15, .3); animation: sheet .2s cubic-bezier(.2, .7, .1, 1); }
.asset-menu input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: 500 15px var(--ui); outline: 0; }
.asset-menu input:focus { border-color: var(--act); }
.asset-items { max-height: min(420px, 50vh); overflow: auto; margin-top: 6px; }
.asset-items button { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.asset-items button:hover, .asset-items button.kb { background: #F5F5F3; }
.asset-items button[aria-selected="true"] { background: #FFF6F1; }
.asset-items img { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); }
.asset-items b { font-weight: 650; font-size: 15px; }
.asset-items small { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-items .r { text-align: right; }
.asset-items .r b { display: block; color: var(--act-ink); }
.asset-items .r small { font-variant-numeric: tabular-nums; }
.big .dg { display: inline-block; height: 1.1em; overflow: hidden; }
.big .col { display: flex; flex-direction: column; transition: transform .9s cubic-bezier(.16, .84, .24, 1); }
.big .col span, .big .ch { display: block; height: 1.1em; line-height: 1.1em; }
.big.flash-up { color: var(--up); transition: color .3s; }
.big.flash-down { color: var(--down); transition: color .3s; }
.big { transition: color 1s; }

/* The line, its soft wash, and the dot that rides it. */
.chart.up { color: var(--up); }
.chart.down { color: var(--down); }
.chart .area { opacity: .55; }
.chart .dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: currentColor; border: 2px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 16%, transparent), 0 1px 3px rgba(0, 0, 0, .2); opacity: 0; pointer-events: none; transition: opacity .15s; }
.chart.scrubbing .dot { opacity: 1; }

/* Loading: a quiet shimmer where the numbers will land. */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, #F1F1EF 25%, #F9F9F7 37%, #F1F1EF 63%); background-size: 400% 100%; animation: sk 1.3s ease-in-out infinite; }
.sk-line { height: 14px; margin: 6px 0 10px; }
.sk-big { width: 220px; height: 44px; margin: 4px 0 12px; }
.sk-chart { height: 300px; margin-top: 22px; border-radius: 16px; }
.chart.loading .sk-chart { margin-top: 0; height: 100%; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Top lending rates: cards you can scroll sideways. */
.cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.card { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: inherit; text-decoration: none; scroll-snap-align: start; transition: transform .25s cubic-bezier(.2, .7, .1, 1), box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 36px -24px rgba(13, 13, 15, .35); }
.card img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); margin-bottom: 10px; }
.card b { font-weight: 650; }
.card small { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card strong { margin-top: 12px; font: 600 26px/1 var(--display); letter-spacing: -.02em; color: var(--act-ink); font-variant-numeric: tabular-nums; }
.card span { font-size: 12px; color: var(--text-3); }

/* Other markets: chips. */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip2 { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 650; font-size: 14px; text-decoration: none; transition: border-color .15s, background .15s; }
.chip2:hover { border-color: var(--act); background: #FFF8F4; }
.chip2 img { width: 24px; height: 24px; border-radius: 50%; }
.chip2 b { color: var(--act-ink); font-weight: 650; }

/* The order ends on a check. */
.order .success { display: none; text-align: center; padding: 18px 4px 6px; }
.order.done .success { display: block; }
.order.done .draft, .order.done .review { display: none; }
.success h3 { margin-top: 14px; font: 650 19px var(--ui); }
.success p { margin-top: 8px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.tick { width: 64px; height: 64px; }
.tick circle { fill: none; stroke: var(--act); stroke-width: 3; stroke-dasharray: 158; stroke-dashoffset: 158; animation: draw .6s cubic-bezier(.2, .7, .1, 1) forwards; }
.tick path { fill: none; stroke: var(--act); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .45s cubic-bezier(.2, .7, .1, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.order .review, .order .success { animation: sheet .35s cubic-bezier(.2, .7, .1, 1); }
@keyframes sheet { from { opacity: 0; transform: translateY(8px); } }

/* Views cross-fade (View Transitions where the browser has them). */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

@media (prefers-reduced-motion: reduce) {
  .big .col { transition: none; }
  .sk { animation: none; }
  .tick circle, .tick path { animation: none; stroke-dashoffset: 0; }
  .order .review, .order .success { animation: none; }
}

/* ------------------------------------------------------------------ the tabs' own card */
/* On Prices, Bookrunners, Agents and Insights the order card gives way to the tab's own card (rh.js render). */
.panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 30px -22px rgba(13, 13, 15, .3); }
/* pro.css lays .panel-head out as a ruled row for the landing page; in the app it is a plain stacked header. */
.rh-aside .panel-head { display: block; padding: 20px 22px 0; border-bottom: 0; }
.rh-aside .panel-head h2 { font: 650 20px var(--ui); letter-spacing: -.01em; }
.rh-aside .panel-head p { margin-top: 6px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.rh-aside .panel-head span { font-size: inherit; color: inherit; }
.panel-body { padding: 8px 22px 22px; }

/* The tab strip under the bar, once the bar is too narrow for the tabs. */
.rh-sub { display: none; border-top: 1px solid var(--line); }
.rh-sub-in { display: flex; gap: 22px; height: 46px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.rh-sub-in::-webkit-scrollbar { display: none; }
.rh-sub a { position: relative; display: flex; align-items: center; flex: none; font-weight: 600; font-size: 15px; color: var(--text-2); text-decoration: none; }
.rh-sub a[aria-current] { color: var(--ink); }
.rh-sub a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--act); }

/* ------------------------------------------------------------------ narrow screens */
/* Under 1,000px the search field becomes a round button that opens across the bar when tapped, the way phone apps
   do it, so the tabs keep their room. */
@media (max-width: 1000px) {
  .rh-bar-in { position: relative; }
  .rh-search { justify-self: end; width: 38px; }
  .rh-search input { padding: 0 0 0 38px; cursor: pointer; }
  .rh-search svg { left: 11px; pointer-events: none; }
  .rh-search:focus-within { position: absolute; left: 0; right: 0; width: auto; justify-self: stretch; z-index: 2; }
  .rh-search:focus-within input { padding: 0 14px 0 42px; cursor: text; }
  .rh-links a { padding: 8px 10px; }
}
/* Under 900px the tabs move to a strip under the bar. */
@media (max-width: 900px) {
  .rh-links a { display: none; }
  .rh-sub { display: block; }
  .rh-aside { top: 134px; }
}
@media (max-width: 980px) {
  .rh-main { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rh-aside { position: static; }
}
@media (max-width: 640px) {
  .rh-bar-in { gap: 12px; }
  .rh-bar .logo img { height: 19px; }
  .rh-search { width: 36px; }
  .rh-search input { height: 36px; font-size: 14px; padding: 0 0 0 36px; }
  .rh-search svg { left: 10px; top: 10px; }
  .rh-search:focus-within input { padding: 0 14px 0 40px; }
  .rh-bar .theme-toggle { width: 36px; height: 36px; margin: 0 6px 0 0; }
  .rh-links .pill-btn { height: 36px; padding: 0 14px; font-size: 14px; }
  .rh-sub-in { gap: 20px; height: 44px; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .big { font-size: 36px; }
  .chart { height: 220px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news { grid-template-columns: minmax(0, 1fr) 84px; gap: 14px; }
  .news img { width: 84px; height: 70px; }
  .rh-main { padding-top: 24px; }
  .holdings a { grid-template-columns: 36px 1fr auto; }
  .holdings .apr-pill { display: none; }
  .pcards { grid-template-columns: minmax(0, 1fr); }
  body.rh .mtrade { display: flex; }
  body.rh { padding-bottom: 84px; }
  body.rh.tabview .mtrade { display: none; }
  body.rh.tabview { padding-bottom: 0; }
}
/* On a phone the order card sits below the chart; a pinned button takes you to it. */
.mtrade { display: none; position: fixed; z-index: 40; left: 16px; right: 16px; bottom: 16px; height: 52px; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--act); color: #fff; font: 650 16px var(--ui); box-shadow: 0 14px 30px -12px rgba(180, 81, 31, .55); cursor: pointer; }
