body {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
}

section {
    padding-top: 100px;
    padding-left: 50px;
    padding-right: 50px;
    padding-bottom: 40px;
}

section h2 {
    font-size: 3em;
    width: 100%;
}

h2 a:hover {
    text-decoration: none;
}

section h3 {
    width: 100%
}

section .section-title {
    margin-bottom: 0px;
}

h4 {
    font-weight: 700;
    font-size: 1.2vw;
}

p {
    text-align: justify;
    font-size: 20px;
    font-weight: 300;
}

select {}

hr {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

label,
span {
    /* Disable text selection */
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


/* Custom navbar style */
.navbar-brand {
    font-size: 200%;
}

.navbar-nav {
    margin-right: -20px;
}

ul>.nav-item {
    letter-spacing: 1px;
    padding-left: 5px;
    padding-right: 5px;
    text-transform: uppercase;
    font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.1em;
}

/* Custom jumbotron style */
.jumbotron {
    margin-bottom: 0px;
    padding-bottom: 0px;
    padding-top: 20px;
    margin-left: -40px;
}

.bubble-click {
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    position: absolute;
    z-index: 2;
}

.bubble {
    /*z-index : 2;*/
    width: 100%;
    border-radius: 50%;
    margin-left: 0%;
    position: relative;
    line-height: 0;
    /*background: linear-gradient(135deg, #a7cfdf 0%,#23538a 100%);*/
    box-shadow: inset -8px -7px 4px 0px rgba(0, 0, 0, 0.3);
}

.bubble::after {
    content: "";
    display: block;
    padding-bottom: 100%;
}

.bubble-text {
    position: absolute;
    bottom: 50%;
    width: 100%;
    text-align: center;

    font-family: Papyrus, fantasy;
    font-weight: bolder;
    font-size: 3em;
}

.rcorners::after {
    content: "";
    display: block;
    padding-bottom: 100%;
}

.bg-dark {
    background-color: #6ba90f !important;
}

.rcorners-1,
.rcorners-2,
.rcorners-3,
.rcorners-4,
.rcorners-5 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0px 10px 10px 0px;
    background: var(--grn, #6ba90f);
    box-sizing: border-box;
    padding: 16px 20px;
    width: 30px;
    height: min(90px, calc((100vh - 24px) / 4));
}

.rcorners-text-1,
.rcorners-text-2,
.rcorners-text-3,
.rcorners-text-4,
.rcorners-text-5 {
    position: relative;
    bottom: 0;
    left: 0;
    writing-mode: vertical-rl;
    text-align: center;
    line-height: 1;
    font-weight: bolder;
    font-size: 1.35em;
    font-family: "IBM Plex Mono", Menlo, Monaco, "Courier New", monospace;
}

/* Anchor styles for the vertical nav labels (moved from inline attributes) */
.rcorners-text-1 a,
.rcorners-text-2 a,
.rcorners-text-3 a,
.rcorners-text-4 a,
.rcorners-text-5 a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
    display: inline-block;
}

/* Make the first panel (design-space) slightly shorter */
.rcorners-1 {
    height: min(160px, calc((100vh - 24px) / 3));
}

@media (max-width: 768px) {

    .rcorners-1,
    .rcorners-2,
    .rcorners-3,
    .rcorners-4,
    .rcorners-5 {
        height: min(100px, calc((100vh - 24px) / 4));
        padding: 12px 10px;
    }

    .rcorners-text-1,
    .rcorners-text-2,
    .rcorners-text-3,
    .rcorners-text-4,
    .rcorners-text-5 {
        font-size: 1.05em;
    }
}

/* Custom interactiveDemo section style */
#interactiveDemo .container-fluid {
    width: 100%;
}

/* Comparative analysis conf */
#cmp-conf-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    margin-left: 50px;
    margin-right: 50px;
    margin-bottom: 20px;
}

.input-group>input {
    text-align: right;
}

.incrementer {
    display: flex;
    flex-direction: column;
    border-color: #ced4da;
    border-width: 1px;
    border-style: solid;
    border-radius: 0.2rem;
    border-left-style: hidden;
    padding-right: 0.1rem;
}

.incrementer>button {
    background-color: transparent;
}

.incrementer>button:focus {
    outline: 0;
}

.incrementer .increase {
    position: relative;
    height: 50%;
    border: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.45rem auto;
    background-image: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> <polygon points='50,20 100,100 0,100' style='fill:grey;'/> </svg>");
}

.incrementer .decrease {
    position: relative;
    height: 50%;
    border: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.45rem auto;
    background-image: url("data:image/svg+xml;charset=utf-8,  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> <polygon points='0,0 100,0 50,80' style='fill:grey;'/> </svg>");
}

.incrementer .increase:active {
    background-image: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> <polygon points='50,0 100,100 0,100' style='fill:black;'/> </svg>");
}

.incrementer .decrease:active {
    background-image: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> <polygon points='0,0 100,0 50,100' style='fill:black;'/> </svg>");
}


.input-group .custom-select {
    flex: 0 0 50px;
    background-position: right 5px center;
    background-repeat: no-repeat;
    background-size: 0.45rem auto;
    background-image: url("data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'> <polygon points='0,0 60,0 30,40' style='fill:grey;'/> </svg>");
    text-align-last: center;
    text-align: center;
    padding-right: 13px;
    padding-left: 5px;
    color: #343a40;
    background-color: #ecf0f1;
}

.input-group-text {
    color: #343a40;
}

.input-group>.form-control:focus {
    box-shadow: 0 0 0 0.1rem rgba(44, 62, 80, 0.25);
}


.progress-label {
    text-align: center;
    padding-left: 13px;
    padding-right: 5px;
    padding-top: 6px;
    font-weight: bold;
}

/* disable webkit's spinner for number input
input[type=number]::-webkit-inner-spin-button {  Styling number input spinner button, not support on Firefox, Edge, IE
  width: 27px;
  height: 27px;
  margin-right: -19px;
  margin-left: 5px;
}*/
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Merge policy selecting bar */
.mp-btn-group {
    width: 100%;
}

.cmp-indiv-mp .mp-btn-group {
    width: 65%;
}

.mp-btn-group .btn {
    /*Override*/
    flex: 1 1 100%;
    overflow: hidden;
    background-color: #ecf0f1;
    color: #2C3E50;
    border-color: rgb(206, 212, 218);
    padding: 0.10rem 0.75rem;
}

.mp-btn-group .btn:hover,
.mp-btn-group .btn:active {
    color: #fff;
    background-color: #2C3E50;
    /*#95a5a6*/
    border-color: #798d8f;
}

.mp-btn-group .btn:focus {
    /*Override original focus */
    /*background-color: #ecf0f1;
    color:#2C3E50;
    border-color: rgb(206, 212, 218);*/
    color: #fff;
    background-color: #2C3E50;
    /*#95a5a6*/
    border-color: #798d8f;
    outline: 0;
    -webkit-box-shadow: 0 0 0 0;
    box-shadow: 0 0 0 0;
    /*-webkit-box-shadow: 0 0 0 0.1rem rgba(44,62,80,0.25);
    box-shadow: 0 0 0 0.1rem rgba(44,62,80,0.25);*/
}

.mp-btn-group .btn:active,
.mp-btn-group .btn-active {
    color: #fff;
    background-color: #2C3E50;
    /*#95a5a6*/
    border-color: #798d8f;
    outline: 0;
}

.cmp-indiv-mp {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lsm-title {
    /* LSM name title */
    display: flex;
    font-size: x-large;
}

/* Custom bootstrap-slider style*/

.slider .tooltip.top {
    margin-top: 25px;
}

.slider-handle {
    position: absolute;
    top: 3px;
    width: 15px;
    height: 15px;
    background-color: #2C3E50;
    background-image: -webkit-linear-gradient(top, #2C3E50 0%, #95a5a6 100%);
    background-image: -o-linear-gradient(top, #2C3E50 0%, #95a5a6 100%);
    background-image: linear-gradient(to bottom, #2C3E50 0%, #95a5a6 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2C3E50', endColorstr='#ffbc5353', GradientType=0);
    background-repeat: repeat-x;
    filter: none;
    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
    border: 0px solid transparent;
}

.slider-track .slider-selection {
    position: absolute;
    background-image: -webkit-linear-gradient(top, #b4bcc2 0%, #f5f5f5 100%);
    background-image: -o-linear-gradient(top, #b4bcc2 0%, #f5f5f5 100%);
    background-image: linear-gradient(to bottom, #b4bcc2 0%, #f5f5f5 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
    background-repeat: repeat-x;
    -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border-radius: 4px;
}

.slider {
    display: inline-flex;
    vertical-align: middle;
    position: relative;
}

.slider.slider-horizontal {
    width: 90%;
    height: 20px;
}

.slider-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ced4da;
}

.slide-box label {
    display: inline-flex;
    margin: 0px 5px;
}

.slider-tick {
    position: absolute;
    cursor: pointer;
    top: 3px;
    width: 15px;
    height: 15px;
    background-image: -webkit-linear-gradient(top, #b4bcc2 0%, #f5f5f5 100%);
    background-image: -o-linear-gradient(top, #b4bcc2 0%, #f5f5f5 100%);
    background-image: linear-gradient(to bottom, #b4bcc2 0%, #f5f5f5 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
    background-repeat: repeat-x;
    -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    filter: none;
    opacity: 0;
    border: 0px solid transparent;
}

/*.slider.slider-horizontal .slider-tick-label:first-child {
    position: absolute;
    top: 10px;
    font-size: 40%;
    padding-top: 0;
}
.slider.slider-horizontal .slider-tick-label:last-child {
    position: absolute;
    left: 50%;
    top: 10px;
    font-size: 40%;
    padding-top: 0;
}*/


.custom-switch .custom-control-label::before {
    top: 5.25px;
    left: -27.5px;

}

.custom-switch .custom-control-label::after {
    top: calc(5.25px + 2px);
    left: calc(-27.5px + 2px);

}

/* LSM tree bush diagram reuslt display */
.bush-res>div:first-child>button:first-child,
.bush-res>div:first-child>div:first-child>button:first-child {
    /* Custom buffer color */
    /*background-color:#2C3E50;
    border-color: #2C3E50;*/
}

.lsm-btn-group,
.lsm-btn {
    /* Default, tree bush result */
    height: 18px;
    margin: 0 auto 3px;
    padding: 0px;
    border-radius: 12px;
    border-radius: 12px;
    vertical-align: top;
}

.lsm-btn-group .lsm-btn {
    /* Override, tree bush result for tiering */
    height: 18px;
    padding: 0px;
    margin: 0 2px 3px;
}

.lsm-btn-group .lsm-btn:first-child {
    /* Override, first run in each level in tiering */
    margin-left: 0px;
}

.lsm-btn-group .lsm-btn:last-child {
    /* Override, last first run in each level in tiering */
    margin-right: 0px;
}

.ellipsis {
    color: white;
    top: -4px;
    text-align: center;
}


/* LSM performance result display */
#cost-result {
    line-height: 2;
    font-size: 1rem;
    font-weight: 300;
    color: #343a40;
}

.metrics {
    padding-left: 0px;
    padding-right: 0px;
}

.metric-title {
    white-space: nowrap;
}

.cost-col {
    padding: 0px;
}

.uncertain {
    /*color:red;*/
}

.col-lg-3 {
    padding-left: 15px;
    padding-right: 15px;
}

.row {
    padding-left: 40px;
    padding-right: 15px;
}

.abbr-dot {
    cursor: pointer;
    padding: 0px;
    margin: 0px 2px 3px;
    vertical-align: top;
    line-height: 20%;
    font-size: 20px;
}



/* For Control Panel*/

div.row h4 {
    margin: 0 auto;
}

/*div#progress-box {
    border: hidden;
}*/
/*
@media (min-width: 1200px) {

}
*/
@media(max-width:991px) {
    ul>.nav-item {
        padding-left: 0px;
        padding-right: 0px;
    }
}

/*
@media(max-width:575px) {
    .container {
        max-width: 85%;
    }
}
    */

/*Team */
.team-member-img {
    border: 1px solid #2f2f2f;
}

.team-member-box-2 .team-member-img {
    width: 175px;
    margin: auto;
}

.team-member-box {
    text-align: center;
    padding: 30px;
    background-color: #272727;
    -webkit-transition: opacity 500ms;
    -moz-transition: opacity 500ms;
    -o-transition: opacity 500ms;
    transition: opacity 500ms;
}

.team-member-box:hover {
    background-color: #313131;
}

.team-member-box h3 {
    margin-top: 0;
    margin-bottom: 3px;
}

.team-member-box-2 h3 {
    margin-top: 20px;
    margin-bottom: 3px;
    font-size: 21px;
    text-align: center;
    font-weight: normal;
    line-height: 32px;
    font-family: "Helvetica Neue";
}

.team-member-box-2 p {
    font-size: 17px;
    text-align: center;
    font-weight: normal;
    line-height: 26px;
    font-family: "Helvetica Neue";
}

.team-image-wrapper {
    position: relative;
    margin: 0 auto;
    border-radius: 100%;
    overflow: hidden;
}

.team-image-wrapper .team-image-hover {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 100%;
    color: #fff;
    opacity: 0;
    -webkit-transition: opacity 500ms;
    -moz-transition: opacity 500ms;
    -o-transition: opacity 500ms;
    transition: opacity 500ms;
    background-color: rgba(137, 128, 254, 0.80);
}

.team-image-wrapper .team-image-hover .team-hover-content {
    border-radius: 100%;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
}

.team-image-wrapper:hover .team-image-hover {
    opacity: 1;
}

.team-image-hover:before {
    content: ' ';
    display: inline-block;
    vertical-align: middle;
    height: 100%;
}

.team-member {
    padding-top: 30px;
    text-align: center;
}

.team-member a h4 {
    text-transform: none;
    text-decoration: none;
    font-size: 25px;
    margin-bottom: 0px;
    color: #222;
}

.team-member img {
    margin: 0 auto;
    border: 7px solid #fff;
    max-width: 180px;
    max-height: 180px;
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.2);
}

.team-member a:hover,
.team-member a:hover p.text-muted,
.team-member a:hover h4 {
    color: #A51C30;
    text-decoration: none;
}

.team-member a:hover img {
    border-color: #A51C30;
}

.team-member p.text-muted {
    font-size: 21px;
    font-family: 'Helvetica Neue';
    color: #222;
    font-weight: normal;
    text-align: center;
}

.img-centered {
    margin: 0 auto;
}

.img-left {
    margin: -20px;
}

.img-logo {
    width: auto;
    height: 100px;
}

footer {
    color: #fff;
}

footer h3 {
    margin-bottom: 30px;
}

footer .footer-above {
    padding-top: 20px;
    /*background-color: #202020;*/
    /*#2c3e50*/
    background-color: #a2a2a2;
}

footer .footer-col {
    margin-bottom: 20px;
}

footer .footer-below {
    /* padding-top: 25px; */
    top: -150px;
    color: black;
    /* padding-bottom: -5px; */
    /*background-color: #ecf0f1;*/
    /*#233140;*/
}

.row {
    display: flex;
}

.equal-height {
    height: 500px;
    /* Fixed height */
}

.run-button-container {
    text-align: right;
    padding-top: 1.5rem;
}


#klCharts,
#inversionCharts {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
}

.chart-column,
#chart-column {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
}

.charts {
    height: auto !important;
    overflow: hidden !important;
}


.chart_div {
    border: 1px solid #ddd;
    background-color: #fff;
    padding: 5px;
    border-radius: 5px;
    box-sizing: border-box;
    width: calc(100% - 20px) !important;
    height: calc(100% - 20px) !important;
    margin: 10px !important;
    /* Include padding and border in size */
}

#info_div {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #ddd;
    width: 100%;
}

div.fixed {
    position: fixed;
    top: calc(50% + 24px);
    left: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 60px;
    height: auto;
    z-index: 1000;
}

.long-button {
    width: 70%;
    height: 50px;
    border: none;
    padding: 0;
    position: relative;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: black;
    background: repeating-linear-gradient(to right,
            gray 0%,
            gray 10%,
            lightgray 10%,
            lightgray 20%,
            gray 20%,
            gray 30%,
            lightgray 30%,
            lightgray 40%,
            gray 40%,
            gray 50%,
            lightgray 50%,
            lightgray 60%,
            gray 60%,
            gray 70%,
            lightgray 70%,
            lightgray 80%,
            gray 80%,
            gray 90%,
            lightgray 90%,
            lightgray 100%);
}

.section-labels-sware {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    margin-left: 0;
    padding: 8px 6px;
}

.section-labels-sware[data-sware-layout] {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    align-items: stretch;
    justify-items: stretch;
    gap: 1px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 1px 0;
}

.sware-buffer-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
    height: 100%;
    border: 1px solid #3e607f;
    border-radius: 2px;
    background: linear-gradient(180deg, #f4f9ff 0%, #dbe8f5 100%);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
    overflow: hidden;
}

.sware-buffer-page-label {
    color: #202f3f;
    font-family: "Courier New", Courier, monospace;
    font-size: 6px;
    font-weight: 700;
    letter-spacing: 0.1px;
    padding: 1px 2px;
    border-bottom: 1px solid rgba(70, 86, 104, 0.25);
    text-align: center;
}

.sware-buffer-page-slots {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(0, 1fr);
    gap: 1px;
    align-items: stretch;
    padding: 1px 2px 2px 2px;
    flex: 1 1 auto;
    min-height: 0;
}

.sware-buffer-page .buffer-btn {
    min-width: 0;
    margin: 0;
    width: 100%;
    height: auto;
    min-height: 8px;
    line-height: 1;
    padding: 0;
    border: 1px solid #6a7a8b;
    border-radius: 2px;
    background: #fff;
    color: #1f3042;
    box-sizing: border-box;
    font-family: "Courier New", Courier, monospace;
    font-size: 5px;
    font-weight: 700;
}

.sware-buffer-page .buffer-btn.sware-buffer-empty {
    color: #7f8b99;
    border-style: dashed;
    background: rgba(255, 255, 255, 0.55);
    opacity: 1;
}

.sware-buffer-page.sware-page-sorted {
    border-color: #178f43;
    background: linear-gradient(180deg, #f4fff8 0%, #ddf6e8 100%);
    box-shadow: 0 0 0 1px rgba(37, 156, 78, 0.35), 0 0 8px rgba(37, 156, 78, 0.2);
}

.sware-buffer-page.sware-page-sorted .sware-buffer-page-label {
    color: #0f6a30;
    border-bottom-color: rgba(23, 143, 67, 0.4);
}

.sware-buffer-page.sware-page-unsorted {
    border-color: #bf3b2d;
    background: linear-gradient(180deg, #fff4f3 0%, #f9d9d5 100%);
    box-shadow: 0 0 0 1px rgba(191, 59, 45, 0.3), 0 0 8px rgba(191, 59, 45, 0.18);
}

.sware-buffer-page.sware-page-unsorted .sware-buffer-page-label {
    color: #8b1e12;
    border-bottom-color: rgba(191, 59, 45, 0.4);
}

.sware-buffer-page.sware-page-flushing {
    border-color: #1f5fbf;
    background: linear-gradient(180deg, #eef5ff 0%, #d4e4ff 100%);
    box-shadow: 0 0 0 1px rgba(31, 95, 191, 0.35), 0 0 10px rgba(31, 95, 191, 0.2);
}

.sware-buffer-page.sware-page-flushing .sware-buffer-page-label {
    color: #1d4f9b;
    border-bottom-color: rgba(31, 95, 191, 0.4);
}

.buffer-btn {
    width: 46px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #000;
    margin: 0.1px;
    font-size: 9px;
    font-weight: bold;
    pointer-events: none;
}

.buffer-btn:hover {
    background-color: white;
    border-color: #000;
    color: inherit;
    cursor: default;
    box-shadow: none;
    transition: none;
}

.buffer-btn.sware-buffer-empty {
    opacity: 0.45;
}

.buffer-btn.sware-buffer-active {
    border-color: #178f43;
    box-shadow: 0 0 0 2px rgba(37, 156, 78, 0.55), 0 0 14px rgba(37, 156, 78, 0.38);
}

.buffer-btn.sware-buffer-flush-head {
    border-color: #178f43;
    box-shadow: 0 0 0 2px rgba(37, 156, 78, 0.65), 0 0 16px rgba(37, 156, 78, 0.45);
    animation: sware-flush-head-pulse 220ms ease-out;
}

.buffer-btn.sware-buffer-flushing-slot {
    border-color: #1f5fbf;
    background: #e8f1ff;
    box-shadow: 0 0 0 2px rgba(31, 95, 191, 0.55), 0 0 14px rgba(31, 95, 191, 0.35);
}

@keyframes sware-flush-head-pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.03);
    }
}


.triangle {
    height: 60%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    --r: 20px;
    /* border radius */
    aspect-ratio: 1/cos(30deg);
    --_g: calc(tan(60deg)*var(--r)) bottom var(--r), #000 98%, #0000 101%;
    -webkit-mask:
        conic-gradient(from -30deg at 50% calc(200% - 3*var(--r)/2), #000 60deg, #0000 0) 0 100%/100% calc(100% - 3*var(--r)/2) no-repeat,
        radial-gradient(var(--r) at 50% calc(2*var(--r)), #000 98%, #0000 101%),
        radial-gradient(var(--r) at left var(--_g)),
        radial-gradient(var(--r) at right var(--_g));
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background: lightgray;
}

.triangle-sware {
    top: 8%;
    height: 62%;
    position: relative;
    left: 50%;
    transform: translateX(-50%) scaleX(1.45);
    /* Added scaleX to make it wider */
    --r: 20px;
    /* border radius */
    aspect-ratio: 1/cos(30deg);
    --_g: calc(tan(60deg)*var(--r)) bottom var(--r), #000 98%, #0000 101%;
    -webkit-mask:
        conic-gradient(from -30deg at 50% calc(200% - 3*var(--r)/2), #000 60deg, #0000 0) 0 100%/100% calc(100% - 3*var(--r)/2) no-repeat,
        radial-gradient(var(--r) at 50% calc(2*var(--r)), #000 98%, #0000 101%),
        radial-gradient(var(--r) at left var(--_g)),
        radial-gradient(var(--r) at right var(--_g));
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background: lightgray;
    z-index: 10;
    opacity: 0.5;
}

.turn-red {
    background: red;

}

.dots {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: black;
}

.rectangle-sware {
    width: 70px;
    height: 20px;
    border-radius: 5px;
    background-color: #80CBC4;
}

.rectangles-sware {
    position: absolute;
    top: 72%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.smallerDots-sware {
    display: flex;
    gap: 10px;
}

.smallerDot-sware {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: black;
}

#last-tree {
    width: 70px;
    height: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: black;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: bold;
}

.turn-green {
    background-color: #2ecc71;
}

.hidden {
    display: none;
}

.freeze-red:disabled {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    opacity: 0.65;
    cursor: not-allowed;
}

.freeze-green {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.freeze-green:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.freeze-orange {
    background-color: orange !important;
    border-color: orange !important;
}

.freeze-orange:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#buttons-container {
    display: flex;
    justify-content: center;
    /* Keeps buttons centered */
    align-items: center;
    gap: 0;
    /* Removes extra space */
}

#buttons-container button {
    margin: 0;
    /* Ensures no margin around buttons */
    padding: 10px;
    /* Adds some padding for a larger clickable area */
    width: 48px;
    /* Adjusts button width */
    height: 48px;
    /* Adjusts button height */
    border: none;
    /* Removes border */
}

#buttons-container .control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#buttons-container .skip-button {
    width: auto;
    min-width: 58px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 700;
    gap: 4px;
}

#buttons-container .control-button .material-icons {
    font-size: 28px;
    line-height: 1;
}

#dashed-line {
    margin-top: 50px;
}

#chart-container {
    display: flex;
    justify-content: center;
}

.circle {
    width: 30px;
    height: 30px;
    background-color: #dc9806;
    /* Mellow Yellow */
    border-radius: 50%;
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* Glow effect class to be toggled with JavaScript */
.glow-active {
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.7), 0 0 40px rgba(255, 255, 0, 0.7), 0 0 60px rgba(255, 255, 0, 0.7);
    animation: glow-pulse 0.3s alternate;
    /* Faster animation for 0.3s */
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 255, 0, 0.5), 0 0 30px rgba(255, 255, 0, 0.5), 0 0 45px rgba(255, 255, 0, 0.5);
        /* Bigger Bright Yellow */
    }

    100% {
        box-shadow: 0 0 30px rgba(255, 255, 0, 0.8), 0 0 60px rgba(255, 255, 0, 0.8), 0 0 90px rgba(255, 255, 0, 0.8);
        /* Bigger Bright Yellow */
    }
}

.glow-red {
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 1)) drop-shadow(0 0 40px rgba(255, 0, 0, 0.8)) drop-shadow(0 0 60px rgba(255, 0, 0, 0.6)) brightness(1.2);
    background: linear-gradient(135deg, #ff6b6b, #ff8787) !important;
    animation: glow-pulse-red 0.3s ease-in-out;
    transition: all 0.1s ease;
}

@keyframes glow-pulse-red {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 0, 0, 0.6)) brightness(1.1);
        /*transform: translateX(-50%) scale(1);*/
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(255, 0, 0, 1)) drop-shadow(0 0 50px rgba(255, 0, 0, 0.9)) drop-shadow(0 0 70px rgba(255, 0, 0, 0.7)) brightness(1.3);
        /*transform: translateX(-50%) scale(1.05);*/
    }

    100% {
        filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 0, 0, 0.6)) brightness(1.1);
        /*transform: translateX(-50%) scale(1);*/
    }
}

.glow-green {
    filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.8)) drop-shadow(0 0 40px rgba(0, 255, 0, 0.6)) drop-shadow(0 0 60px rgba(0, 255, 0, 0.4));
    animation: glow-pulse-green 0.3s ease-in-out;
    background-color: rgba(0, 255, 0, 0.8);
}

@keyframes glow-pulse-green {
    0% {
        filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.6)) drop-shadow(0 0 20px rgba(0, 255, 0, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(0, 255, 0, 1)) drop-shadow(0 0 50px rgba(0, 255, 0, 0.8)) drop-shadow(0 0 70px rgba(0, 255, 0, 0.6));
    }

    100% {
        filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.6)) drop-shadow(0 0 20px rgba(0, 255, 0, 0.4));
    }
}

.page-btn {
    width: 30px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #000;
    margin: 0.1px;
    font-size: 9px;
    font-weight: bold;
    background-color: white;
    border-radius: 0;
    pointer-events: none;
    color: black;
}

.page-btn:hover {
    background-color: white;
    border-color: #000;
    color: inherit;
    cursor: default;
    box-shadow: none;
    transition: none;
}

.section-labels-quit {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 0.3px;
}


.rectangle-quit {
    width: 40px;
    height: 20px;
    background-color: #FFB433;
    border-radius: 5px;
}

.rectangles-quit {
    position: absolute;
    top: 72%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.smallerDots-quit {
    display: flex;
    gap: 10px;
}

.smallerDot-quit {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: black;
}

.rectangle-lil {
    width: 40px;
    height: 20px;
    background-color: #800080;
    border-radius: 5px;
}

.rectangles-lil {
    position: absolute;
    top: 72%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.smallerDots-lil {
    display: flex;
    gap: 10px;
}

.smallerDot-lil {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: black;
}


.arrow-up {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid red;
    /* arrow color */
    position: absolute;
    bottom: 60px;
    left: 50%;
    /* range = 10%-90% */
    transform: translateX(-50%);
    transition: left 0.5s;
    /* Smooth transition */
}


#cost-result {
    line-height: 2;
    font-size: 1rem;
    font-weight: 300;
    color: #343a40;
}

.metrics {
    padding-left: 0px;
    padding-right: 0px;
}

.metric-title {
    white-space: nowrap;
}

.cost-col {
    padding: 0px;
}


.col-lg-3 .row {
    padding-left: 15px;
    padding-right: 15px;
}

.abbr-dot {
    cursor: pointer;
    padding: 0px;
    margin: 0px 2px 3px;
    vertical-align: top;
    line-height: 20%;
    font-size: 20px;
}


.cost {
    display: block;
    width: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.metric-title {
    display: block;
    width: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

#stop-button {
    background: linear-gradient(135deg, #495a6b 0%, #91a3b5 100%) !important;
    color: #ffffff;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#continue-button {
    background: linear-gradient(135deg, #2f8d46 0%, #7fcf6f 100%) !important;
    color: #ffffff;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#buttons-container .skip-button {
    background: linear-gradient(135deg, #51606f 0%, #8c9aa8 100%) !important;
    color: #ffffff;
    border-radius: 0;
}

#buttons-container .skip-button:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

#buttons-container .skip-button .material-icons {
    font-size: 20px;
    line-height: 1;
}

#buttons-container .skip-button-label {
    line-height: 1;
}

.chart-column {
    padding-left: 0px;
    padding-right: 0px;
}

.results-panel:not(.hidden) {
    padding-top: 40px;
    display: flex;
    justify-content: center;
}

.results-panel.hidden {
    display: none;
}

.sware-quit-title {
    font-size: 20px;
    font-weight: normal;
}

.lil-pole-title-row {
    padding-top: 40px;
}

.results-panel #cost-result {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.results-panel .row {
    padding-left: 0;
    padding-right: 0;
    align-items: center;
}

.results-panel .col,
.results-panel .col-2 {
    text-align: center !important;
}

.results-panel .col {
    flex: 1 1 0;
    max-width: none;
}

.results-panel .col-2 {
    flex: 0 0 280px;
    max-width: 280px;
}

.results-panel .metric-title {
    white-space: normal;
    line-height: 1.2;
    max-width: 100%;
    margin: 0 auto;
}

.color-legends {
    text-align: center;
    padding: 5px;
    padding-bottom: 20px;
}

.color-legend-box {
    height: 20px;
    width: 60px;
    margin-right: 5px;
}

.color-legend-sware {
    border: 2px solid #80CBC4;
    background-color: #80CBC4;
}

.color-legend-quit {
    border: 2px solid #FFB433;
    background-color: #FFB433;
}

.chart-container {
    height: 300px;
    border: 2px solid #666666;
    border-radius: 15px;
    border-style: dashed;
    padding: 1px;
}

.buffer-container {
    height: 120px;
    border: 2px solid lightgray;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.data-container {
    height: 120px;
    border: 2px solid lightgray;
    border-radius: 5px;
}

.buffer-content {
    left: 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin-top: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
}

.tree-container {
    padding: 10px;
    height: 400px;
    overflow-y: auto;
    border: 2px solid lightgray;
    border-radius: 5px;
    position: relative;
    background: transparent;
}

.algo-box-active {
    border-color: #178f43 !important;
    box-shadow: 0 0 0 2px rgba(37, 156, 78, 0.55), 0 0 18px rgba(37, 156, 78, 0.35);
}

.algo-box-flushing {
    border-color: #58c878 !important;
    box-shadow:
        0 0 0 2px rgba(88, 200, 120, 0.6),
        0 0 22px rgba(88, 200, 120, 0.45),
        inset 0 0 0 1px rgba(88, 200, 120, 0.35);
}

.animation-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.structure-slot {
    flex: 1 1 0;
    min-width: 0;
}

.structure-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#structure-panel-store {
    display: none;
}

.animation-column>h4 {
    margin-bottom: 0;
}

.panel-box,
.insertions-panel,
#tree-quit {
    width: 100%;
    box-sizing: border-box;
}

.sware-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.sware-box .buffer-container {
    flex: 0 0 auto;
    margin: 0;
}

.sware-tree-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.sware-tree-panel.hidden {
    display: none;
}

.animations-container {
    flex-direction: row;
}

.animations-layout {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#insertions-area>h4 {
    margin-bottom: 0;
}

#insertions-area {
    padding-left: 15px;
    padding-right: 15px;
}

#insertions-area .buffer-container {
    height: 58px;
}

#insertions-area .section-labels-quit {
    height: 100%;
    align-items: center;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 6px;
    padding-right: 6px;
    box-sizing: border-box;
}

.animations-layout>.animations-container {
    align-items: flex-start;
    gap: 18px;
}

.animations-layout>.animations-container>.container {
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(50% - 9px);
    margin-top: 0 !important;
}

.research-section {
    margin: 0px;
}


.deleteButton {
    position: absolute;
    top: 2%;
    right: 2%;
    z-index: 10;


    width: 6%;
    padding: 1%;

    background: rgba(220, 53, 69, 0.85);
    border: none;
    color: #fff;
    border-radius: 0.25rem;
    font-size: 0.8em;
    cursor: pointer;
}

.deleteButton:hover {
    background: rgba(220, 53, 69, 1);
}

#exchangesDone {
    border: 1px solid lightgray;
    padding-top: 1.5%;
    padding-right: 10%;
    padding-left: 10%;
    display: flex;
    justify-content: center;
}

.section-title {
    text-align: center;
}

.workload-title {
    font-size: large;
    padding-bottom: 20px;
}

.parameter-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.parameter-container {
    width: 23%;
}

.generate-workload-container {
    text-align: right;
    padding-top: 1.5rem;
    padding-bottom: 20px;
}


/* new styling */
#cmp-conf-row,
#cmp-conf-row2,
#cmp-conf-row3 {
    gap: 24px;
    flex-wrap: wrap;
}

#cmp-conf-row .parameter-container,
#cmp-conf-row2 .parameter-container,
#cmp-conf-row3 .parameter-container {
    width: 28%;
    margin-right: 1%;
    margin-left: 1%;
}

#cmp-conf-row .input-group,
#cmp-conf-row2 .input-group,
#cmp-conf-row3 .input-group {
    position: relative;
    background: #f8f9fa;
    border-radius: 12px !important;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: none !important;
    margin-bottom: 0;
}

#cmp-conf-row .input-group::before,
#cmp-conf-row2 .input-group::before,
#cmp-conf-row3 .input-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #28a745 0%, #764ba2 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

#cmp-conf-row .input-group:hover,
#cmp-conf-row2 .input-group:hover,
#cmp-conf-row3 .input-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#cmp-conf-row .input-group:focus-within::before,
#cmp-conf-row2 .input-group:focus-within::before,
#cmp-conf-row3 .input-group:focus-within::before {
    opacity: 0.1;
}

#cmp-conf-row .input-group-text,
#cmp-conf-row2 .input-group-text,
#cmp-conf-row3 .input-group-text {
    background: transparent !important;
    border: none !important;
    font-size: 12px;
    font-weight: 700;
    color: #28a745 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    white-space: nowrap;
}

.specialChar {
    text-transform: none !important;
    font-size: 12px !important;
}

#cmp-conf-row .form-control,
#cmp-conf-row2 .form-control,
#cmp-conf-row3 .form-control {
    background: transparent !important;
    border: none !important;
    font-size: 16px;
    padding: 12px 20px;
    font-weight: 500;
    color: #2d3748;
    text-align: right;
}

#cmp-conf-row .form-control:focus,
#cmp-conf-row2 .form-control:focus,
#cmp-conf-row3 .form-control:focus {
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.5) !important;
}

#cmp-conf-row3 .input-group-text {
    font-size: 10px;
    letter-spacing: 0.2px;
    padding: 12px 12px;
    text-transform: none;
}

#cmp-conf-row3 select.form-control {
    font-size: 15px;
    text-align: left;
    text-align-last: left;
    line-height: 1.2;
    padding-left: 12px;
    padding-right: 30px;
    padding-top: 0;
    padding-bottom: 0;
}

/* workload title */
h4.workload-title {
    color: #2d3748;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 40px 0 30px;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

h4.workload-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #28a745 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Add icons styling */
#cmp-conf-row .input-group-text i,
#cmp-conf-row2 .input-group-text i,
#cmp-conf-row3 .input-group-text i {
    margin-right: 8px;
    font-size: 14px;
}

#cmp-conf-row4 .btn-success {
    border-radius: 12px;
}

/*sware tree styling*/
.tree-node {
    border: 1px solid black;
    height: 3vh;
    width: 6vw;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.tree-node.dot {
    font-size: 14px;
    letter-spacing: 1px;
    background-color: white;
}

#root {
    left: 50%;
    transform: translateX(-50%);
    top: 10%;
}

#left-dots {
    left: 20%;
    transform: translateX(-50%);
    top: 63.4%;
}

#center-dots {
    left: 50%;
    transform: translateX(-50%);
    top: 63.4%;
}



#right-dots {
    left: 80%;
    transform: translateX(-50%);
    top: 63.4%;
}

#right-leaf {
    left: 80%;
    transform: translateX(-50%);
    top: 70%;
}

.tree-line {
    position: absolute;
    width: 2px;
    background-color: black;
    transform-origin: top center;
}

.big-line-left {
    left: 50%;
    top: calc(10% + 3vh);
    height: 66.5%;
    transform: translateX(-50%) rotate(36.7deg);
    width: 3px;
}

.big-line-left:not(.glow-red):not(.glow-green) {
    background: transparent;
    filter: none;
}

.big-line-center {
    left: 50%;
    top: calc(10% + 3vh);
    height: 53.5%;
    transform: translateX(-50%);
    width: 3px;
}

.big-line-center:not(.glow-red):not(.glow-green) {
    background: transparent;
    filter: none;
}

.big-line-right {
    left: 50%;
    top: calc(10% + 3vh);
    height: 66.5%;
    transform: translateX(-50%) rotate(-36.7deg);
    width: 3px;
}

.big-line-right:not(.glow-red):not(.glow-green) {
    background: transparent;
    filter: none;
}

/* Position leaf nodes for left branch */
.left-left-leaf {
    left: 10%;
    transform: translateX(-50%);
    top: 74%;
}

.left-center-leaf {
    left: 20%;
    transform: translateX(-50%);
    top: 74%;
}

.left-right-leaf {
    left: 30%;
    transform: translateX(-50%);
    top: 74%;
}

/* Position leaf nodes for center branch */
.center-left-leaf {
    left: 40%;
    transform: translateX(-50%);
    top: 74%;
}

.center-center-leaf {
    left: 50%;
    transform: translateX(-50%);
    top: 74%;
}

.center-right-leaf {
    left: 60%;
    transform: translateX(-50%);
    top: 74%;
}

/* Position leaf nodes for right branch */
.right-left-leaf {
    left: 70%;
    transform: translateX(-50%);
    top: 74%;
}

.right-center-leaf {
    left: 80%;
    transform: translateX(-50%);
    top: 74%;
}

.right-right-leaf {
    left: 90%;
    transform: translateX(-50%);
    top: 74%;
}

/* Lines from left dot to its leaves */
.left-left-line {
    left: 20%;
    top: calc(63.4% + 3vh);
    height: 14%;
    transform: translateX(-50%) rotate(67deg);
}

.left-center-line {
    left: 20%;
    top: calc(63.4% + 3vh);
    height: 5.7%;
    transform: translateX(-50%);
}

.left-right-line {
    left: 20%;
    top: calc(63.4% + 3vh);
    height: 14%;
    transform: translateX(-50%) rotate(-67deg);
}

/* Lines from center dot to its leaves */
.center-left-line {
    left: 50%;
    top: calc(63.4% + 3vh);
    height: 14%;
    transform: translateX(-50%) rotate(67deg);
}

.center-center-line {
    left: 50%;
    top: calc(63.4% + 3vh);
    height: 5.7%;
    transform: translateX(-50%);
}

.center-right-line {
    left: 50%;
    top: calc(63.4% + 3vh);
    height: 14%;
    transform: translateX(-50%) rotate(-67deg);
}

/* Lines from right dot to its leaves */
.right-left-line {
    left: 80%;
    top: calc(63.4% + 3vh);
    height: 14%;
    transform: translateX(-50%) rotate(67deg);
}

.right-center-line {
    left: 80%;
    top: calc(63.4% + 3vh);
    height: 5.7%;
    transform: translateX(-50%);
}

.right-right-line {
    left: 80%;
    top: calc(63.4% + 3vh);
    height: 14%;
    transform: translateX(-50%) rotate(-67deg);
}

.tree-node.leaf {
    font-size: 8px;
    width: 3.5vw;
    height: 2.5vh;
    border-radius: 5px;
}

/* QuIT B+-tree visual style (node-by-node from scratch) */
:is(#quit-area, #insertions-area) .section-labels-quit {
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
}

#insertions-area .section-labels-quit {
    gap: 10px;
    padding: 0 6px;
}

:is(#quit-area, #insertions-area) .page-btn {
    width: 48px;
    height: 33px;
    margin: 0;
    border: 1px solid #4f6275;
    border-radius: 2px;
    font-size: 12px;
    color: #1a2632;
    background: linear-gradient(180deg, #f7f9fc 0%, #dce6f2 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.quit-bplus-tree {
    height: 400px;
    min-height: 400px;
    max-height: 400px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: transparent;
}

#tree-area-step-3\+ {
    overflow: hidden;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 100%;
    padding: 8px;
    width: 100%;
    min-width: 0;
}

#sware-tree-grid {
    width: 100%;
    min-width: 100%;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-links {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-link-path {
    fill: none;
    stroke: #62798f;
    stroke-width: 1.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-link-path.quit-tree-link-fast {
    stroke: #1b9d4d;
    stroke-width: 2.8;
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(27, 157, 77, 0.55));
    animation: quit-fast-link-pulse 220ms ease-out;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-link-path.quit-tree-link-path-active {
    stroke: #cf2f2f;
    stroke-width: 2.2;
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(207, 47, 47, 0.45));
}

@keyframes quit-fast-link-pulse {
    0% {
        stroke-width: 1.5;
        opacity: 0.85;
    }

    100% {
        stroke-width: 2.8;
        opacity: 1;
    }
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-row {
    display: grid;
    grid-template-columns: repeat(var(--quit-cols, 1), max-content);
    justify-content: center;
    gap: 8px;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-row.quit-row-layer-ellipsis {
    grid-template-columns: max-content;
    justify-content: center;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-slot {
    width: 84px;
    min-height: 62px;
    max-width: 84px;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-row.quit-row-layer-ellipsis .quit-node-slot {
    width: calc((5 * 84px) + (4 * 8px));
    max-width: calc((5 * 84px) + (4 * 8px));
    min-height: 76px;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-ellipsis {
    width: 100%;
    height: 100%;
    border: 1px dashed #7f8fa0;
    border-radius: 4px;
    background: rgba(247, 250, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    font-weight: 700;
    color: #617487;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-ellipsis.quit-ellipsis-path-active {
    border-color: #cf2f2f;
    background: rgba(255, 244, 244, 0.9);
    color: #8f1f1f;
    box-shadow: 0 0 0 2px rgba(207, 47, 47, 0.45), 0 0 14px rgba(207, 47, 47, 0.3);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-layer-ellipsis {
    min-height: calc(42px + (var(--quit-layer-span, 1) * 8px));
    padding: 4px 0;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-layer-dot-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-layer-dot-line {
    letter-spacing: 1px;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #4e6174;
    border-radius: 4px;
    background: linear-gradient(180deg, #fff 0%, #ebf0f7 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.internal {
    border-color: #3e607f;
    background: linear-gradient(180deg, #f4f9ff 0%, #dbe8f5 100%);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.leaf {
    border-color: #3e607f;
    background: linear-gradient(180deg, #f4f9ff 0%, #dbe8f5 100%);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.root {
    border-width: 2px;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node {
    border-color: #c89a12;
    background: linear-gradient(180deg, #fff9d6 0%, #f3e08a 100%);
    box-shadow: 0 0 0 2px rgba(200, 154, 18, 0.52), 0 0 14px rgba(200, 154, 18, 0.3);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node .quit-node-header {
    color: #7a5b00;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-header {
    font-family: "Courier New", Courier, monospace;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 4px;
    border-bottom: 1px solid rgba(70, 86, 104, 0.25);
    color: #202f3f;
    letter-spacing: 0.1px;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-range {
    font-family: "Courier New", Courier, monospace;
    font-size: 7px;
    font-weight: 700;
    color: #35495f;
    padding: 2px 4px 0 4px;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-keys {
    display: grid;
    grid-template-columns: repeat(var(--quit-key-columns, 4), minmax(0, 1fr));
    gap: 2px;
    padding: 3px 4px 4px 4px;
    align-items: stretch;
    min-height: calc((var(--quit-key-rows, 1) * 12px) + ((var(--quit-key-rows, 1) - 1) * 2px));
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-key-cell {
    min-width: 0;
    width: 100%;
    height: 12px;
    line-height: 11px;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #6a7a8b;
    background: #fff;
    border-radius: 2px;
    font-family: "Courier New", Courier, monospace;
    font-size: 5px;
    font-weight: 700;
    color: #1f3042;
    overflow: hidden;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-key-empty {
    color: #7f8b99;
    border-style: dashed;
    background: rgba(255, 255, 255, 0.55);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-leaf-pointer {
    margin-top: auto;
    border-top: 1px dashed rgba(58, 93, 126, 0.45);
    padding: 1px 4px 2px 4px;
    font-family: "Courier New", Courier, monospace;
    font-size: 7px;
    font-weight: 700;
    color: #2e5f8a;
    text-transform: uppercase;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-path-active {
    box-shadow: 0 0 0 2px rgba(207, 47, 47, 0.55), 0 0 16px rgba(207, 47, 47, 0.35);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-fast-active {
    box-shadow: 0 0 0 2px rgba(37, 156, 78, 0.55), 0 0 16px rgba(37, 156, 78, 0.35);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active {
    border-color: #178f43;
    background: linear-gradient(180deg, #f4fff8 0%, #ddf6e8 100%);
    box-shadow:
        0 0 0 2px rgba(37, 156, 78, 0.65),
        0 0 18px rgba(37, 156, 78, 0.45),
        inset 0 0 0 1px rgba(23, 143, 67, 0.75);
    animation: quit-fast-pole-pulse 220ms ease-out;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-node-header,
:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-node-range,
:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-key-cell,
:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-leaf-pointer {
    color: #0f6a30;
    font-weight: 800;
    text-shadow: 0 0 5px rgba(27, 157, 77, 0.25);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-node-header {
    border-bottom-color: rgba(23, 143, 67, 0.55);
    box-shadow: inset 0 -1px 0 rgba(23, 143, 67, 0.55);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-key-cell {
    border-color: #1b9d4d;
    box-shadow: inset 0 0 0 1px rgba(27, 157, 77, 0.65);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-key-empty {
    border-color: rgba(27, 157, 77, 0.5);
    background: rgba(230, 248, 237, 0.9);
    color: rgba(15, 106, 48, 0.7);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.quit-pole-node.quit-fast-active .quit-leaf-pointer {
    border-top-color: rgba(23, 143, 67, 0.55);
    box-shadow: inset 0 1px 0 rgba(23, 143, 67, 0.55);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.sware-tail-node {
    border-color: #2e5f8a;
    box-shadow: 0 0 0 2px rgba(46, 95, 138, 0.55), 0 0 14px rgba(46, 95, 138, 0.34);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.sware-tail-node .quit-node-header {
    color: #1f4f79;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.sware-tail-node.quit-path-active {
    border-color: #cf2f2f;
    box-shadow: 0 0 0 2px rgba(207, 47, 47, 0.55), 0 0 16px rgba(207, 47, 47, 0.35);
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-card.sware-tail-node.quit-path-active .quit-node-header {
    color: #202f3f;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .sware-tail-dots-card {
    border-color: #7f8fa0;
    background: rgba(247, 250, 255, 0.85);
    color: #617487;
    font-size: 16px;
    letter-spacing: 1px;
}

:is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .sware-tail-dots-card.sware-tail-dots-fast {
    border-color: #178f43;
    background: rgba(235, 251, 241, 0.95);
    color: #178f43;
    box-shadow: 0 0 0 2px rgba(37, 156, 78, 0.65), 0 0 16px rgba(37, 156, 78, 0.45);
    animation: sware-tail-fast-pulse 220ms ease-out;
}

@keyframes sware-tail-fast-pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.03);
    }
}

@keyframes quit-fast-pole-pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.02);
    }
}

#buttons-container .skip-button .ff-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 20px;
    height: 18px;
}

#buttons-container .skip-button .ff-triangle {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid currentColor;
}

#buttons-container .skip-button .ff-icon-2,
#buttons-container .skip-button .ff-icon-3 {
    gap: 0;
}

@media (max-width: 991px) {
    .animations-layout>.animations-container {
        flex-direction: column;
        gap: 14px;
    }

    .animations-layout>.animations-container>.container {
        max-width: 100%;
        width: 100%;
    }

    :is(#quit-area, #insertions-area) .page-btn {
        width: 39px;
        height: 28px;
        font-size: 9px;
    }

    #insertions-area .buffer-container {
        height: 50px;
    }

    :is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-row {
        grid-template-columns: repeat(var(--quit-cols, 1), max-content);
        gap: 8px;
    }

    :is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-slot {
        width: 76px;
        min-height: 60px;
        max-width: 76px;
    }

    :is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-tree-row.quit-row-layer-ellipsis .quit-node-slot {
        width: calc((5 * 76px) + (4 * 8px));
        max-width: calc((5 * 76px) + (4 * 8px));
        min-height: 70px;
    }

    :is(#quit-tree-grid, #sware-tree-grid, #tail-tree-grid, #lil-tree-grid, #bplus-tree-grid) .quit-node-ellipsis {
        font-size: 12px;
    }
}