@import url("https://cdn.jsdelivr.net/npm/@mathjax/mathjax-newcm-font/chtml/woff2");

* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Ubuntu';
}

body {
    display: flex;
    height: 100vh;
    overflow:hidden;
    background: #fff;
}

.sidebar {
    width: 400px;
    background: #f7f7f7;
    border-right:1px solid #d5d5d5;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.toolbar {
    background: linear-gradient(to bottom, #fcfcfc 0%, #ebebeb 100%);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid #ccc;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.toolbar-btn:hover {
    background: rgba(0,0,0,0.08);
    color: #333;
}

.toolbar-btn:active {
    background: rgba(0,0,0,0.12);
}

/* AI told me I should implement material icons this way, so yeah */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
}

.exp { /* expression */
    flex: 1;
    overflow-y:auto;
    min-height:0;
    padding: 0;
    background: #fff;
}

.exp-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #e5e5e5;
    transition: all 0.1s;
    position: relative;
    background: #fff;
    cursor: pointer;
    min-height: 52px;
    border: 1px solid transparent;
    border-bottom: 1px solid #e5e5e5;
}

.exp-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    min-width: 40px;
    background: #f5f5f5;
    border-right: 1px solid #e5e5e5;
    gap: 6px;
}
.exp-item:hover {
    background: #f8f8f8;
}

.exp-item.active {
    background: #fff;
    border: 1px solid #2d70b3;
}

.exp-item.active .exp-left {
    background: #2d70b3;
}

.exp-num {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.exp-item.active .exp-num {
    color: #fff;
}

.exp-item:hover .delete-btn {
    display: flex;
}

.exp-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 8px 60px 8px 12px;
    min-width: 0;
    position: relative;
}

.delete-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin-left: 8px;
    border-radius: 3px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.delete-btn:hover {
    color: #666;
    background: rgba(0,0,0,0.05);
}

.gcontainer {
    flex: 1;
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 400px;
    background: #fff;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.gcontrols {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
}

.control-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.control-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.control-btn:active {
    background: #eee;
}

.empty-state {
    color: #aaa;
    font-size: 13px;
    padding: 20px 16px;
    text-align: center;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.exp-item:last-child {
    position: relative;
    border-bottom: none;
}

.exp-item:last-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.9) 90%);
    pointer-events: none;
}

.exp-item:last-child.active::after {
    display: none;
}

.exp-item:last-child .delete-btn {
    display: none !important;
}

math-field {
    width: 100%;
    border: none;
    background: transparent !important;
    font-size:18px;
    outline:none;
    padding: 0 !important;
    margin: 0;
    min-height: auto;
    display: block;
    --hue: 211;
    --contains-highlight-background-color: transparent;
    --smart-fence-color: transparent;
}

math-field::part(container) {
    padding: 0 !important;
    margin: 0;
    border: none;
    background: transparent;
}

math-field::part(content) {
    padding: 0 !important;
    margin: 0;
}

math-field .ML__fieldcontainer {
    padding: 0 !important;
}

math-field::part(virtual-keyboard-toggle) {
    display: none !important;
}

.exp-item.active math-field::part(virtual-keyboard-toggle) {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

math-field::part(menu-toggle) {
    display: none !important;
}

.exp-item.active math-field::part(menu-toggle) {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible;
}

/* custom mathlive keyboard styling*/
/* i used some AI here too */
/* sorry if this sucks btw, this is my first time using mathlive */

.ML__keyboard {
    position: fixed;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index:1000 !important;
}

.ML__keyboard .MLK__backdrop {
    background: transparent !important;
    box-shadow: none;
}

.ML__keyboard .MLK__toolbar{
    background: #f0f0f0 !important;
    color: #333 !important;
    border: none !important;
    border-bottom: none !important;
}

.ML__keyboard .MLK__rows {
    background: #f0f0f0 !important;
}

.ML__keyboard .MLK__row {
    gap: 4px !important;
    margin-bottom: 4px !important;
    background: transparent !important;
}

.ML__keyboard .MLK__keycap {
    height: 40px !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #333 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    font-family: 'mathjax-newcm',serif;
}

.ML__keyboard .MLK__keycap:hover {
    background: #f5f5f5 !important;
    border-color: #999 !important;
}

.ML__keyboard .MLK_keycap:active {
    background: #e5e5e5 !important;
    transform: translateY(1px) !important;
}

.ML__keyboard .MLK__keycap.action,
.ML__keyboard .MLK_keycap.shift,
.ML__keyboard .MLK__keycap.fnbutton,
.ML__keyboard .action,
.ML__keyboard .shift {
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    border: 1px solid #ccc !important;
}

.ML__keyboard .MLK__keycap.action:hover,
.ML__keyboard .MLK__keycap.shift:hover,
.ML__keyboard .MLK__keycap.fnbutton:hover,
.ML__keyboard .action:hover,
.ML__keyboard .shift:hover {
    background: #f5f5f5 !important;
    border-color: #999 !important;
}

.ML__keyboard .MLK__layer-switch,
.ML__keyboard [data-layer] {
    background: transparent !important;
    color: #333 !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 8px 12px !important;
}

.ML__keyboard .MLK__layer-switch:hover,
.ML__keyboard [data-layer]:hover {
    background: transparent !important;
    border: none !important;
}

.ML__keyboard .MLK__layer-switch.is-active,
.ML__keyboard [data-layer].is-active {
    border-bottom: 2px solid #2d70b3 !important;
    background: transparent !important;
}

.ML__keyboard .MLK__layer-switch.is-active:hover,
.ML__keyboard [data-layer].is-active:hover {
    background: transparent !important;
}

.ML__keyboard .MLK__keyboard-switcher {
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    border: 1px solid #ccc !important;
}

.ML__keyboard .MLK__keyboard-switcher:hover {
    background: #f5f5f5 !important;
    border-color: #999 !important;
}

.MLK__variants,
.MLK__alternatives,
.MLK__menu,
.MLK__plate,
div[class*="variant"],
div[class*="alternative"],
div[class*="menu"],
[class*="MLK__variants"],
[class*="MLK__alternatives"],
.ML__keyboard div[class*="variant"],
.ML__keyboard div[class*="alternative"] {
    background: #f0f0f0 !important;
    background-color: #f0f0f0 !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

.MLK__variants .MLK__keycap,
.MLK__alternatives .MLK__keycap,
.MLK__menu .MLK__keycap,
.MLK__plate .MLK__keycap,
div[class*="variant"] .MLK__keycap,
div[class*="alternative"] .MLK__keycap,
[class*="MLK__variants"] .MLK__keycap,
[class*="MLK__alternatives"] .MLK__keycap {
    background: #fff !important;
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

.MLK__variants .MLK__keycap:hover,
.MLK__alternatives .MLK__keycap:hover,
.MLK__menu .MLK__keycap:hover,
.MLK__plate .MLK__keycap:hover {
    background: #f5f5f5 !important;
    border-color: #999 !important;
}

.ML__keyboard *,
.MLK__variants *,
.MLK__alternatives * {
    color: #333 !important;
}

.ML__keyboard svg,
.MLK__variants svg,
.MLK__alternatives svg {
    fill: #333 !important;
    stroke: #333 !important;
}

.ML__keyboard .MLK__keycap.is-active,
.ML__keyboard .MLK__keycap.is-pressed,
.ML__keyboard .shift.is-active {
    background: #2d70b3 !important;
    color: #fff !important;
    border-color: #2d70b3 !important;
}

.ML__keyboard .MLK__keycap.is-active svg,
.ML__keyboard .MLK__keycap.is-pressed svg,
.ML__keyboard .shift.is-active svg,
.ML__keyboard .MLK__keycap.is-active *,
.ML__keyboard .MLK__keycap.is-pressed *,
.ML__keyboard .shift.is-active * {
    fill: #fff !important;
    stroke: #fff !important;
    color: #fff !important;
}

.ML__keyboard .MLK__keycap.action svg,
.ML__keyboard .MLK__keycap.shift svg,
.ML__keyboard .MLK__keycap.fnbutton svg,
.ML__keyboard .action svg,
.ML__keyboard .shift svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: 0 auto !important;
}

.ML__keyboard .MLK__keycap.action,
.ML__keyboard .MLK__keycap.shift,
.ML__keyboard .MLK__keycap.fnbutton,
.ML__keyboard .action,
.ML__keyboard .shift {
    min-width: 32px !important;
    padding: 4px 8px !important;
}

.ML__keyboard .MLK__keyboard-switcher {
    height: 32px !important;
    padding: 4px 8px !important;
    font-size: 14px !important;
}

/* make number and dot keycaps grey */
.ML__keyboard .MLK__keycap[data-keycap-value="0"],
.ML__keyboard .MLK__keycap[data-keycap-value="1"],
.ML__keyboard .MLK__keycap[data-keycap-value="2"],
.ML__keyboard .MLK__keycap[data-keycap-value="3"],
.ML__keyboard .MLK__keycap[data-keycap-value="4"],
.ML__keyboard .MLK__keycap[data-keycap-value="5"],
.ML__keyboard .MLK__keycap[data-keycap-value="6"],
.ML__keyboard .MLK__keycap[data-keycap-value="7"],
.ML__keyboard .MLK__keycap[data-keycap-value="8"],
.ML__keyboard .MLK__keycap[data-keycap-value="9"],
.ML__keyboard .MLK__keycap[aria-label="."] {
    background: #d8d8d8 !important;
    font-size: 20px !important;
}

/* change colour of arrow keys and bksp */
.ML__keyboard .action.hide-shift,
.ML__keyboard .MLK__keycap.action.hide-shift {
    background: #d8d8d8 !important;
}

/*its huge but i guess it works, make sure that numeric keycaps are still turning blue on press */
.ML__keyboard .MLK__keycap[data-keycap-value="0"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="1"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="2"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="3"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="4"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="5"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="6"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="7"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="8"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="9"].is-active,
.ML__keyboard .MLK__keycap[data-keycap-value="0"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="1"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="2"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="3"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="4"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="5"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="6"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="7"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="8"].is-pressed,
.ML__keyboard .MLK__keycap[data-keycap-value="9"].is-pressed,
.ML__keyboard .MLK__keycap[aria-label="."].is-active,
.ML__keyboard .MLK__keycap[aria-label="."].is-pressed {
    background: #2d70b3 !important;
    color: #fff !important;
    border-color: #2d70b3 !important;
}

.ML__keyboard .action.hide-shift.is-active,
.ML__keyboard .action.hide-shift.is-pressed,
.ML__keyboard .MLK__keycap.action.hide-shift.is-active,
.ML__keyboard .MLK__keycap.action.hide-shift.is-pressed {
    background: #2d70b3 !important;
    color: #fff !important;
    border-color: #2b70b3 !important;
}

.ML__keyboard .MLK__keycap.action,
.ML__keyboard .MLK__keycap.shift,
.ML__keyboard .MLK__keycap.fnbutton,
.ML__keyboard .action,
.ML__keyboard .shift {
    min-width: 32px !important;
    padding: 4px 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ML__keyboard .ML__edit-toolbar.right > *,
.ML__keyboard .ML__edit-toolbar.right button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ML__keyboard .ML__edit-toolbar.right > *:hover,
.ML__keyboard .ML__edit-toolbar.right button:hover {
    background: rgba(0,0,0,0.05) !important;
}

.ML__keyboard .action.hide-shift[data-command*="commit"] {
    background: #2a70b3 !important;
    color: #fff !important;
    border-color: #2d70b3 !important;
}

.ML__keyboard .action.hide-shift[data-command*="commit"]:hover {
    background: #3182ce !important;
    border-color: #3182ce !important;
}

.ML__keyboard .action.hide-shift[data-command*="commit"]:active {
    background: #225385 !important;
}

.ML__keyboard .action.hide-shift[data-command*="commit"] svg {
    fill: #fff !important;
    stroke: #fff !important;
}

.ML__keyboard .action.hide-shift.is-active svg,
.ML__keyboard .action.hide-shift.is-pressed svg {
    fill: #fff !important;
    stroke: #fff !important;
}

.kb-toggle {
    padding: 12px;
    border-top: 1px solid #e5e5e5;
    background: #f7f7f7;
}

.kb-toggle-btn {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    background: #fff;
    color: #666;
    cursor: pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.kb-toggle-btn .material-symbols-outlined {
    font-size: 24px;
}

.kb-toggle-btn span:not(.material-symbols-outlined) {
    font-size: 13px;
    font-weight: 400;
}

.kb-toggle-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.kb-toggle-btn:active {
    background: #eee;
}

.tb-spacer {
    flex: 1;
}

.colour-ind {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.colour-ind.hidden {
    opacity: 0;
    visibility: hidden;
}

.menu-drp {
    position:absolute;
    top:44px;
    left:8px;
    background:#fff;
    border:1px solid #d0d0d0;
    border-radius:8px;
    box-shadow:0 8px 24px rgba(0,0,0,0.12),0 2px 6px rgba(0,0,0,0.08);
    min-width:200px;
    display:none;
    z-index:100;
    overflow:hidden;
    animation:drpIn 0.15s ease-out;
}

@keyframes drpIn {
    from{
        opacity:0;
        transform:translateY(-8px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

.menu-drp.show {
    display:block;
}

.menu-item {
    padding:8px 12px;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:12px;
    font-size:14px;
    color:#1a1a1a;
    transition:all 0.12s ease;
    position:relative;
}

.menu-item:not(:last-child)::after {
    content:'';
    position:absolute;
    bottom:0;
    left:16px;
    right: 16px;
    height: 1px;
    background: #f0f0f0;
}

.menu-item:hover {
    background:linear-gradient(to right,#f8f9fa 0%,#f5f6f7 100%);
    padding-left:20px;
}

.menu-item:active {
    background:#eeeff0;
}

.menu-item .material-symbols-outlined {
    font-size:20px;
    color:#2d70b3;
    transition: transform 0.12s ease;
}

.menu-item:hover .material-symbols-outlined {
    transform:scale(1.1);
}

.menu-item:not(.material-symbols-outlined) {
    font-weight:400;
    letter-spacing:0.01em;
}

/*colour picker stuff*/
.colpicker-pnl {
    position:absolute;
    top:44px;
    right:8px;
    background:#fff;
    border:1px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.02), 0 4px 6px rgba(0,0,0,0.04), 0 12px 24px rgba(0,0,0,0.08);
    padding: 12px;
    display: none;
    z-index:100;
    animation:drpIn 0.12s cubic-bezier(0.16,1,0.3,1);
    min-width:200px;
}

.colpicker-pnl.show {
    display: block;
}

.colpicker-tl {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.colpicker-funcs {
    display:flex;
    flex-direction:column;
    gap:6px;
    max-height:300px;
    overflow-y:auto;
}

.colpicker-item {
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px;
    border-radius:4px;
    cursor:pointer;
    transition:background 0.1s; /* vscode WHY is background red.*/
}

.colpicker-item:hover {
    background:rgba(0,0,0,0.03);
}

.colpicker-item .exp-num {
    font-size:11px;
    font-weight:500;
    color: #999;
    width: 20px;
}

.colpicker-item .colswatch {
    width:24px;
    height:24px;
    border-radius:4px;
    border:2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.1);
    cursor:pointer;
    transition:transform 0.1s;
}

.colpicker-item .colswatch:hover {
    transform: scale(1.1);
}

.colpicker-item .func-preview {
    flex:1;
    color:#333;
    overflow:hidden;
    font-family:'mathjax-newcm',serif;
    font-size:14px;
    font-style:italic;
    font-weight:600;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.colpicker-presets {
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid rgba(0,0,0,0.06);
}

.colpreset-grid {
    display:grid;
    grid-template-columns:repeat(8,1fr);
    gap:6px;
    margin-top:8px;
}

.colpreset {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s;
}

.colpreset:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}

.custom-col-in {
    width: 100%;
    height: 32px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 8px;
}

.params-sec {
    height:250px;
    min-height:200px;
    display:flex;
    flex-direction: column;
    background:#f7f7f7;
    border-top:2px solid #ccc;
}

.params-toolbar {
    background: linear-gradient(to bottom, #fcfcfc 0%, #ebebeb 100%);
    padding: 8px 12px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.params-tl {
    font-size: 14px;
    font-weight: 500;
    color:#666;
    letter-spacing: 0.5px;
}

.params-content {
    flex: 1;
    overflow-y:auto;
    padding:12px;
    background:#fff;
}

.params-tgl {
    width: 28px;
    height:28px;
    border:none;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    font-size:14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.params-tgl:hover {
    background: rgba(0,0,0,0.08);
    color:#333;
}

.params-tgl:active {
    background:rgba(0,0,0,0.12);
}

.params-tgl .material-symbols-outlined {
    transition: transform 0.2s ease;
}

.params-sec.collapsed {
    height: auto;
    min-height: auto;
}

.params-sec.collapsed .params-content {
    display:none;
}

.empty-params {
    color:#999;
    font-size: 13px;
    text-align:center;
    padding: 20px;
    line-height:1.6;
}

.param-item {
    background:#f9f9f9;
    border:1px solid #e5e5e5;
    border-radius:6px;
    padding:12px;
    margin-bottom:12px;
}

.param-hdr {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:8px;
}

.param-name {
    font-size: 16px;
    font-weight: 600;
    color: #2d70b3;
    font-family:'mathjax-newcm',serif;
    font-style:italic;
}

.param-val {
    width: 70px;
    padding: 4px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    text-align:right;
    background:#fff;
}

.param-val:focus {
    outline: none;
    border-color: #2d70b3;
}

.param-scontainer {
    display:flex;
    align-items:center;
    gap:8px;
}

.param-min,
.param-max {
    font-size: 11px;
    color:#999;
    font-weight:500;
    min-width:30px;
    text-align:center;
}

.param-slider {
    flex:1;
    height:6px;
    border-radius:3px;
    background:linear-gradient(to right,#e5e5e5 0%,#d0d0d0 100%);
    outline:none;
    -webkit-appearance:none;
    appearance: none;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance:none;
    appearance:none;
    width:18px;
    height:18px;
    border-radius:50%;
    background:#2d70b3;
    cursor:pointer;
    box-shadow:0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.15s;
}

.param-slider::-webkit-slider-thumb:hover {
    background:#3182ce;
    transform:scale(1.1);
}

.param-slider::-webkit-slider-thumb:active {
    background:#225385;
    transform:scale(0.95);
}

.param-slider::-moz-range-thumb {
    width:18px;
    height:18px;
    border-radius:50%;
    background:#2d70b3;
    cursor:pointer;
    border:none;
    box-shadow:0 2px 4px rgba(0,0,0,0.2);
    transition:all 0.15s;
}

.param-slider::-moz-range-thumb:hover {
    background:#3182ce;
    transform:scale(1.1);
}

.param-slider::-moz-range-thumb:active {
    background:#225385;
    transform:scale(0.95);
}

.param-slider::-moz-range-track {
    background:linear-gradient(to right,#e5e5e5 0%,#d0d0d0 100%);
    border-radius:3px;
    height:6px;
}

/*table of vals stuff*/
.table-pnl {
    position:absolute;
    top:44px;
    right:8px;
    background:#fff;
    border:1px solid rgba(0,0,0,0.08);
    border-radius:6px;
    box-shadow:0 0 0 1px rgba(0,0,0,0.02), 0 4px 6px rgba(0,0,0,0.04),0 12px 24px rgba(0,0,0,0.08); /*ts some crazy long line*/
    display:none;
    z-index:100;
    animation:drpIn 0.12s cubic-bezier(0.16,1,0.3,1);
    width: 500px;
    max-height: 600px;
    flex-direction: column;
    margin-top:10px;
}

.table-pnl.show {
    display: flex;
}

.table-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    background: linear-gradient(to bottom,#fcfcfc 0%, #ebebeb 100%);    
}

.table-tl {
    font-size: 14px;
    font-weight:500;
    color: #666;
    letter-spacing:0.3px;
}

.table-close {
    width:24px;
    height:24px;
    border:none;
    background:transparent;
    color:#999;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content: center;
    border-radius:3px;
    transition: all 0.15s;
}

.table-close:hover {
    background:rgba(0,0,0,0.05);
    color:#666;
}

.table-ctrls {
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    flex-direction:column;
    gap: 8px;
}

.table-ctrl-row {
    display:flex;
    align-items: center;
    gap:8px;
}

.table-ctrl-row label {
    font-size: 12px;
    color:#666;
    min-width:55px;
    font-weight:500;
}

.table-ctrl-row input {
    flex:1;
    padding:6px 8px;
    border:1px solid #d0d0d0;
    border-radius: 4px;
    font-size:13px;
    background: #fff;
}

.table-ctrl-row input:focus {
    outline:none;
    border-color:#2d70b3;
}

.table-gen-btn {
    width:100%;
    padding:8px;
    border:1px solid #2d70b3;
    background:#2d70b3;
    color:#fff;
    border-radius:4px;
    cursor:pointer;
    font-size:13px;
    font-weight:500;
    transition:all 0.15s;
    margin-top:4px;
}

.table-gen-btn:hover {
    background:#3182ce;
    border-color:#3182ce;
}

.table-gen-btn:active {
    background: #225385;
}

.table-cont {
    flex: 1;
    overflow: auto;
    padding: 12px 16px;
    background:#fff;
    min-height: 200px;
    max-height: 400px;
}

.vals-table {
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

.vals-table thead th {
    background:#f5f5f5;
    padding:8px 12px;
    text-align:left;
    font-weight:600;
    color:#333;
    border-bottom:2px solid #d0d0d0;
    position:sticky;
    top:0;
    z-index:1;
}

.vals-table tbody td {
    padding: 6px 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
    font-weight: 'Ubuntu Mono',monospace;
}

.vals-table tbody tr:hover {
    background:#f9f9f9;
}

.vals-table tbody td:first-child {
    font-weight:500;
    color:#666;
}

.table-ftr {
    padding: 12px 16px;
    border-top: 1px solid #e5e5e5;
    background: #f9f9f9;
    display: flex;
    gap: 8px;
}

.table-export {
    flex:1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    background: #fff;
    color:#666;
    border-radius:4px;
    cursor: pointer;
    font-size:13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap:6px;
    transition: all 0.15s;
}

.table-export:hover {
    background: #f5f5f5;
    border-color:#999;
}

.table-export:active {
    background: #eee;
}

.table-export .material-symbols-outlined {
    font-size: 18px;
}

.table-empty {
    text-align:center;
    color:#999;
    font-size:13px;
    padding: 40px 20px;
    line-height:1.6;
}

/*linestyle stuff*/
.lstyle-sec {
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid rgba(0,0,0,0.06);
}

.lstyle-grid {
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap:8px;
    margin-top:8px;
}

.lstyle-btn {
    padding:12px;
    border:2px solid #d0d0d0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    display:flex;
    flex-direction: column;
    align-items: center;
    gap:6px;
}

.lstyle-btn:hover {
    border-color:#2d70b3;
    background:#f8f9fa;
}

.lstyle-btn.active {
    border-color:#2d70b3;
    background:#e3f2fd;
}

.lstyle-pre {
    width: 100%;
    height:3px;
    background:#333;
}

.lstyle-pre.solid {
    background:#333;
}

.lstyle-pre.dash {
    background:repeating-linear-gradient(to right, #333 0px,#333 8px, transparent 8px, transparent 14px);
}

.lstyle-pre.dot {
    background:repeating-linear-gradient(to right, #333 0px, #333 3px,transparent 3px,transparent 8px);
}

.lstyle-pre.thick {
    height: 5px;
    background: #333;
}

.lstyle-nm {
    font-size: 11px;
    color:#666;
    font-weight:500;
}

.dupe-btn {
    width:24px;
    height:24px;
    border:none;
    background:transparent;
    color:#aaa;
    cursor:pointer;
    font-size:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all 0.15s;
    border-radius:3px;
    position:absolute;
    right:40px;
    top:50%;
    transform:translateY(-50%);
}

.dupe-btn:hover {
    color:#2d70b3;
    background:rgba(45,112,179,0.1);
}

.exp-item:last-child .dupe-btn {
    display: none !important;
}

/* history stuff*/
.history-pnl {
    position:absolute;
    top:44px;
    right:8px;
    background:#fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius:6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.02), 0 4px 6px rgba(0,0,0,0.04), 0 12px 24px rgba(0,0,0,0.08);
    display:none;
    z-index:100%;
    animation:drpIn 0.12s cubic-bezier(0.16,1,0.3,1);
    width:400px;
    max-height:600px;
    flex-direction: column;
    margin-top:10px;
}

.history-pnl.show {
    display: flex;
}

.hist-ls {
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:12px;
}

.hist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding:12px;
    background:#f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor:pointer;
    transition: all 0.15s;
}

.hist-item:hover {
    background:#f0f0f0;
    border-color:#2d70b3;
    transform:translateX(4px);
}

.hist-item:active {
    background:#e8e8e8;
}

.hist-colour {
    width: 24px;
    height:24px;
    border-radius: 4px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1),0 2px 4px rgba(0,0,0,0.1);
    flex-shrink:0;
}

.hist-latex {
    flex: 1;
    font-family:'mathjax-newcm',serif;
    font-size: 16px;
    font-style:italic;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hist-time {
    font-size: 11px;
    color:#999;
    flex-shrink:0;
}

.hist-empty {
    text-align:center;
    color:#999;
    font-size: 13px;
    padding: 40px 20px;
    line-height:1.6;
}