/* ==========================================================================
   Extras (features.js): header tools, recent searches, chain badge, palette,
   onboarding, watchlist, case tools, event filters, compare, light mode, print.
   ========================================================================== */
.ft-tools { display: flex; align-items: center; gap: 6px; margin-left: 0; }
.ft-ib { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--dim); cursor: pointer; text-decoration: none; transition: color .25s, border-color .25s; }
.ft-ib:hover { color: var(--fg); border-color: var(--fg); }
.ft-ib svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ft-ib b { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--sig); color: #000; font: 600 10px/16px var(--tm); text-align: center; }
.top-in .ft-tools + .hacked { margin-left: 0; }
.ft-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ft-recent-l { font: 500 11px var(--tm); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-right: 4px; }
.ft-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: rgba(16,16,16,.7); }
.ft-chip button { border: 0; background: none; color: var(--fg); cursor: pointer; font: 400 12px var(--tm); padding: 5px 10px; }
.ft-chip-go:hover { color: var(--sig); }
.ft-chip-x { color: var(--faint) !important; padding: 5px 9px 5px 4px !important; border-left: 1px solid var(--line) !important; }
.ft-chip-x:hover { color: var(--danger) !important; }
.ft-chip-clear { border: 0; background: none; color: var(--faint); cursor: pointer; font: 400 12px var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.ft-chip-clear:hover { color: var(--fg); }
.ft-chain { flex: none; font: 500 11px var(--tm); color: var(--sig); border: 1px solid rgba(182,255,110,.4); border-radius: 999px; padding: 3px 9px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ft-chain[hidden] { display: none; }
@media (max-width: 760px) { .ft-chain { display: none !important; } }

.ft-pal, .ft-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); display: grid; place-items: start center; padding: 12vh 16px 16px; animation: ft-in .15s ease-out; }
.ft-modal { place-items: center; }
@keyframes ft-in { from { opacity: 0; } }
.ft-pal-box, .ft-modal-box { width: min(620px, 100%); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,1); }
.ft-modal-box { padding: 26px 26px 24px; }
.ft-modal-box h2 { margin: 0 0 8px; font-size: 1.4rem; }
.ft-modal-box p { font-size: 14px; line-height: 1.65; }
.ft-modal-box .btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.ft-onb-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.ft-onb-dots i { width: 28px; height: 3px; border-radius: 2px; background: var(--line-strong); }
.ft-onb-dots i.on { background: var(--sig); }
#ft-pal-q { width: 100%; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: none !important; padding: 16px 18px; font: 400 15px var(--sans); color: var(--fg); outline: none; }
#ft-pal-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
#ft-pal-list li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
#ft-pal-list li b { font-weight: 500; color: var(--fg); }
#ft-pal-list li span { font-size: 12px; color: var(--dim); }
#ft-pal-list li[aria-selected="true"], #ft-pal-list li:hover { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--sig); }
.ft-pal-empty { color: var(--faint); font-size: 13px; }
.ft-pal-foot { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); font: 400 11px var(--tm); color: var(--faint); }
.ft-kbd { border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }

.ft-page { max-width: 900px; padding-top: 40px; padding-bottom: 60px; }
.ft-page h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); margin-bottom: 14px; }
.ft-form { display: flex; gap: 8px; margin: 22px 0 14px; }
.ft-form input { flex: 1; min-width: 0; padding: 11px 14px; }
.ft-form-2 { flex-wrap: wrap; }
.ft-form-2 input { flex: 1 1 260px; }
.ft-notif { margin: 0 0 20px; font-size: 13px; }
.ft-ok { color: var(--sig); font-family: var(--tm); font-size: 12px; }
.ft-wl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ft-wl li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ft-wl-main { display: grid; gap: 3px; min-width: 0; }
.ft-wl-main b { font-weight: 400; font-size: 12px; word-break: break-all; color: var(--fg); }
.ft-wl-note { font-size: 13px; color: var(--dim); }
.ft-wl-main small, .ft-wl-last small { font: 400 11px var(--tm); color: var(--faint); }
.ft-wl-last { font-size: 13px; color: var(--fg); }
.ft-wl-act { display: flex; gap: 6px; }
.ft-sev { font: 500 10px var(--tm); letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; color: var(--dim); }
.ft-sev.critical { color: var(--danger); border-color: rgba(255,92,122,.5); } .ft-sev.high { color: var(--fg); } .ft-sev.medium { color: var(--sig); border-color: rgba(182,255,110,.4); }
.ft-empty { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--dim); }
.btn-small { padding: 6px 12px; font-size: 12px; }
@media (max-width: 700px) { .ft-wl li { grid-template-columns: 1fr; gap: 8px; } .ft-form { flex-wrap: wrap; } .ft-form input { flex: 1 1 100%; } }

.ft-case-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ft-qr { margin-left: 6px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--faint); font: 500 10px var(--tm); letter-spacing: .08em; padding: 1px 7px; cursor: pointer; vertical-align: middle; }
.ft-qr:hover { color: var(--sig); border-color: var(--sig); }
.ft-qr-box { text-align: center; }
#ft-qr-img { width: min(260px, 70vw); margin: 0 auto 14px; background: #fff; padding: 10px; border-radius: 10px; }
#ft-qr-img svg { display: block; width: 100%; height: auto; }
.ft-qr-box p { word-break: break-all; font-size: 12px; }

.ft-ev-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.ft-ev-tools select { width: auto; flex: none; font: 400 11px var(--tm); padding: 5px 24px 5px 10px !important; border-radius: 999px !important; }
.ft-ev-tools .btn.on { background: var(--sig); color: #000; border-color: var(--sig); }
.ft-ev-n { margin-left: auto; font: 400 11px var(--tm); color: var(--faint); }

.ft-cmp-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin: 10px 0 22px; }
.ft-cmp-card { display: grid; gap: 6px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); }
.ft-cmp-card:hover { border-color: var(--line-strong); }
.ft-cmp-card b { font-weight: 400; font-size: 14px; }
.ft-cmp-card small { font-size: 12px; color: var(--dim); }
.ft-cmp-mid { display: grid; place-items: center; width: 56px; font-size: 1.6rem; color: var(--faint); }
.ft-cmp-mid.hit { color: var(--sig); }
.ft-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 14px 0; }
.ft-table td, .ft-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ft-table td.mono { font-size: 12px; word-break: break-all; }
.ft-status { min-height: 1.4em; color: var(--sig); }
@media (max-width: 700px) { .ft-cmp-grid { grid-template-columns: 1fr; } .ft-cmp-mid { width: auto; } }

.ft-no-trans, .ft-no-trans * { transition: none !important; }

/* ---------------------------------------------------------------- light mode */
html[data-theme="light"] { color-scheme: light;
  --bg: #f4f4f2; --panel: #ffffff; --panel-2: #f0f0ee; --fg: #111111; --dim: #5f5f5f; --faint: #9a9a9a;
  --line: rgba(0,0,0,.12); --line-strong: rgba(0,0,0,.24); --sig: #4f9d00; --sig-dim: rgba(79,157,0,.12); --danger: #d6264a; --warn: #b36b00; }
html[data-theme="light"] body { background: var(--bg) !important; }
html[data-theme="light"] .fx-stars { display: none !important; }
html[data-theme="light"] .fx-glow { background: radial-gradient(60vw 60vh at 50% 30%, rgba(0,0,0,.06), transparent 70%) !important; }
html[data-theme="light"] .top { background: linear-gradient(rgba(244,244,242,.92) 30%, rgba(244,244,242,.6)) !important; }
html[data-theme="light"] .top-in a.hacked { background: #111; color: #fff; }
html[data-theme="light"] .top-in a.hacked::before { background: #fff; }
html[data-theme="light"] .top-in a.hacked:hover { background: var(--sig); }
html[data-theme="light"] .btn-primary, html[data-theme="light"] .dlsafe-go, html[data-theme="light"] .token-strip .ts-more, html[data-theme="light"] .ft-ev-tools .btn.on, html[data-theme="light"] .ft-ib b { color: #fff !important; }
html[data-theme="light"] .btn-primary:hover { background: #111 !important; color: #fff !important; }
html[data-theme="light"] .brand-mark { color: #111; }
html[data-theme="light"] .aurora-fx { opacity: .08; filter: grayscale(1) invert(1); }
html[data-theme="light"] .aurora::before { background: linear-gradient(90deg, rgba(244,244,242,.95), rgba(244,244,242,.5) 50%, rgba(244,244,242,0) 80%), linear-gradient(0deg, #f4f4f2, transparent 25%); }
html[data-theme="light"] .aurora-omni .omni-row, html[data-theme="light"] .token-strip, html[data-theme="light"] .mon-banner, html[data-theme="light"] .ft-chip { background: rgba(255,255,255,.9); }
html[data-theme="light"] .mon-globe { background: #0b0b0b; border-radius: 12px; }
html[data-theme="light"] .mp-hero { background: #0b0b0b !important; }
html[data-theme="light"] .hud { background: rgba(255,255,255,.92) !important; }
html[data-theme="light"] .ring-bg { stroke: rgba(0,0,0,.1); }
html[data-theme="light"] .area circle { fill: #fff; }
html[data-theme="light"] .hb-t, html[data-theme="light"] .ft-onb-dots i { background: rgba(0,0,0,.1); }
html[data-theme="light"] .ft-onb-dots i.on { background: var(--sig); }
html[data-theme="light"] ::selection { background: var(--sig); color: #fff; }
html[data-theme="light"] .ft-pal, html[data-theme="light"] .ft-modal { background: rgba(244,244,242,.75); }
html[data-theme="light"] .toast { background: #111; color: #fff; }
html[data-theme="light"] .nav-bottom { background: rgba(244,244,242,.9); }
html[data-theme="light"] .mon-legend li:nth-child(2) i { background: #111 !important; }
html[data-theme="light"] .vbars rect[fill="#FFA64D"] { fill: #111; }
html[data-theme="light"] .graph, html[data-theme="light"] .graph-wrap { background: #0b0b0b; }

/* ---------------------------------------------------------------- print */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .fx, .top, .nav-bottom, .foot, .ft-case-tools, .ft-qr, .graph-tools, .aurora-fx, .toast, .journey, .btn-row, #ft-tools { display: none !important; }
  main { padding: 0 !important; }
  .verdict, .panel, .finding, .section { background: none !important; border-color: #ccc !important; box-shadow: none !important; color: #000 !important; }
  h1, h2, h3, p, li, td, th, .verdict-line, .verdict-line span { color: #000 !important; }
  a { color: #000 !important; text-decoration: none; }
  .addr-text { font-family: ui-monospace, monospace; }
  .graph { height: 420px !important; }
}

/* ---------------------------------------------------------------- Built on Robinhood Chain band */
.rh { max-width: 1240px; margin: 8px auto 0; padding: 48px max(16px, 3vw) 24px; border-top: 1px solid var(--line); }
.rh-in { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .rh-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; } }
.rh-copy h2 { font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); line-height: 1.08; margin: 0 0 14px; }
.rh-copy p:last-child { font-size: 15px; line-height: 1.7; color: var(--dim); max-width: 52ch; }
.rh-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.rh-facts li { display: grid; gap: 6px; padding: 20px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.rh-facts b { font: 500 2rem/1 var(--sans); letter-spacing: -0.04em; color: var(--fg); }
.rh-facts li:last-child b { color: var(--sig); font-size: 1.5rem; }
.rh-facts span { font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.foot-rh { color: var(--faint); font-size: 12px; margin: 0; }
@media (max-width: 760px) { .rh { padding-top: 32px; } .rh-facts { grid-template-columns: 1fr 1fr; } .rh-facts b { font-size: 1.5rem; } }

/* ---------------------------------------------------------------- live ticker */
.ft-ticker { display: flex; align-items: center; gap: 14px; padding: 8px max(16px, 3vw); border-bottom: 1px solid var(--line); background: rgba(0,0,0,.35); overflow: hidden; }
.ft-tk-live { flex: none; font: 500 10px var(--tm); letter-spacing: .14em; text-transform: uppercase; color: var(--sig); }
.ft-tk-live.off { color: var(--faint); }
.ft-tk-wrap { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ft-tk-track { display: inline-flex; gap: 28px; white-space: nowrap; animation: ft-marquee 70s linear infinite; }
.ft-tk-track:hover { animation-play-state: paused; }
@keyframes ft-marquee { to { transform: translateX(-50%); } }
.ft-tk-i { display: inline-flex; align-items: baseline; gap: 6px; font: 400 12px var(--tm); color: var(--fg); }
.ft-tk-i b { font-weight: 500; color: var(--dim); }
.ft-tk-i i { font-style: normal; font-size: 11px; color: var(--faint); }
.ft-tk-i i.up { color: var(--sig); } .ft-tk-i i.down { color: var(--danger); }
.ft-tk-c.flash { animation: ft-flash .9s ease-out; }
@keyframes ft-flash { 0% { color: var(--sig); } 100% { color: var(--fg); } }
@media (prefers-reduced-motion: reduce) { .ft-tk-track { animation: none; } }
html[data-theme="light"] .ft-ticker { background: rgba(255,255,255,.5); }

/* ---------------------------------------------------------------- live pulse panel */
.ft-pulse { flex: 0 0 380px; align-self: flex-start; max-height: 560px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 16px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 30px 80px -40px rgba(0,0,0,1); min-width: 0; }
.ft-pl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ft-pl-live { font: 500 11px var(--tm); letter-spacing: .14em; text-transform: uppercase; color: var(--sig); }
.ft-pl-sub { font: 400 11px var(--tm); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; align-content: start; flex: 1; }
.ft-pl-row { display: grid; grid-template-columns: 58px 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font: 400 12.5px var(--sans); }
.ft-pl-row:first-child { border-top: 0; }
.ft-pl-row.new { animation: ft-new 1.2s ease-out; }
@keyframes ft-new { 0% { background: rgba(182,255,110,.18); } 100% { background: transparent; } }
.ft-pl-t { font: 400 11px var(--tm); color: var(--sig); } .ft-pl-row.crit .ft-pl-t { color: var(--danger); } .ft-pl-row.high .ft-pl-t { color: var(--fg); }
.ft-pl-c { font: 400 10px var(--tm); color: var(--faint); }
.ft-pl-row a { color: var(--fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-pl-row a:hover { color: var(--sig); }
.ft-pl-row b { font: 500 11px var(--tm); color: var(--dim); }
.ft-pl-empty { font-size: 12.5px; color: var(--faint); padding: 14px 0; }
.ft-pl-chains { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.ft-pl-chains span { display: inline-flex; gap: 6px; align-items: baseline; font: 400 10.5px var(--tm); color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.ft-pl-chains span b { font-weight: 500; color: var(--fg); }
.ft-pl-chains span.off { opacity: .4; }
.ft-pl-chains span.flash { border-color: var(--sig); color: var(--sig); transition: border-color .9s, color .9s; }
.ft-pl-more { font: 600 12px var(--sans); color: var(--sig); text-decoration: none; }
.ft-pl-more:hover { color: var(--fg); }
@media (max-width: 1000px) { .ft-pulse { flex-basis: auto; width: 100%; } }
/* ticker inside the console look */
.ft-ticker { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
html[data-theme="light"] .ft-pulse { background: #fff; }
