:root { --color-accent: #4f46e5; --color-accent-hover: #4338ca; }
html, body { font-family: Inter, system-ui, sans-serif; }
.chart-box { width: 100%; height: 360px; position: relative; }
.chart-box-lg { width: 100%; height: 480px; position: relative; overflow: hidden; }
.chart-watermark {
  position: absolute; left: 0.75rem; top: 0.55rem;
  z-index: 2;
  margin: 0; padding: 0;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(51, 65, 85, 0.32);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
html.dark .chart-watermark { color: rgba(226, 232, 240, 0.34); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.sr-only:focus, .sr-only:focus-visible {
  position: absolute; width: auto; height: auto; margin: 0; clip: auto; overflow: visible;
  top: 0.5rem; left: 0.5rem; z-index: 50; background: #4f46e5; color: #fff;
  padding: 0.5rem 1rem; border-radius: 0.25rem;
}
.safe-area-pb { padding-bottom: calc(8rem + env(safe-area-inset-bottom)); }

@media (min-width: 768px) {
  .md\:pb-8, .safe-area-pb { padding-bottom: 2rem; }
}
.table-wrap { overflow: auto; max-width: 100%; max-height: 480px; scrollbar-width: thin; }
.cal-grid > button { min-width: 0; width: 100%; }
.scroll-cue-shell { position: relative; min-width: 0; }
.scroll-cue { position: relative; }
.scroll-cue-overflow [role="tablist"] { padding-inline-end: 2rem; }
.scroll-cue [role="tab"], .scroll-cue > .cat-chip, .scroll-cue > .cat-chip-off { flex: 0 0 auto; }
.scroll-cue [role="tab"] { scroll-margin-inline: 2rem; }
.scroll-cue-shell.scroll-cue-overflow::after {
  content: ''; position: absolute; inset-block: 0; inset-inline-end: 0; width: 2rem;
  pointer-events: none; background: linear-gradient(to right, transparent, rgba(249,250,251,0.95));
}
.scroll-cue-shell.scroll-cue-overflow::before {
  content: '→'; position: absolute; inset-block: 0; inset-inline-end: 0.35rem; z-index: 1;
  display: flex; align-items: center; pointer-events: none; color: #64748b; font-size: 0.8rem; font-weight: 700;
}
html.dark .scroll-cue-overflow::after { background: linear-gradient(to right, transparent, rgba(17,24,39,0.95)); }
html.dark .scroll-cue-overflow::before { color: #cbd5e1; }
.action-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; }
.action-icon:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.action-icon-edit { color: #4f46e5; }
.action-icon-edit:hover { background: #eef2ff; }
.action-icon-danger { color: #dc2626; }
.action-icon-danger:hover { background: #fef2f2; }
.split-records { display: grid; gap: 0.75rem; }
@media (min-width: 768px) { .split-records { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .split-records { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.split-record { border: 1px solid #e5e7eb; border-radius: 0.75rem; background: #fff; padding: 0.875rem 1rem; }
html.dark .split-record { border-color: #374151; background: #111827; }
.split-record-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 0.625rem; border-bottom: 1px solid #e5e7eb; }
html.dark .split-record-header { border-color: #374151; }
.split-record-actions { display: flex; flex: 0 0 auto; gap: 0.25rem; }
.split-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; margin-top: 0.75rem; }
.split-event { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; padding: 0.5rem 0.625rem; border-radius: 0.5rem; background: #f8fafc; color: #374151; font-size: 0.875rem; }
html.dark .split-event { background: #1f2937; color: #e5e7eb; }
.split-event time { min-width: 0; font-variant-numeric: tabular-nums; }
.split-event-factor { flex: 0 0 auto; border-radius: 9999px; background: #e0e7ff; color: #4338ca; padding: 0.125rem 0.5rem; font-size: 0.75rem; font-weight: 700; }
html.dark .split-event-factor { background: #312e81; color: #c7d2fe; }
.split-empty-state { border: 1px dashed #cbd5e1; border-radius: 0.75rem; padding: 2rem 1rem; text-align: center; color: #6b7280; }
.splits-mobile, .splits-table, .splits-empty-mobile { display: none; }
.broker-grid > * { min-width: 0; }
.broker-grid dl > div { min-width: 0; }
.broker-grid dl dd { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.footer-grid > * { min-width: 0; }
#api-ver { white-space: nowrap; }
.page-header-layout > * { min-width: 0; }
@media (min-width: 1280px) {
  .page-header-layout { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 1rem; }
  .page-header-actions { flex-shrink: 0; }
}
table.trades { width: 100%; min-width: max-content; border-collapse: collapse; font-size: 13px; }
table.trades th, table.trades td { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; text-align: left; white-space: nowrap; }
html.dark table.trades th, html.dark table.trades td { border-color: #1f2937; }
.overflow-x-auto, .overflow-auto { scrollbar-width: thin; }
.overflow-x-auto::-webkit-scrollbar, .overflow-auto::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { height: 6px; width: 6px; }
.overflow-x-auto::-webkit-scrollbar-thumb, .overflow-auto::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
html.dark .overflow-x-auto::-webkit-scrollbar-thumb, html.dark .overflow-auto::-webkit-scrollbar-thumb, html.dark .table-wrap::-webkit-scrollbar-thumb { background: #475569; }
.pos { color: #16a34a; }
.neg { color: #dc2626; }
.bottom-nav { display: none; }
#menu-btn { display: none !important; }
@media (max-width: 767px) {
  .bottom-nav { display: grid; }
  .desktop-nav { display: none !important; }
  #menu-btn { display: inline-flex !important; }
  #settings-btn { display: none !important; }
  footer { padding-bottom: 5.5rem; }
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px; transition: color 150ms, background-color 150ms;
  outline: none;
}
.icon-btn:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1; }
html.dark .icon-btn:focus-visible { box-shadow: 0 0 0 2px #111827, 0 0 0 4px #6366f1; }
.icon-btn-lg { height: 2.5rem; width: 2.5rem; }
.icon-btn-md { height: 2.25rem; width: 2.25rem; }
.icon-btn-glass {
  border: 1px solid #e5e7eb; background: rgba(255,255,255,0.8); color: #374151;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); backdrop-filter: blur(4px);
}
.icon-btn-glass:hover { background: #f3f4f6; color: #111827; }
html.dark .icon-btn-glass {
  border-color: #334155; background: rgba(30,41,59,0.8); color: #e5e7eb;
}
html.dark .icon-btn-glass:hover { background: rgba(51,65,85,0.8); color: #fff; }
.icon-btn-active {
  border-color: #4f46e5; background: #4f46e5; color: #fff;
}
.icon-btn-active:hover { background: #4338ca; color: #fff; }
.bn-icon { padding: 0.375rem; border-radius: 9999px; }
.bn-icon.active { background: #e0e7ff; }
html.dark .bn-icon.active { background: #1e1b4b; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15,23,42,0.45);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-card {
  width: 100%; max-width: 28rem; max-height: calc(100vh - 2rem); overflow-y: auto;
  border-radius: 0.75rem;
  background: #fff; border: 1px solid #e5e7eb; padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
html.dark .modal-card { background: #111827; border-color: #1f2937; color: #f3f4f6; }
.toast {
  position: fixed; right: 1rem; bottom: 5.5rem; z-index: 60;
  border-radius: 0.5rem; padding: 0.75rem 1rem; font-size: 0.875rem;
  background: #111827; color: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
@media (min-width: 768px) { .toast { bottom: 1.5rem; } }
.field {
  border-radius: 0.5rem; border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem; background: #fff;
}
form#set-form .field { width: 100%; display: block; box-sizing: border-box; }
.search-glyph {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 1rem; height: 1rem; color: #9ca3af; pointer-events: none;
}
.enhance-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem; }
.enhance-toolbar-main { flex: 1 1 16rem; min-width: 0; max-width: 560px; }
.enhance-form { display: flex; flex-direction: row; align-items: stretch; gap: 0.5rem; }
.enhance-search { position: relative; flex: 1; min-width: 0; }
.enhance-input {
  width: 100%; box-sizing: border-box;
  padding: 0.625rem 0.75rem 0.625rem 2.5rem;
  border-radius: 0.5rem; border: 1px solid #d1d5db;
  background: #fff; font-family: 'JetBrains Mono', ui-monospace, monospace;
}
html.dark .enhance-input { background: #1f2937; border-color: #4b5563; color: #f3f4f6; }
.enhance-actions { display: flex; flex-shrink: 0; align-items: stretch; gap: 0.5rem; }
.enhance-load {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.75rem; min-width: 2.75rem; padding: 0 1rem; border-radius: 0.5rem;
  background: #4f46e5; color: #fff; font-weight: 500; font-size: 0.875rem;
}
.enhance-load:hover { background: #4338ca; }
.enhance-load:disabled { background: #9ca3af; cursor: not-allowed; }
.enhance-load-label { display: none; }
@media (min-width: 640px) { .enhance-load-label { display: inline; } }
.cat-chip, .cat-chip-off {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500;
  white-space: nowrap; border: 1px solid #e5e7eb; background: #fff; color: #374151;
}
.cat-chip {
  background: #4f46e5; color: #fff; border-color: #4f46e5;
}
.cat-chip-off:hover { background: #f9fafb; }
html.dark .cat-chip { background: #4f46e5; border-color: #4f46e5; color: #fff; }
html.dark .cat-chip-off { background: #1f2937; border-color: #374151; color: #e5e7eb; }
.ticker-card-grid { display: grid; grid-template-columns: 1fr; gap: 0.625rem; }
@media (min-width: 640px) { .ticker-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ticker-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .ticker-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ticker-card {
  text-align: left; padding: 0.625rem; border-radius: 0.5rem;
  border: 1px solid #e5e7eb; background: #f9fafb;
}
.ticker-card:hover { background: #eff6ff; border-color: #93c5fd; }
.ticker-card.loaded { background: #ecfdf5; border: 1px solid #a7f3d0; box-shadow: 0 0 0 1px #a7f3d0; }
html.dark .ticker-card { background: #1f2937; border-color: #374151; }
html.dark .ticker-card.loaded { background: #052e16; border-color: #166534; box-shadow: 0 0 0 1px #166534; }
table.trades td.text-center { text-align: center; white-space: normal; padding: 1rem 8px; }
@media (max-width: 767px) {
  .split-record { padding: 0.75rem; }
  .split-events { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .split-event { font-size: 0.8125rem; }
  .scroll-cue-overflow { padding-inline-end: 1.5rem; }
}
html.dark .field { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.5rem; background: #4f46e5; color: #fff;
  padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 44px;
}
.btn-primary:hover { background: #4338ca; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.5rem; background: #fff; color: #374151;
  border: 1px solid #e5e7eb; padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 44px;
}
html.dark .btn-secondary { background: #1f2937; color: #e5e7eb; border-color: #374151; }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; background: #dc2626; color: #fff;
  border-radius: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem;
}
.btn-danger:hover { background: #b91c1c; }
.cal-weekend { background: #f9fafb; color: #9ca3af; }
html.dark .cal-weekend { background: #0b1220; color: #6b7280; }
.cal-today { outline: 2px solid #4f46e5; outline-offset: -2px; }
html.theme-changing, html.theme-changing * { transition: none !important; }
.chart-hero { width: 100%; height: 375px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.hero-grid > * { min-width: 0; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 280px; } }
.hero-pill {
  border-radius: 9999px; padding: 0.125rem 0.625rem;
  font-size: 11px; font-weight: 600; transition: background-color 150ms, color 150ms;
}
.hero-pill-on { background: #4f46e5; color: #fff; }
.hero-pill-off { background: #e5e7eb; color: #374151; }
.hero-pill-off:hover { background: #d1d5db; }
html.dark .hero-pill-off { background: #1f2937; color: #e5e7eb; }
html.dark .hero-pill-off:hover { background: #374151; }
.hero-range {
  border-radius: 9999px; padding: 0.125rem 0.625rem;
  font-size: 11px; font-weight: 500; transition: background-color 150ms, color 150ms;
}
.hero-range-on { background: #4f46e5; color: #fff; }
.hero-range-off { background: #f3f4f6; color: #374151; }
.hero-range-off:hover { background: #e5e7eb; }
html.dark .hero-range-off { background: #1f2937; color: #e5e7eb; }
html.dark .hero-range-off:hover { background: #374151; }
.hero-tf {
  display: inline-flex; border-radius: 0.5rem; border: 1px solid #e5e7eb;
  background: #f3f4f6; padding: 0.125rem;
}
html.dark .hero-tf { border-color: #374151; background: #1f2937; }
.hero-tf button {
  border-radius: 0.375rem; padding: 0.25rem 0.5rem; font-size: 11px; font-weight: 600;
}
.hero-tf-on { background: #4f46e5; color: #fff; }
html.dark .hero-tf-on { background: #4f46e5; color: #fff; }
.hero-tf-off { color: #4b5563; }
html.dark .hero-tf-off { color: #d1d5db; }
.hero-mkt {
  display: inline-flex; align-items: center; gap: 0.375rem;
  border-radius: 9999px; border: 1px solid; padding: 0.125rem 0.5rem; font-size: 11px;
}
.hero-mkt-open { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
html.dark .hero-mkt-open { background: rgba(6,78,59,0.3); border-color: rgba(6,78,59,0.4); color: #a7f3d0; }
.hero-mkt-closed { background: #fef3c7; border-color: #fde68a; color: #92400e; }
html.dark .hero-mkt-closed { background: rgba(69,26,3,0.3); border-color: rgba(120,53,15,0.4); color: #fde68a; }
.hero-dot { height: 0.5rem; width: 0.5rem; border-radius: 9999px; display: inline-block; }
.hero-pro {
  display: inline-flex; align-items: center; gap: 0.25rem;
  height: 1.75rem; border-radius: 9999px; padding: 0 0.625rem; font-size: 11px;
  border: 1px solid #e5e7eb; background: #fff; color: #374151;
}
html.dark .hero-pro { background: #1f2937; border-color: #374151; color: #e5e7eb; }
.hero-pop {
  position: absolute; right: 0; top: 100%; z-index: 20; margin-top: 0.375rem;
  width: 12rem; padding: 0.625rem; border-radius: 0.5rem;
  border: 1px solid #e5e7eb; background: #fff; box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}
html.dark .hero-pop { background: #111827; border-color: #374151; color: #e5e7eb; }
.hero-kind {
  border-radius: 0.25rem; padding: 0.25rem 0.5rem; font-size: 11px;
}
.hero-kind-on { background: #4f46e5; color: #fff; }
.hero-kind-off { background: #f3f4f6; color: #374151; }
html.dark .hero-kind-off { background: #1f2937; color: #e5e7eb; }
.zone-pct { position: relative; }
.zone-pct input { padding-right: 1.75rem; }
.zone-pct-suffix {
  pointer-events: none; position: absolute; inset: 0 0.75rem 0 auto;
  display: flex; align-items: center; font-size: 12px; color: #9ca3af;
}
.zone-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; }
.hero-footer-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
.enhance-listbox {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  max-height: 16rem; overflow: auto; border-radius: 0.5rem;
  border: 1px solid #e5e7eb; background: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}
html.dark .enhance-listbox { background: #111827; border-color: #374151; }
.enhance-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; text-align: left; padding: 0.5rem 0.75rem; font-size: 0.8125rem;
}
.enhance-opt:hover, .enhance-opt-on { background: #eef2ff; }
html.dark .enhance-opt:hover, html.dark .enhance-opt-on { background: #1e1b4b; }
.raw-json { margin-top: 0.75rem; font-size: 0.75rem; }
.raw-json pre {
  margin: 0.5rem 0 0; max-height: 16rem; overflow: auto;
  padding: 0.75rem; border-radius: 0.5rem; background: #f8fafc;
  white-space: pre-wrap; word-break: break-word;
}
html.dark .raw-json pre { background: #0b1220; }
.hist-css { display: flex; align-items: flex-end; gap: 2px; height: 120px; min-width: 0; overflow-x: auto; }
.hist-css span { display: block; min-width: 3px; flex: 1; border-radius: 2px 2px 0 0; }
.ticker-mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; font-size: 11px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.8125rem; }
.pc-shell { position: relative; display: flex; flex-direction: column; gap: 0.5rem; }
.pc-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.5rem; }
.pc-toolbar-right { margin-left: auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 0.5rem; min-width: 0; }
.pc-ranges { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 0.25rem; overflow-x: auto; }
.pc-ranges .hero-range { min-width: 0; min-height: 0; }
.pc-ticker { position: relative; flex-shrink: 0; }
.pc-ticker-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 13px; font-weight: 700; color: #111827;
  padding: 0.25rem 0.5rem; border-radius: 0.5rem;
}
html.dark .pc-ticker-btn { color: #f3f4f6; }
.pc-ticker-btn:hover { background: #f3f4f6; }
html.dark .pc-ticker-btn:hover { background: #1f2937; }
.pc-drop {
  position: absolute; left: 0; top: 100%; z-index: 20; margin-top: 0.25rem;
  min-width: 7rem; padding: 0.25rem; border-radius: 0.5rem;
  border: 1px solid #e5e7eb; background: #fff; box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}
html.dark .pc-drop { background: #111827; border-color: #374151; }
.pc-drop button {
  display: block; width: 100%; text-align: left; padding: 0.35rem 0.5rem;
  font-size: 12px; font-weight: 600; border-radius: 0.375rem;
}
.pc-drop button:hover, .pc-drop .on { background: #eef2ff; color: #4338ca; }
html.dark .pc-drop button:hover, html.dark .pc-drop .on { background: #1e1b4b; color: #a5b4fc; }
.pc-ind-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border-radius: 0.5rem; border: 1px solid #e5e7eb; background: #fff;
  padding: 0.25rem 0.625rem; font-size: 11px; font-weight: 600; color: #374151;
}
html.dark .pc-ind-btn { background: #111827; border-color: #374151; color: #e5e7eb; }
.pc-ind-btn:hover { background: #f3f4f6; }
html.dark .pc-ind-btn:hover { background: #1f2937; }
.pc-ind-btn-on, .pc-ind-btn-on:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.pc-ind-wrap { position: relative; flex-shrink: 0; }
.pc-ind-panel {
  position: absolute; right: 0; top: 100%; z-index: 30;
  margin-top: 0.25rem; width: 14rem; max-width: min(14rem, calc(100vw - 1rem));
  max-height: min(70vh, 28rem); overflow: auto;
  border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.3rem 0.4rem;
  background: #fff; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}
.pc-ind-panel.hidden { display: none; }
html.dark .pc-ind-panel { background: #0b1220; border-color: #1f2937; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); }
.pc-row { display: flex; align-items: center; gap: 0.35rem; min-height: 1.5rem; }
.pc-row-indent { padding-left: 1.25rem; }
.pc-row label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 12px; flex: 1; min-width: 0; }
.pc-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; flex-shrink: 0; }
.pc-pct {
  width: 3.35rem; text-align: right; font-size: 11px; padding: 0.15rem 0.35rem;
  border-radius: 0.375rem; border: 1px solid #e5e7eb; background: #fff;
}
html.dark .pc-pct { background: #111827; border-color: #374151; color: #e5e7eb; }
.pc-style {
  display: none; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  padding: 0.2rem 0 0.3rem 1.25rem;
}
.pc-style.is-open { display: flex; }
.pc-swatches { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.pc-ind-panel button.pc-swatch { width: 0.75rem; height: 0.75rem; min-width: 0; min-height: 0; border-radius: 9999px; border: 2px solid transparent; }
.pc-swatch-on { border-color: #111827; }
html.dark .pc-swatch-on { border-color: #f3f4f6; }
.pc-seg { display: inline-flex; }
.pc-ind-panel .pc-seg button {
  min-width: 0; min-height: 1.5rem; font-size: 10px; padding: 0.1rem 0.3rem; border: 1px solid #e5e7eb; margin-left: -1px;
  background: #fff; color: #4b5563;
}
.pc-seg button:first-child { border-radius: 0.375rem 0 0 0.375rem; margin-left: 0; }
.pc-seg button:last-child { border-radius: 0 0.375rem 0.375rem 0; }
.pc-seg-off { font-weight: 400; }
.pc-seg-on { position: relative; z-index: 1; background: #4f46e5; border-color: #4f46e5; color: #fff; }
html.dark .pc-seg button { background: #111827; border-color: #374151; color: #d1d5db; }
html.dark .pc-seg-on { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.pc-add { min-width: 0; min-height: 0; font-size: 11px; color: #4f46e5; padding: 0.25rem 0 0.15rem 1.25rem; }
.pc-add:hover { text-decoration: underline; }
.pc-shell.pc-fs {
  position: fixed; inset: 0; z-index: 40; padding: 0.75rem;
  background: #fff; gap: 0.5rem;
}
html.dark .pc-shell.pc-fs { background: #0b1220; }
.pc-shell.pc-fs .chart-box-lg { flex: 1 1 auto; height: auto; min-height: 0; }
body.pc-fs-lock { overflow: hidden; }
.app-frame { display: flex; min-height: 100vh; align-items: stretch; }
.app-side {
  display: none; flex-direction: column; width: 15.5rem; flex-shrink: 0;
  height: 100vh; position: sticky; top: 0;
  border-right: 1px solid #e5e7eb; background: #fff; padding: 0.75rem 0.5rem 0.5rem;
}
html.dark .app-side { background: #0b1220; border-color: #1f2937; }
.app-frame-slim .app-side { width: 3.75rem; }
.app-side-brand {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.75rem; font-size: 0.9375rem; font-weight: 700; color: #111827;
}
html.dark .app-side-brand { color: #f3f4f6; }
.app-side-brand-toggle { position: relative; border: 0; width: 100%; min-height: 2rem; text-align: left; cursor: pointer; }
.app-side-brand-icon, .app-side-brand-label { display: inline-flex; align-items: center; }
.app-side-brand-icon { position: relative; width: 1.25rem; height: 1.25rem; flex: 0 0 1.25rem; }
.app-side-logo-mark, .app-side-morph-mark { display: inline-flex; align-items: center; transition: opacity 160ms cubic-bezier(0.2, 0, 0, 1); }
.app-side-morph-mark { position: absolute; inset: 0; opacity: 0; }
.app-side-brand-toggle:has(.app-side-brand-icon:hover) .app-side-logo-mark, .app-side-brand-toggle:focus-visible .app-side-logo-mark { opacity: 0; }
.app-side-brand-toggle:has(.app-side-brand-icon:hover) .app-side-morph-mark, .app-side-brand-toggle:focus-visible .app-side-morph-mark { opacity: 1; }
.app-side-brand-toggle:hover, .app-side-brand-toggle:focus-visible { color: inherit; }
.app-side-brand-toggle:has(.app-side-brand-icon:hover) .app-side-brand-icon, .app-side-brand-toggle:focus-visible .app-side-brand-icon { color: #4338ca; }
html.dark .app-side-brand-toggle:has(.app-side-brand-icon:hover) .app-side-brand-icon, html.dark .app-side-brand-toggle:focus-visible .app-side-brand-icon { color: #a5b4fc; }
.app-frame-slim .app-side-brand { justify-content: center; padding-left: 0; padding-right: 0; }
.app-frame-slim .app-side-brand-label { display: none; }
.app-side-nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.app-side-item {
  display: flex; align-items: center; gap: 0.625rem; width: 100%;
  border-radius: 0.5rem; padding: 0.5rem 0.625rem;
  font-size: 0.8125rem; font-weight: 600; color: #4b5563; text-align: left;
}
.app-side-item:hover { background: #f3f4f6; color: #111827; }
html.dark .app-side-item { color: #d1d5db; }
html.dark .app-side-item:hover { background: #1f2937; color: #f3f4f6; }
.app-side-item svg { flex-shrink: 0; }
.app-side-item-on, .app-side-item-on:hover { background: #eef2ff; color: #4338ca; }
html.dark .app-side-item-on, html.dark .app-side-item-on:hover { background: #1e1b4b; color: #a5b4fc; }
.app-side-lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-frame-slim .app-side-item { justify-content: center; padding: 0.5rem; }
.app-frame-slim .app-side-lab { display: none; }
.app-side-tools {
  display: flex; flex-direction: column; gap: 0.15rem;
  margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #e5e7eb;
}
html.dark .app-side-tools { border-top-color: #1f2937; }
.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-top { display: none; }
@media (min-width: 768px) {
  .app-side { display: flex; }
  .app-top { display: none !important; }
}
@media (max-width: 767px) {
  .app-side { display: none; }
  .app-top { display: block; }
}

.chip-on {
  background: #4f46e5; color: #fff; border: 1px solid #4f46e5;
}
.chip-off {
  background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb;
}
.chip-off:hover { background: #e5e7eb; }
html.dark .chip-off { background: #1f2937; color: #e5e7eb; border-color: #374151; }
html.dark .chip-off:hover { background: #374151; }

/* missing utilities */
.ml-3 { margin-left: 0.75rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.self-center { align-self: center; }
.self-end { align-self: flex-end; }
.col-span-full { grid-column: 1 / -1; }
.max-h-52 { max-height: 13rem; }
.max-w-3xl { max-width: 48rem; }
.top-8 { top: 2rem; }
.top-14 { top: 3.5rem; }
.bg-amber-400 { background-color: #fbbf24; }
.border-amber-100 { border-color: #fef3c7; }
.border-red-100 { border-color: #fee2e2; }
.line-through { text-decoration: line-through; }


.max-h-\[400px\] { max-height: 400px; }
.min-h-\[375px\] { min-height: 375px; }
.min-h-\[420px\] { min-height: 420px; }
.min-w-\[12rem\] { min-width: 12rem; }
.bg-indigo-50\/60 { background-color: rgb(238 242 255 / 0.6); }
.dark\:bg-blue-950\/40:is(.dark *) { background-color: rgb(23 37 84 / 0.4); }

@media (min-width: 768px) {
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .md\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .md\:col-span-1 { grid-column: span 1 / span 1; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-start { align-items: flex-start; }
  .lg\:justify-between { justify-content: space-between; }
  .lg\:gap-4 { gap: 1rem; }
}

.hover\:underline:hover { text-decoration: underline; }
