/* Fire Charts — styles of the terminal. Everything is scoped under .fc-app
   (the class the library adds to your container). Give the container a
   height. Colors and radius are CSS variables: override them on the
   container to match your site; .fc-light switches the defaults to a light
   palette (or pass { theme: 'light' }). */
.fc-app {
  --fc-bg: #12161d; --fc-text: #e6edf3; --fc-muted: #8b949e; --fc-line: rgba(255, 255, 255, .12);
  --fc-accent: #6c8cff; --fc-up: #2ebd85; --fc-down: #f6465d; --fc-radius: 8px;
  position: relative; display: flex; flex-direction: column; min-height: 320px; box-sizing: border-box;
  border: 1px solid var(--fc-line); border-radius: var(--fc-radius); background: var(--fc-bg); color: var(--fc-text);
  font: 13px/1.3 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow: hidden;
}
.fc-app.fc-light { --fc-bg: #ffffff; --fc-text: #131722; --fc-muted: #6b7280; --fc-line: rgba(0, 0, 0, .12); --fc-accent: #2962ff; --fc-up: #089981; --fc-down: #f23645; }
.fc-app *, .fc-app *::before, .fc-app *::after { box-sizing: border-box; }
.fc-app.fc-full { position: fixed; inset: 0; z-index: 1000; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
.fc-app:fullscreen { height: 100dvh; border: 0; border-radius: 0; }
.fc-grow { flex: 1 1 auto; }
.fc-app button { font: inherit; color: inherit; cursor: pointer; }
.fc-app button:focus-visible, .fc-app a:focus-visible, .fc-app input:focus-visible { outline: 2px solid var(--fc-accent); outline-offset: -2px; }

.fc-tabs { display: flex; align-items: flex-end; gap: 10px; padding: 6px 8px 0; border-bottom: 1px solid var(--fc-line); }
.fc-tablist { display: flex; align-items: flex-end; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.fc-tablist::-webkit-scrollbar { display: none; }
.fc-tab { display: flex; align-items: center; flex: none; border: 1px solid transparent; border-bottom: 0; border-radius: var(--fc-radius) var(--fc-radius) 0 0; color: var(--fc-muted); }
.fc-tab.on { background: color-mix(in srgb, var(--fc-text) 7%, transparent); border-color: var(--fc-line); color: var(--fc-text); }
.fc-tab-n { padding: 7px 10px; border: 0; background: none; white-space: nowrap; font-weight: 600; }
.fc-tab-x { padding: 4px 8px 4px 0; border: 0; background: none; color: var(--fc-muted); font-size: 16px; line-height: 1; }
.fc-tab-x:hover { color: var(--fc-down); }
.fc-tab-add { display: flex; align-items: center; flex: none; padding: 5px 8px; border: 0; background: none; color: var(--fc-muted); }
.fc-tab-add:hover { color: var(--fc-text); }
.fc-status { flex: none; padding: 0 4px 7px; color: var(--fc-muted); font-size: 12px; white-space: nowrap; }
.fc-status a { color: var(--fc-accent); text-decoration: none; }

.fc-top, .fc-bottom { display: flex; align-items: center; gap: 4px; padding: 5px 8px; overflow-x: auto; scrollbar-width: none; }
.fc-top::-webkit-scrollbar, .fc-bottom::-webkit-scrollbar, .fc-tfs::-webkit-scrollbar { display: none; }
.fc-top { border-bottom: 1px solid var(--fc-line); }
.fc-bottom { border-top: 1px solid var(--fc-line); }
.fc-sep { flex: none; width: 1px; height: 20px; margin: 0 4px; background: var(--fc-line); }
.fc-tb, .fc-ib, .fc-sym, .fc-tf { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 30px; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--fc-radius); background: none; color: var(--fc-text); white-space: nowrap; text-decoration: none; }
.fc-ib { justify-content: center; width: 32px; padding: 4px; }
.fc-tb:hover, .fc-ib:hover, .fc-sym:hover, .fc-tf:hover { background: color-mix(in srgb, var(--fc-text) 8%, transparent); }
.fc-tb:disabled, .fc-ib:disabled { opacity: .35; cursor: default; }
.fc-sym { border-color: var(--fc-line); max-width: 300px; }
.fc-sym b { font-weight: 700; }
.fc-sym span { color: var(--fc-muted); overflow: hidden; text-overflow: ellipsis; }
.fc-tfs, .fc-ranges, .fc-scales { display: flex; gap: 1px; flex: none; }
.fc-tfs { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.fc-tf { min-height: 28px; padding: 3px 7px; color: var(--fc-muted); font-weight: 600; }
.fc-tf.on { color: var(--fc-accent); background: color-mix(in srgb, var(--fc-accent) 14%, transparent); }
.fc-page { color: var(--fc-accent); }

.fc-body { display: flex; flex: 1 1 auto; min-height: 0; }
.fc-tools { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; width: 42px; padding: 6px 4px; border-right: 1px solid var(--fc-line); overflow-y: auto; scrollbar-width: none; }
.fc-tools::-webkit-scrollbar { display: none; }
.fc-tools .fc-ib.on, .fc-top .fc-ib.on { color: var(--fc-accent); background: color-mix(in srgb, var(--fc-accent) 16%, transparent); }
.fc-tools .fc-ib.strong { box-shadow: inset 0 0 0 1px var(--fc-accent); }
.fc-more { position: relative; }
.fc-more::after { content: ''; position: absolute; right: 3px; bottom: 3px; border: 3px solid transparent; border-right-color: var(--fc-muted); border-bottom-color: var(--fc-muted); }
.fc-tsep { flex: none; width: 22px; height: 1px; margin: 4px 0; background: var(--fc-line); }
.fc-grid { display: grid; flex: 1 1 auto; min-width: 0; min-height: 0; gap: 1px; background: var(--fc-line); }
.fc-l-1 { grid-template: 1fr / 1fr; }
.fc-l-2h { grid-template: 1fr / 1fr 1fr; }
.fc-l-2v { grid-template: 1fr 1fr / 1fr; }
.fc-l-4 { grid-template: 1fr 1fr / 1fr 1fr; }
.fc-cell { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--fc-bg); }
.fc-cell.on { box-shadow: inset 0 0 0 1px var(--fc-accent); }
.fc-cell-h { display: none; align-items: baseline; gap: 6px; flex: none; padding: 4px 8px; border: 0; border-bottom: 1px solid var(--fc-line); background: none; text-align: left; white-space: nowrap; overflow: hidden; }
.fc-grid:not(.fc-l-1) .fc-cell-h { display: flex; }
.fc-cell-h b { font-weight: 700; }
.fc-cell-h span { color: var(--fc-muted); overflow: hidden; text-overflow: ellipsis; }
.fc-cell-h i { color: var(--fc-accent); font-style: normal; font-weight: 600; }
.fc-chart { flex: 1 1 auto; min-height: 0; }
.fc-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: var(--fc-radius); background: var(--fc-bg); color: var(--fc-muted); pointer-events: none; }

.fc-pop { position: absolute; z-index: 40; display: flex; flex-direction: column; min-width: 180px; max-width: min(360px, calc(100% - 12px)); max-height: min(70%, 460px); padding: 6px; border: 1px solid var(--fc-line); border-radius: var(--fc-radius); background: var(--fc-bg); box-shadow: 0 12px 32px rgba(0, 0, 0, .4); overflow: hidden; }
.fc-search, .fc-inds { width: 340px; }
.fc-mi, .fc-ri { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--fc-radius); background: none; text-align: left; white-space: nowrap; }
.fc-mi:hover, .fc-ri:hover { background: color-mix(in srgb, var(--fc-text) 8%, transparent); }
.fc-mi.on { color: var(--fc-accent); font-weight: 600; }
.fc-ri b { flex: none; min-width: 64px; font-weight: 700; }
.fc-ri span { flex: 1 1 auto; color: var(--fc-muted); overflow: hidden; text-overflow: ellipsis; }
.fc-ri i { flex: none; color: var(--fc-muted); font-size: 11px; font-style: normal; }
.fc-in { width: 100%; margin-bottom: 4px; padding: 8px 10px; border: 1px solid var(--fc-line); border-radius: var(--fc-radius); background: color-mix(in srgb, var(--fc-text) 5%, transparent); color: var(--fc-text); font: inherit; }
.fc-res, .fc-ilist { overflow-y: auto; min-height: 0; }
.fc-hint { padding: 6px 8px 2px; color: var(--fc-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.fc-ia { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: var(--fc-radius); }
.fc-ia.focus { background: color-mix(in srgb, var(--fc-accent) 12%, transparent); }
.fc-ia b { flex: 1 1 auto; font-weight: 700; }
.fc-ip { width: 52px; padding: 4px 6px; border: 1px solid var(--fc-line); border-radius: var(--fc-radius); background: color-mix(in srgb, var(--fc-text) 5%, transparent); color: var(--fc-text); font: inherit; }

.fc-sel { position: absolute; z-index: 30; left: 50%; top: 92px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--fc-line); border-radius: var(--fc-radius); background: var(--fc-bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.fc-sel[hidden] { display: none; }
.fc-sw { width: 20px; height: 20px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--sw); }
.fc-sw.on { border-color: var(--fc-text); }


@media (max-width: 640px) {
  .fc-app { font-size: 12px; }
  .fc-status span { display: none; }
  .fc-sym span, .fc-tb > span { display: none; }
  .fc-tools { width: 38px; padding: 4px 2px; }
  .fc-l-2h { grid-template: 1fr 1fr / 1fr; }
  .fc-page { display: none; }
  .fc-search, .fc-inds { width: calc(100% - 12px); }
}
