/* Orbifolio visual identity: "midnight and ice". Deep neutral surfaces, one
   accent taken from the logo, colour reserved for direction and for the
   single thing that is selected. Loaded after theme.css. */
:root {
  --bg: #07090d;
  --panel: #0c0f15;
  --panel-2: #11151d;
  --panel-3: #181d28;
  --line: #1b212c;
  --line-soft: #141922;
  --text: #f1f4f8;
  --muted: #98a3b4;
  --subtle: #7d8899;
  --accent: #93d5e6;
  --accent-strong: #c4ecf6;
  --accent-tint: rgba(147, 213, 230, .1);
  --accent-line: rgba(147, 213, 230, .36);
  --green: #3ddc9e;
  --green-tint: rgba(61, 220, 158, .11);
  --red: #ff7387;
  --red-tint: rgba(255, 115, 135, .11);
  --gold: #e9c16a;
  --v2-radius: 14px;
  --v2-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
}
html { scrollbar-color: #2a3240 transparent; }
body.v2 { overflow-x: clip; letter-spacing: -.003em; }
body.v2 ::selection { background: rgba(147, 213, 230, .28); }
/* A faint glow behind the top of the page gives the flat dark surface depth. */
body.v2::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none; background: radial-gradient(1100px 460px at 50% -160px, rgba(147, 213, 230, .085), transparent 72%); }

/* ---------- Masthead: translucent, full width ---------- */
body.v2 .manager-toolbar.v2-masthead { background: transparent; box-shadow: none; clip-path: none; isolation: isolate; }
body.v2 .manager-toolbar.v2-masthead::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: rgba(7, 9, 13, .78); -webkit-backdrop-filter: saturate(140%) blur(16px); backdrop-filter: saturate(140%) blur(16px); border-bottom: 1px solid var(--line); }
body.v2 .v2-brand { font-size: 18.5px; font-weight: 680; letter-spacing: -.02em; }
body.v2 .v2-brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(147, 213, 230, .16), 0 6px 18px rgba(147, 213, 230, .1); }
body.v2 .v2-masthead #global-search { height: 38px; border-radius: 11px; border-color: var(--line); background: rgba(255, 255, 255, .03); }
body.v2 .v2-masthead #global-search:hover { border-color: #283140; }
body.v2 .v2-masthead #global-search:focus { border-color: var(--accent-line); background: var(--panel-2); box-shadow: 0 0 0 3px var(--accent-tint); }
/* The one filled button on the page: the invitation to keep what you build. */
body.v2 .v2-masthead > .account-button { height: 32px; padding: 0 12px; border: 1px solid #eef3f8; border-radius: 9px; background: #eef3f8; color: #0a0d12; font-size: 13px; font-weight: 650; }
body.v2 .v2-masthead > .account-button:hover { background: #fff; border-color: #fff; }
body.v2 .v2-masthead > .account-button[aria-expanded="true"], body.v2 .v2-masthead > .account-button[data-open="true"] { background: #d6dfea; border-color: #d6dfea; }
body.v2 .v2-masthead > .account-button svg { stroke: currentColor; }
/* Signed in: the initials in a round badge, the save state as a dot (theme.css sizes the parts). */
body.v2 .v2-masthead > .account-button[data-signed-in="true"] { border-color: #33425a; background: var(--panel-3); color: var(--text); }
body.v2 .v2-masthead > .account-button[data-signed-in="true"]:hover, body.v2 .v2-masthead > .account-button[data-signed-in="true"][aria-expanded="true"], body.v2 .v2-masthead > .account-button[data-signed-in="true"][data-open="true"] { background: #222c3f; border-color: #46597a; }

/* ---------- Region tabs: text tabs with an accent underline ---------- */
body.v2 .shell > .tabs.region-navigation { margin: 14px 0 16px; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.v2 .v2-region-tabs { gap: 2px; border-bottom: 1px solid var(--line); }
body.v2 .v2-region-tab { min-height: 44px; padding: 0 14px; border-radius: 0; background: none; font-size: 14px; font-weight: 550; color: var(--muted); box-shadow: inset 0 -2px 0 transparent; transition: color .15s ease, box-shadow .15s ease; }
body.v2 .v2-region-tab:first-child { padding-left: 2px; }
body.v2 .v2-region-tab:hover { background: none; color: var(--text); box-shadow: inset 0 -2px 0 #2a3240; }
body.v2 .v2-region-tab[aria-selected="true"] { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
body.v2 .shell > .tabs .region-watchlists { margin-top: 0; padding: 14px 0 0; border-top: 0; gap: 8px; }
body.v2 .shell > .tabs.region-navigation .tab { min-height: 34px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: #c5cedb; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
body.v2 .shell > .tabs.region-navigation .tab:hover { background: var(--panel-2); border-color: #2a3240; color: var(--text); }
body.v2 .shell > .tabs.region-navigation .tab.active,
body.v2 .shell > .tabs.region-navigation .tab.active:hover { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-strong); box-shadow: none; }


/* ---------- Table card ---------- */
body.v2 .panel { border: 1px solid var(--line); border-radius: var(--v2-radius); background: var(--panel); box-shadow: 0 1px 0 rgba(255, 255, 255, .02) inset; }
body.v2 .panel-head { padding: 16px 20px 14px; border-bottom-color: var(--line); }
body.v2 .panel-head h2 { font-size: 19px; font-weight: 680; letter-spacing: -.02em; }
body.v2 .panel-actions button, body.v2 .watchlist-actions button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: #cfd7e3; font-weight: 500; }
body.v2 .panel-actions button:hover, body.v2 .watchlist-actions button:hover { background: var(--panel-3); border-color: #2a3240; color: var(--text); }
body.v2 .panel-head .watchlist-actions .list-add-button { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; border-color: var(--accent-line); background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
body.v2 .panel-head .watchlist-actions .list-add-button:hover { background: rgba(147, 213, 230, .16); border-color: rgba(147, 213, 230, .5); color: #fff; }
body.v2 #crypto-currency-switch { padding: 3px; border-color: var(--line); border-radius: 10px; background: var(--panel-2); }
body.v2 #crypto-currency-switch button { min-height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
body.v2 #crypto-currency-switch button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
body.v2 #crypto-currency-switch button.active { background: var(--accent-tint); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-line); }
body.v2 .section-filter { border-color: var(--line); border-radius: 8px; background: transparent; color: var(--muted); }
body.v2 .section-filter:hover { border-color: #2a3240; color: var(--text); }
body.v2 .section-filter.active { background: var(--accent-tint); border-color: var(--accent-line); color: var(--accent-strong); }

body.v2 .table-wrap thead th { background: transparent; color: var(--subtle); font-weight: 600; border-bottom: 1px solid var(--line); }
@media (min-width: 701px) { body.v2 .table-wrap thead th { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; } }
body.v2 .table-wrap tbody td { border-bottom: 1px solid var(--line-soft); transition: background-color .12s ease; }
body.v2 .table-wrap tbody tr:last-child td { border-bottom: 0; }
body.v2 .table-wrap tbody tr { cursor: pointer; }
body.v2 .table-wrap tbody tr:hover td { background: rgba(255, 255, 255, .028); }
body.v2 .table-wrap tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
body.v2 .table-wrap .asset-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, .07); }
body.v2 .table-wrap .change.positive { color: var(--green); }
body.v2 .table-wrap .change.negative { color: var(--red); }
body.v2 .ranking-asset-type, body.v2 .type-pill { padding: 2px 7px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .055); color: var(--muted); font-size: 11.5px; font-weight: 500; letter-spacing: 0; }
body.v2 .favorite-button { color: var(--subtle); }
body.v2 .favorite-button.active, body.v2 .favorite-button[aria-pressed="true"] { color: var(--gold); opacity: 1; }
body.v2 .price-alert-button.has-alert { color: var(--gold); }
body.v2 .pagination button { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
body.v2 .pagination button:hover:not(:disabled) { background: var(--panel-3); border-color: #2a3240; }

@media (min-width: 701px) {
  body.v2 .table-wrap td { height: 64px; }
  /* Name first, ticker second: a first-time visitor recognises "LVMH", not "MC". */
  body.v2 .table-wrap tr:not(.descriptor-row) .asset > span:last-child { display: flex; flex-direction: column-reverse; justify-content: center; min-width: 0; }
  body.v2 .table-wrap tr:not(.descriptor-row) .asset-name { margin: 0; color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 20px; letter-spacing: -.008em; }
  body.v2 .table-wrap tr:not(.descriptor-row) .asset-symbol { margin-top: 1px; color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 17px; min-height: 17px; letter-spacing: .01em; }
  body.v2 .table-wrap .rank, body.v2 .table-wrap .rank.crypto-rank { width: 30px; flex: 0 0 30px; color: var(--subtle); font-size: 13px; font-variant-numeric: tabular-nums; text-align: left; }
  /* The day's move is the figure people scan first: give that one column a shape. */
  body.v2 .table-wrap td.intraday-column + td.numeric:not(.intraday-column) > .change { display: inline-block; min-width: 72px; padding: 4px 9px; border-radius: 8px; background: rgba(255, 255, 255, .05); text-align: center; font-weight: 600; }
  body.v2 .table-wrap td.intraday-column + td.numeric:not(.intraday-column) > .change.positive { background: var(--green-tint); }
  body.v2 .table-wrap td.intraday-column + td.numeric:not(.intraday-column) > .change.negative { background: var(--red-tint); }
  body.v2 .table-wrap .market-cap, body.v2 .table-wrap .ranking-value-column, body.v2 .table-wrap .stock-value-column { font-weight: 500; }
}
/* Row tools appear with the pointer; a set alert always stays visible. */
@media (hover: hover) and (min-width: 701px) {
  body.v2 .table-wrap .asset-row-tools .price-alert-button:not(.has-alert) { opacity: 0; transition: opacity .12s ease; }
  body.v2 .table-wrap tr:hover .asset-row-tools .price-alert-button, body.v2 .table-wrap tr:focus-within .asset-row-tools .price-alert-button { opacity: 1; }
  body.v2 .table-wrap .favorite-button:not(.active):not([aria-pressed="true"]) { opacity: 0; }
  /* [aria-pressed] keeps this rule ahead of the resting one above (which carries two :not() selectors). */
body.v2 .table-wrap tr:hover .favorite-button[aria-pressed], body.v2 .table-wrap tr:focus-within .favorite-button[aria-pressed] { opacity: 1; }
}

/* ---------- Floating surfaces ---------- */
body.v2 .company-tooltip { border: 1px solid #232b38; border-radius: 14px; background: #0f131b; box-shadow: var(--v2-shadow); }
/* Phone sheets keep their own edge-to-edge shape. */
body.v2 dialog:not(#asset-chart-dialog):not(.mobile-sheet):not(#mobile-alerts):not(#v2-pulse-dialog) { border: 1px solid #232b38; border-radius: 16px; background: var(--panel); box-shadow: var(--v2-shadow); }
body.v2 dialog::backdrop { background: rgba(4, 6, 9, .7); }
body.v2 #alert-settings-dialog .settings-footer .settings-save { border-color: #eef3f8; background: #eef3f8; color: #0a0d12; }
body.v2 #alert-settings-dialog .settings-footer .settings-save:hover { background: #fff; }

/* ---------- Footer ---------- */
body.v2 .v2-footer { margin-top: 36px; border-top-color: var(--line); }

/* ---------- Phone ---------- */
@media (max-width: 700px) {
  /* Touch sizes: these values lose to the desktop rules above unless repeated here. */
  body.v2 .shell > .tabs.region-navigation .tab { min-height: 40px; }
  body.v2 #crypto-currency-switch button { min-height: 32px; }
  body.v2 .shell > .tabs.region-navigation { margin: 10px 0 12px; }
  /* The open list carries its options button on phones: keep room for it. */
  body.v2 .shell > .tabs.region-navigation .tab.active:has(.mobile-list-menu) { padding-right: 34px; }
  body.v2 .v2-region-tab { min-height: 44px; padding: 0 12px; }
  body.v2 .shell > .tabs .region-watchlists { padding: 12px 0 0; }
  body.v2 .panel-head h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { body.v2 * { transition: none !important; } }

/* ---------- Search shortcut hint ---------- */
body.v2 .v2-masthead .global-search-wrap { position: relative; }
body.v2 .v2-search-key { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-width: 20px; height: 20px; padding: 0 6px; border: 1px solid #2a3240; border-radius: 6px; background: rgba(255, 255, 255, .04); color: var(--subtle); font: 600 11.5px/18px var(--v2-font); text-align: center; pointer-events: none; }
body.v2 #global-search:focus ~ .v2-search-key, body.v2 #global-search:not(:placeholder-shown) ~ .v2-search-key { display: none; }
@media (max-width: 700px) { body.v2 .v2-search-key { display: none; } }

/* ---------- Table density on narrower desktops ---------- */
@media (min-width: 701px) {
  body.v2 .panel:not(.explorer-mode) .table-wrap table { min-width: 980px; }
  body.v2.show-intraday .panel:not(.explorer-mode) .table-wrap table { min-width: 1160px; }
  body.v2 .panel:not(.explorer-mode) #asset-heading { width: 32%; }
  body.v2 .table-wrap th, body.v2 .table-wrap td { padding-left: 10px; padding-right: 10px; }
  body.v2 .table-wrap th:first-child, body.v2 .table-wrap td:first-child { padding-left: 20px; }
  body.v2 .table-wrap th:last-child, body.v2 .table-wrap td:last-child { padding-right: 20px; }
  body.v2 .table-wrap td.intraday-column + td.numeric:not(.intraday-column) > .change { min-width: 66px; padding: 4px 8px; }
  /* The FDV column needs the wider minimum its own stylesheet asks for. */
  body.v2.show-crypto-fdv .panel:not(.explorer-mode) .table-wrap table { min-width: 1150px; }
  body.v2.show-crypto-fdv .panel:not(.explorer-mode) #asset-heading { width: 26%; }
  body.v2.show-crypto-fdv.show-intraday .panel:not(.explorer-mode) .table-wrap table { min-width: 1350px; }
  body.v2.show-crypto-fdv.show-intraday .panel:not(.explorer-mode) #asset-heading { width: 22%; }
}

/* ---------- Forms and primary actions share one look ---------- */
body.v2 #account-dialog input, body.v2 dialog input[type="text"], body.v2 dialog input[type="search"], body.v2 dialog input[type="number"], body.v2 dialog input[type="email"] { border-color: #252d3a; border-radius: 10px; background: var(--panel-2); color: var(--text); font-family: var(--v2-font); }
body.v2 #account-dialog input:focus, body.v2 dialog input[type="text"]:focus, body.v2 dialog input[type="search"]:focus, body.v2 dialog input[type="number"]:focus, body.v2 dialog input[type="email"]:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-tint); outline: none; }
body.v2 #account-dialog .account-submit, body.v2 #restore-defaults-dialog .restore-confirm { border: 1px solid #eef3f8; border-radius: 10px; background: #eef3f8; color: #0a0d12; font-family: var(--v2-font); font-size: 14px; font-weight: 650; }
body.v2 #account-dialog .account-submit { min-height: 42px; }
body.v2 #account-dialog .account-submit:hover, body.v2 #restore-defaults-dialog .restore-confirm:hover { background: #fff; border-color: #fff; }
body.v2 #account-dialog h2 { font-size: 20px; font-weight: 680; letter-spacing: -.02em; }
body.v2 .result-count { white-space: nowrap; }

/* ---------- Phone: selected period uses the accent ---------- */
body.v2 .mobile-periods { border-color: var(--line); border-radius: 11px; background: var(--panel-2); }
body.v2 .mobile-periods button { font-size: 13px; border-radius: 8px; }
body.v2 .mobile-periods button[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-line); }
body.v2 .mobile-filter-button { font-size: 13px; }

/* The asset tooltip opens over the sticky masthead, never under it. */
body.v2 .company-tooltip { z-index: 90; }

/* ---------- Keep the table high on the page ---------- */
@media (min-width: 701px) {
  body.v2 .panel-head { padding: 14px 20px 12px; }
  body.v2 .panel-head #list-meta:not(:empty) { max-width: 110ch; }
  body.v2 .ranking-methodology summary { padding-top: 9px; padding-bottom: 9px; }
}
