/* 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-status-bad { max-width: 50%; overflow: hidden; text-overflow: ellipsis; color: var(--fc-down); }

.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); }
/* The top bar never scrolls: what does not fit loses its text label
   (.fc-compact), then moves to the "More" menu (.fc-off); the row of intervals
   becomes a drop-down. The shell decides by the width it has — fitTop() in
   fire-charts.js, docs/FEATURES.md, "The top bar" */
.fc-top { gap: 2px; overflow: hidden; }
.fc-top > .fc-off, .fc-top > [hidden] { display: none !important; }
/* While the shell measures, a button its module has hidden for this symbol
   takes part too: the set of buttons in the menu then does not change from
   symbol to symbol */
.fc-top.fc-fit > [hidden] { display: inline-flex !important; }
.fc-top > .fc-tb.fc-compact { justify-content: center; width: 32px; padding: 4px; }
.fc-top > .fc-tb.fc-compact > span { display: none; }
.fc-tfs > .fc-tf-drop { display: none; gap: 3px; }
.fc-tfs.fc-compact > .fc-tf { display: none; }
.fc-tfs.fc-compact > .fc-tf-drop { display: inline-flex; }
.fc-top-menu .fc-mi { color: var(--fc-text); text-decoration: none; }
.fc-top-menu .fc-mi > svg { flex: none; }
.fc-top-menu .fc-mi:disabled { opacity: .35; cursor: default; }
.fc-bottom { border-top: 1px solid var(--fc-line); }
.fc-sep { flex: none; width: 9px; height: 20px; background: linear-gradient(var(--fc-line), var(--fc-line)) center / 1px 100% no-repeat; }
.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); width: 168px; }
.fc-sym > svg { flex: none; }
.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-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 { width: 340px; }
.fc-pop.fc-inds { width: 420px; max-width: min(420px, calc(100% - 12px)); max-height: min(82%, 580px); }
.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-iscroll { overflow-y: auto; min-height: 0; }
.fc-iscroll { flex: 1 1 auto; overscroll-behavior: contain; }
.fc-ichips { display: flex; flex: none; flex-wrap: wrap; gap: 4px; margin: 2px 0 4px; }
.fc-ichip { display: inline-flex; flex: none; align-items: center; gap: 4px; min-height: 26px; padding: 2px 9px; border: 1px solid var(--fc-line); border-radius: 999px; background: none; color: var(--fc-muted); font-size: 12px; white-space: nowrap; }
.fc-ichip:hover { color: var(--fc-text); }
.fc-ichip.on { border-color: var(--fc-accent); background: color-mix(in srgb, var(--fc-accent) 16%, transparent); color: var(--fc-text); }
.fc-ichip i { color: var(--fc-accent); font-style: normal; font-weight: 700; }
.fc-ichip i:empty { display: none; }
.fc-ir { display: flex; align-items: center; }
.fc-ir .fc-ri { flex: 1 1 auto; min-width: 0; width: auto; }
.fc-ir .fc-ri b { min-width: 86px; }
.fc-ri.act { background: color-mix(in srgb, var(--fc-text) 8%, transparent); }
.fc-ri i { color: var(--fc-accent); }
.fc-ir .fc-ib { flex: none; width: 28px; min-height: 28px; color: var(--fc-muted); }
.fc-ir .fc-ib svg { width: 16px; height: 16px; }
.fc-ir-fav.on { color: var(--fc-accent); }
.fc-ir-fav.on svg { fill: currentColor; }
.fc-ir-fav:not(.on) { opacity: .45; }
.fc-ir:hover .fc-ir-fav, .fc-ir-fav:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .fc-ir-info { display: none; } }
.fc-idesc { flex: none; height: 62px; margin-top: 4px; padding: 5px 8px 0; border-top: 1px solid var(--fc-line); color: var(--fc-muted); font-size: 12px; line-height: 1.45; overflow-y: auto; }
.fc-idesc b { color: var(--fc-text); }
.fc-idesc i { font-style: normal; opacity: .75; }
.fc-hint-text { text-transform: none; letter-spacing: 0; font-size: 12px; }
.fc-hint { padding: 6px 8px 2px; color: var(--fc-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.fc-ia { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; padding: 3px 4px 3px 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; min-width: 56px; padding-bottom: 6px; font-weight: 700; }
.fc-il { display: inline-flex; flex-direction: column; gap: 1px; min-width: 0; }
.fc-ion-more { color: var(--fc-accent); font-size: 12px; }
.fc-il span { max-width: 72px; min-height: 13px; color: var(--fc-muted); font-size: 10px; line-height: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-il:has(.fc-ip-wide) span { max-width: 104px; }
.fc-ia .fc-ib { width: 28px; }
/* display of a button would beat the attribute: a hidden chip or "reset" stays hidden */
.fc-inds [hidden] { display: none; }
.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-ip-wide { width: 104px; }
select.fc-ip { padding: 4px 2px; }
select.fc-ip option { background: var(--fc-bg); color: var(--fc-text); }

.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); }

/* Places for feature modules (docs/FEATURES.md): a dock to the right of the
   charts for their panels (ctx.ui.sidePanel) and a window in the middle
   (ctx.ui.openDialog). A module's own rules come with the module (its `css`),
   not in this file. */
.fc-side { display: flex; flex-direction: column; flex: none; width: var(--fc-side-w, 280px); min-height: 0; border-left: 1px solid var(--fc-line); background: var(--fc-bg); }
.fc-side[hidden], .fc-panel[hidden] { display: none; }
.fc-panel { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.fc-panel + .fc-panel { border-top: 1px solid var(--fc-line); }
.fc-panel-h { display: flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 2px 4px 2px 10px; border-bottom: 1px solid var(--fc-line); }
.fc-panel-h b { flex: 1 1 auto; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-panel-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* A shelf under the charts for wide panels (ctx.ui.bottomPanel): the charts give it their room */
.fc-shelf { display: flex; flex: none; height: min(var(--fc-shelf-h, 260px), 55%); min-height: 0; border-top: 1px solid var(--fc-line); background: var(--fc-bg); }
.fc-shelf[hidden] { display: none; }
.fc-shelf > .fc-panel { min-width: 0; }
.fc-shelf > .fc-panel + .fc-panel { border-top: 0; border-left: 1px solid var(--fc-line); }
.fc-pop.fc-dialog { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); }

/* The embedded mode — one chart inside a page (options.embed; docs/API.md,
   "Embedded chart"): no tabs and no bottom bar, the drawing toolbar opens over
   the chart by its button on the bar, and the bar itself is a row above the
   chart (.fc-embed-top) or a strip over its top left corner (.fc-embed-over:
   the chart keeps the whole container; --fc-embed-bar is how wide the strip
   may get). Menus and dialogs go to a layer above the page (.fc-portal), so a
   small container does not cut them. */
.fc-app.fc-embed { min-height: 0; overflow: visible; }
.fc-embed > .fc-tabs, .fc-embed > .fc-bottom > :not(.fc-live) { display: none; }
.fc-embed > .fc-bottom { position: absolute; z-index: 6; right: 64px; bottom: 28px; padding: 0; border: 0; overflow: visible; pointer-events: none; }
.fc-embed > .fc-bottom > .fc-live { pointer-events: auto; width: 28px; min-height: 28px; padding: 3px; border-color: var(--fc-line); background: var(--fc-bg); }
.fc-embed > .fc-bottom > .fc-live[hidden] { display: none; }
.fc-embed > .fc-body { position: relative; }
/* The engine's own layers (pane separators) stay under the bar and the toolbar that lie over the chart */
.fc-embed .fc-grid { isolation: isolate; }
.fc-embed .fc-tools { display: none; position: absolute; z-index: 6; left: 0; top: 0; bottom: 0; flex-wrap: wrap; align-content: flex-start; width: auto; background: var(--fc-bg); overflow: hidden; }
.fc-embed.fc-tools-on .fc-tools { display: flex; }
.fc-embed .fc-tools .fc-tsep { display: none; }
.fc-embed-over > .fc-top { position: absolute; z-index: 7; left: 4px; top: 4px; width: min(var(--fc-embed-bar, 320px), calc(100% - 72px)); padding: 0; border: 0; pointer-events: none; }
.fc-embed-over > .fc-top > * { pointer-events: auto; min-height: 28px; background: color-mix(in srgb, var(--fc-bg) 84%, transparent); }
.fc-embed-over > .fc-top > .fc-ib, .fc-embed-over > .fc-top > .fc-tb.fc-compact { width: 28px; }
.fc-embed-over > .fc-top > .fc-grow, .fc-embed-over > .fc-top > .fc-sep { display: none !important; }
.fc-embed-over .fc-tools { top: 36px; border: 1px solid var(--fc-line); border-left: 0; border-radius: 0 var(--fc-radius) var(--fc-radius) 0; }
.fc-embed-over .fc-sel { top: 40px; }
.fc-app.fc-portal { position: fixed !important; inset: 0 !important; z-index: 2147483000; display: block !important; width: auto !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important; overflow: hidden !important; visibility: visible !important; opacity: 1 !important; transform: none !important; pointer-events: none !important; }
.fc-portal > .fc-pop { pointer-events: auto; }
.fc-portal:empty { display: none !important; }

@media (max-width: 640px) {
  .fc-app { font-size: 12px; }
  .fc-status span { display: none; }
  .fc-status-bad span { display: inline; }
  .fc-sym span, .fc-tb > span { display: none; }
  .fc-sym { width: auto; max-width: 96px; }
  .fc-sym b { overflow: hidden; text-overflow: ellipsis; }
  .fc-top { padding: 5px 6px; }
  .fc-top > .fc-sep { display: none; }
  .fc-top.fc-fit > .fc-sep { display: none !important; }
  .fc-tools { width: 38px; padding: 4px 2px; }
  .fc-l-2h { grid-template: 1fr 1fr / 1fr; }
  .fc-search, .fc-pop.fc-inds { width: calc(100% - 12px); }
  .fc-pop.fc-inds { max-width: none; max-height: calc(100% - 12px); }
  .fc-ir .fc-ri b { min-width: 76px; }
  /* On a phone a panel slides over the charts instead of squeezing them */
  .fc-body { position: relative; }
  .fc-side { position: absolute; top: 0; right: 0; bottom: 0; z-index: 35; width: min(88%, var(--fc-side-w, 280px)); box-shadow: -12px 0 32px rgba(0, 0, 0, .4); }
}

/* Chart kinds and custom intervals: the "Chart type" menu with its groups and
   settings, the settings window of a kind (kinds.js), the intervals menu (tf-menu.js) */
.fc-menu.fc-scroll, .fc-pop.fc-tfm { max-height: min(calc(100% - 60px), 640px); overflow-y: auto; }
.fc-menu-sep { display: block; flex: none; height: 1px; margin: 4px 6px; background: var(--fc-line); }
.fc-menu-note { max-width: 230px; margin: 4px 8px 2px; color: var(--fc-muted); font-size: 11px; line-height: 1.35; white-space: normal; }
.fc-mi > span:first-child { flex: 1 1 auto; }
.fc-mi-act { display: inline-flex; flex: none; margin: -3px -4px -3px 8px; padding: 3px; border-radius: var(--fc-radius); color: var(--fc-muted); }
.fc-mi-act:hover { color: var(--fc-text); background: color-mix(in srgb, var(--fc-text) 12%, transparent); }
.fc-mi-act svg { width: 16px; height: 16px; }
.fc-tf.fc-tf-more { padding: 3px 4px; }
.fc-pop.fc-tfm { width: 292px; }
.fc-tfm-row { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 4px 4px; }
.fc-tfm-star svg { flex: none; width: 16px; height: 16px; }
.fc-tfm-star.on svg { fill: currentColor; }
.fc-tfm-star span { white-space: normal; }
.fc-tfm-form { display: flex; align-items: center; gap: 6px; padding: 2px 8px 4px; }
.fc-tfm-form .fc-ip { width: 68px; min-height: 30px; }
.fc-tfm-form .fc-tfm-unit { flex: 1 1 auto; width: auto; min-width: 0; }
.fc-tfm-note { margin: 2px 8px 6px; color: var(--fc-muted); font-size: 11px; line-height: 1.35; white-space: normal; }
.fc-tfm-note.bad { color: var(--fc-down); }
.fc-app select option { background: var(--fc-bg); color: var(--fc-text); }
.fc-pop.fc-dialog.fc-kind-dialog { width: min(380px, calc(100% - 24px)); }
.fc-dialog-h { display: flex; align-items: center; gap: 6px; padding: 0 0 6px 8px; }
.fc-dialog-h b { flex: 1 1 auto; font-weight: 700; }
.fc-kind-form { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 8px; }
.fc-kind-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fc-kind-row[hidden] { display: none; }
.fc-kind-row input, .fc-kind-row select { flex: none; width: 196px; max-width: 58%; padding: 6px 8px; 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-kind-form .fc-hint { padding: 0; font-size: 12px; line-height: 1.4; text-transform: none; letter-spacing: 0; }
.fc-kind-foot { display: flex; justify-content: flex-end; gap: 8px; }
