:root {
  /* dark color for background*/
  /* default color */
  /* --bg-color1: #2e3440; */
  --bg-color1: rgba(46, 52, 61, 0.5);
  /* for most panel, context, header, etc */
  --bg-color2: #3b4252;
  /* for toc and table edit panel */
  --bg-color3: rgba(16, 17, 20, 0.5);
  /* for tips */
  --bg-color4: black;
  /* for blockquote, codeblock, input, etc */
  --bg-color5: rgb(29, 31, 35);
  /* light color for text and icon*/
  /* default color */
  --text-color1: #eceff4;
  /* for text on panel */
  --text-color2: #eceff4;
  /* for checkbox and radio */
  --text-color3: #e5e9f0;
  /* for tips */
  --text-color4: white;
  /* for focus mode */
  --text-color5: #d8dee9;
  /* link color */
  --link-color: #5e81ac;
  /* table color */
  --table-border-color: #d8dee9;
  --table-thead-color: #2e3440;
  --table-bg-color: #3b4252;
  --table-bg-darker-color: #2e3440;
  /* hover color */
  /* default hover background color */
  --hover-bg-color1: #3b4252;
  /* for input item */
  --hover-bg-color2: hsl(220, 9%, 14%);
  /* for button on toc and table edit panel */
  --hover-bg-color3: rgba(62, 66, 73, 0.8);
  /* default hover text color */
  --hover-text-color: #eceff4;
  /* active color */
  --active-color: var(--hover-bg-color1);
  /* input color */
  --input-color: rgb(29, 31, 35);
  /* menu divider color */
  --menu-divider-color: ##3b4252;
  /* scrollbar color */
  --scrollbar-thumb-color: #4c566a;
  --scrollbar-track-color: #4c566a;


  /* theme select color */
  --theme-select-color: rgba(255, 255, 255, 0.5);
  --button-color: rgb(62, 66, 73);
  --select-color: rgb(33, 37, 43);

  
  /* focus color */
  --focus-color: #d8dee9;
  --focus-ring-color: #2e3440;


  /* codeblock color */
  --code-red-color: #bf616a;
  --code-yellow-color: #ebcb8b;
  --code-cyan-color: #8fbcbb;
  --code-blue-color: #88c0d0;
  --code-purple-color: #b48ead;
  --code-orange-color: #d08770;
  --code-grey-color: #d8dee9 ;
  --code-green-color: #a3be8c;
  --code-select-bg-color: #3b4252;
  --code-cursor-color: #5e81ac;
  /* implicit selecttion text bg color */
  --select-text-bg-color: rgb(150, 156, 170);
  /* implicit button color */
  --primary-color: var(--button-color);
  --primary-btn-border-color: transparent;
  --primary-btn-text-color: var(--text-color2);
  /* implicit sidebar color */
  --side-bar-bg-color: var(--bg-color2);
  --control-text-color: var(--text-color2);
  /* implicit text color */
  --text-color: var(--text-color1);
  /* implicit background color for setting menu */
  --bg-color: var(--bg-color1);
  /* implicit hover color */
  --item-hover-bg-color: var(--hover-bg-color1);
  --item-hover-text-color: var(--hover-text-color);
  /* implicit active color */
  --active-file-bg-color: var(--hover-bg-color);
  /* implicit mathjax edit panel background color */
  --rawblock-edit-panel-bd: var(--bg-color5);
  /* implicit focus mode color */
  --blur-text-color: var(--text-color5);
  /* implicit search result select color */
  --search-select-bg-color: var(--select-text-bg-color);
  --search-select-bg-color: rgb(56, 71, 95);

  --control-text-hover-color: var(--hover-text-color);
  /* implicit active file color in sidebar file menu treeview */
  --active-file-text-color: var(--hover-text-color);
  --active-file-border-color: var(--hover-text-color);

  --node-border: var(--menu-divider-color);
  --node-fill: var(--bg-color2);
  
  /* I want Rubik by default! (gwyneth 20201123) */
  --sans-serif: "Rubik";
  --monospace: "Fira Code", "Source Code", "Consolas", monospace; /* seems to be the new way to do this */
}

/* Rubik is a variable font (gwyneth 20201123) */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: normal;
  src: local("Rubik"), url("./nord/Rubik-VF.woff2") format("woff2");
}

/* Rubik is a variable font so the remaining is not necessary (gwyneth 20201123) */
/*
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: normal;
  src: local("Open Sans Italic"), url("./onedark/400i.woff") format("woff");
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: bold;
  src: local("Open Sans Bold"), url("./onedark/700.woff") format("woff");
}

@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: bold;
  src: local("Open Sans Bold Italic"), url("./onedark/700i.woff") format("woff");
}
*/

/* Fira Code is a variable font, too (gwyneth 20201123) */
@font-face {
  font-family: "Fira Code";
  font-style: normal;
  font-weight: normal;
  src: local("Fira Code Retina"), local("Fira Code Regular"), local("Fira Code"), url("./nord/FiraCode-VF.woff2") format("woff2");
}

/* Source Code is a variable font, but it has separate Roman and Italic subfonts as of 2019 (gwyneth 20201123) */
@font-face {
  font-family: "Source Code";
  font-style: normal;
  font-weight: normal;
  src: local("Source Code Regular"), local("Source Code Variable Regular"), local("Source Code"), url("./nord/SourceCodeVariable-Roman.woff2") format("woff2");
}

@font-face {
  font-family: "Source Code";
  font-style: italic;
  font-weight: normal;
  src: local("Source Code Italic"), local("Source Code Variable Italic"), local("Source Code"), url("./nord/SourceCodeVariable-Italic.woff2") format("woff2");
}


/* basic style */
html {
  font-size: 18px;
}

body {
  font-family: var(--sans-serif);  /* default used to be monospace... (gwyneth 20201123) */
  color: var(--text-color1);
  background: var(--bg-color1);
  line-height: 1.6;
}

/* text selection background color */
.in-text-selection {
  background-color: rgb(64, 72, 89);
}

/* link */
#write a:not([role="menuitem"]) {
  color: var(--link-color) !important;
}

#write a:not([role="menuitem"]):hover {
  color: var(--hover-text-color) !important;
}

/* h1-h6 */
#write h1,
#write h2,
#write h3,
#write h4,
#write h5,
#write h6 {
  margin-top: 0.5rem;
  margin-bottom: 0rem;
  line-height: 1.6;
  color: var(--text-color5);
}

#write h1 {
  font-size: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 5px double var(--text-color1);
}

/* I personally hate the § thingy before headers!! (gwyneth 20201123) */
/* #write h1:before {
  content: "\00A7  ";
}*/

#write h2 {
  font-size: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px double var(--text-color1);
}

/* #write h2:before {
  content: "\00A7  ";
} */

#write h3 {
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--text-color1);
}

#write h4 {
  font-size: 1.55rem;
}

#write h5 {
  font-size: 1.35rem;
}

#write h6 {
  font-size: 1.2rem;
}

/* horizontal divider */
hr {
  height: 2px;
  background-color: var(--text-color1);
  border: 0px;
}

/* list */
ul,
ol {
  padding-left: 30px;
}

/* blockquote */
blockquote {
  border-left: 4px solid var(--text-color1);
  padding: 4px 15px;
  color: var(--text-color1);
  background-color: var(--bg-color5);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

blockquote blockquote {
  padding-right: 0em;
}

/* table */
.md-table-fig,
.md-table-fig:active {
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.md-table thead tr {
  background-color: var(--table-thead-color);
}

.md-table tr th {
  font-weight: bold;
  border-left: 1px solid var(--table-border-color);
  border-right: 1px solid var(--table-border-color);
  text-align: left;
  margin: 0;
  padding: 6px 13px;
}

.md-table tbody tr {
  border-top: 1px solid var(--table-border-color);
  margin: 0;
  padding: 0;
}

.md-table tbody tr:nth-child(2n) {
  background-color: var(--table-bg-darker-color);
}

.md-table tbody tr:nth-child(2n + 1) {
  background-color: var(--table-bg-color);
}

.md-table tr td {
  border-left: 1px solid var(--table-border-color);
  border-right: 1px solid var(--table-border-color);
  text-align: left;
  margin: 0;
  padding: 6px 13px;
}

.md-table tr th:first-child,
.md-table tr td:first-child {
  border-left-width: 0px;
}

.md-table tr th:last-child,
.md-table tr td:last-child {
  border-right-width: 0px;
}

/* table edit panel */
.ty-table-edit {
  background-color: var(--bg-color3);
  border: 0px;
  border-radius: 6px;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 6px;
  padding-right: 6px;
  margin-top: -29px !important;
}

/* button on table edit panel */
.ty-table-edit button {
  background-color: transparent;
  color: var(--text-color2);
  border: 0px;
  margin-left: 0px !important;
}

/* button hover on table edit panel */
.ty-table-edit button:hover {
  background-color: var(--hover-bg-color3);
  color: var(--hover-text-color);
}

/* adjusting table panel */
.popover {
  background-color: var(--bg-color2);
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

/* arrow of adjusting table panel */
.popover.bottom > .arrow:after {
  border-bottom-color: var(--bg-color2);
}

/* divider in adjust table panel */
.md-grid-board-wrap .popover-title {
  border-top-color: var(--menu-divider-color);
}

/* grid size */
.md-grid-board a {
  width: 15px;
  height: 15px;
}

/* existing thread grid */
.md-grid-board tr[row="1"] .md-grid-ext {
  background-color: rgb(60, 60, 60);
}

/* not existing thread grid */
.md-grid-board tr[row="1"] {
  background-color: rgb(220, 220, 220);
}

/* existing grid */
.md-grid-board .md-grid-ext {
  background-color: rgb(120, 120, 120);
}

/* selected thread grid */
.md-grid-board tr[row="1"] a.md-active,
.md-grid-board tr[row="1"] a:hover {
  background-color: rgb(60, 60, 60);
}

/* selected grid */
.md-grid-board a.md-active,
.md-grid-board a:hover {
  border-color: var(--menu-divider-color);
  background-color: rgb(120, 120, 120);
}

/* task */
.md-task-list-item > input {
  margin-left: -1.3em;
}

/* footnote */
sup.md-footnote {
  color: var(--text-color1);
  background-color: var(--bg-color2);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* mathjax */
/* .mathjax-block>.code-tooltip {
    bottom: .375rem;
}
.md-mathjax-midline {
    background: #fafafa;
} */
.md-inline-math script {
  color: var(--text-color1);
}

.md-rawblock > .md-rawblock-container {
  transition: 0.5s;
}

.md-rawblock > .md-rawblock-tooltip {
  transition: 0.5s;
  display: block;
  visibility: hidden;
  opacity: 0;
}

.md-rawblock:hover > .md-rawblock-tooltip {
  transition: 0.5s;
  visibility: visible;
  opacity: 1;
  animation: none;
}

/* meta information of image */
.md-image > .md-meta {
  border: 0px;
  padding: 2px 0px 0px 4px;
  font-size: 0.9em;
  color: var(--text-color1);
}

/* input */
input {
  background-color: var(--input-color) !important;
  border: 0px !important;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* input hover */
/* input:hover {
    background-color: var(--hover-bg-color2) !important;
} */
/* checkbox */
input[type="checkbox"]:before {
  content: "";
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
  text-align: center;
  border: 0px;
  border-radius: 3px;
  background-color: var(--input-color);
  margin-top: -0.5rem;
  margin-left: -0.1rem;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* checkbox hover */
input[type="checkbox"]:not([disabled]):not(:checked):hover:before {
  content: "\2713";
  font-size: 0.9rem;
  line-height: 1.2rem;
  color: var(--text-color3);
}

/* checkbox checked*/
input[type="checkbox"]:checked:before {
  content: "\2713";
  font-size: 0.9rem;
  line-height: 1.2rem;
  color: var(--text-color2);
}

/* checkbox checked hover*/
input[type="checkbox"]:checked:hover:before {
  content: "\2713";
  font-size: 0.9rem;
  line-height: 1.2rem;
  color: var(--hover-text-color);
}

/* radio */
input[type="radio"]:before {
  content: "";
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
  text-align: center;
  border: 0px;
  border-radius: 0.55rem;
  background-color: var(--input-color);
  margin-top: -0.4rem;
  margin-left: -0.1rem;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* radio hover */
input[type="radio"]:not([disabled]):not(:checked):hover:before {
  content: "\25CF";
  font-size: 1rem;
  line-height: 1rem;
  color: var(--text-color3);
}

/* radio checked */
input[type="radio"]:checked:before {
  content: "\25CF";
  font-size: 1rem;
  line-height: 1rem;
  color: var(--text-color2);
}

/* radio checked hover*/
input[type="radio"]:checked:before {
  content: "\25CF";
  font-size: 1rem;
  line-height: 1rem;
  color: var(--hover-text-color);
}

/* default focus style */
:focus {
  outline-color: var(--focus-color);
}

/* exit source view button */
.typora-sourceview-on #toggle-sourceview-btn {
  background-color: var(--bg-color2);
}

.typora-sourceview-on #toggle-sourceview-btn:hover {
  background-color: var(--hover-bg-color1);
}

/* shadow for image item*/
.md-image img {
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* toc */
.md-toc {
  background-color: var(--bg-color3);
  border-radius: 6px;
  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
  border: 0px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* toc content */
.md-toc-content {
  padding-top: 5px;
  padding-bottom: 8px;
  margin-top: 15px;
  margin-bottom: 0px;
}

/* remove outline when toc is selected */
.md-toc:focus .md-toc-content {
  border: 0px;
  margin: 0px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* toc item */
.md-toc-item {
  margin: 2px;
}

/* toc edit panel */
#write div.md-toc-tooltip {
  border: 0px;
  padding-left: 10px;
  padding-right: 10px;
  background-color: var(--bg-color3);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  opacity: 0;
  visibility: hidden;
  display: block !important;
  transition: 0.3s;
}

#write .md-toc:focus div.md-toc-tooltip {
  visibility: visible;
  opacity: 1;
}

#write .md-toc:focus {
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

/* toc delete button */
.md-delete-toc {
  background-color: transparent;
}

/* html block */
.md-htmlblock:hover .md-htmlblock-container {
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border-top-right-radius: 0px;
}

/* search panel */
#md-searchpanel {
  background-color: var(--bg-color2);
  color: var(--text-color2);
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
}

/* ignore case button and find whole word button */
.searchpanel-search-option-btn {
  border: 0px;
}

/* button on search panel */
#md-searchpanel .btn:hover {
  color: var(--hover-text-color);
  background-color: var(--hover-bg-color1) !important;
}

/* remove shadow around input in search panel*/
#md-searchpanel input {
  box-shadow: none;
}

/* search option button hover */
.searchpanel-search-option-btn:not(.active):hover {
  color: var(--hover-text-color);
  background-color: var(--hover-bg-color1);
}

/* close button in search panel */
#md-searchpanel .input-group-addon.close-btn {
  padding-left: 16px;
  padding-right: 16px;
}

/* replaceall button */
.ty-replace-panel-row #search-panel-replaceall-btn {
  padding-left: 8px;
  padding-right: 6px !important;
}

/* replace button */
.ty-replace-panel-row #search-panel-replace-btn {
  padding-left: 16px;
  padding-right: 16px;
}

/* sidebar */
.sidebar-menu {
  color: var(--text-color2);
}

/* sidebar shadow */
#typora-sidebar,
.typora-node #typora-sidebar {
  box-shadow: 3px 0px 10px rgba(0, 0, 0, 0.5);
}

/* divider between file item and search */
.ty-sidebar-search-panel {
  border-color: var(--menu-divider-color);
}

/* file item in sidebar */
#file-library .file-list-item {
  border-bottom: 0px;
  opacity: 1;
  border-left: 4px solid;
  border-color: var(--bg-color2);
}

/* file item hover */
#file-library .file-list-item:hover {
  background-color: var(--hover-bg-color1);
  color: var(--hover-text-color);
  border-color: var(--hover-bg-color1);
}

/* file item active */
#file-library .file-list-item.active {
  background-color: var(--hover-bg-color1);
  color: var(--hover-text-color);
  border-color: var(--hover-text-color);
}

/* suffix of file item*/
.file-list-item-file-ext-part {
  opacity: 0.8;
}

/* sidebar file menu */
#sidebar-files-menu {
  border: 0px;
  box-shadow: -2px -2px 10px rgba(0, 0, 0, 0.5);
}

/* sidebar file menu item */
.dropdown-menu > li > a {
  color: var(--text-color2);
}

.dropdown-menu > li > a:hover {
  color: var(--hover-text-color);
}

/* sidebar file menu close button */
#close-sidebar-menu-btn:hover {
  color: var(--hover-text-color);
}

/* sidebar file nemu divider */
#sidebar-files-menu > .show + .menuitem-group-label.show {
  border-color: var(--menu-divider-color);
}

/* sidebar osx tab */
.html-for-mac .sidebar-osx-tab > .sidebar-tabs {
  border: 0px;
  box-shadow: 0 4px 10px -5px rgba(0, 0, 0, 0.5);
}

.html-for-mac .sidebar-content {
  z-index: -1; /* so that the background doesn't overlap with the shadow */
}

/* sidebar footer */
.sidebar-footer {
  border: 0px;
  box-shadow: 0 -4px 10px -5px rgba(0, 0, 0, 0.5);
}

/* remove outline when file item in treeview is selected*/
.file-library-node:not(.file-node-root):focus > .file-node-content {
  outline: none;
}

/* sort button on sidebar file menu */
.ty-side-sort-btn.active,
.ty-side-sort-btn:hover {
  color: var(--hover-text-color);
}

/* setting */
/* header in setting */
.window-header {
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5) !important;
}

/* sidebar in setting */
.sidebar {
  background-color: var(--bg-color2) !important;
  box-shadow: 3px 0px 10px rgba(0, 0, 0, 0.5);
}

.list-group-content {
  margin-left: 10px !important;
}

/* sidebar button in setting menu */
.nav-group-item {
  color: var(--text-color2) !important;
  border-top-left-radius: 6px !important;
  border-bottom-left-radius: 6px !important;
  border-top-right-radius: 0px !important;
  border-bottom-right-radius: 0px !important;
}

/* sidebar button hover in setting menu */
.nav-group-item:hover,
.nav-group-item:active,
.nav-group-item.active {
  background-color: var(--hover-bg-color1) !important;
  color: var(--hover-text-color) !important;
}

/* remove up and down button from number type input*/
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
}

/* the indent example in setting.editor */
div.pane
  > div:nth-child(4)
  > div:nth-child(2)
  .label-input-group
  td:last-child
  div {
  border: 0px !important;
  border-radius: 6px;
  background-color: var(--bg-color5);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  margin: 10px !important;
}

/* button in setting menu */
.ty-preferences button.btn-default {
  border: 0px;
  background-color: var(--bg-color5);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

/* button hover in setting menu */
.ty-preferences .btn-default:not([disabled]):hover {
  background-color: var(--hover-bg-color1) !important;
}

/* return button in setting menu */
.window-header button:hover {
  color: var(--text-color2) !important;
}

/* search input in setting menu */
.search-input {
  border-top-left-radius: 6px !important;
  border-bottom-left-radius: 6px !important;
  border-top-right-radius: 0px !important;
  border-bottom-right-radius: 0px !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  margin-left: 10px !important;
}

.search-input:focus {
  border: none !important;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2) !important;
}

/* select item (mostly in setting menu) */
select {
  border: 0px;
  border-radius: 6px;
  background-color: var(--input-color) !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* enabled select item hover */
select:not([disabled]):hover {
  color: var(--text-color2);
  opacity: 1;
}

/* disabled select item hover */
select[disabled]:hover {
  opacity: 0.5;
}

/* mega menu */
.megamenu-content,
.megamenu-opened header {
  background: var(--bg-color1);
}

.megamenu-content {
  display: block;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
}

.megamenu-opened .megamenu-content {
  visibility: visible;
  opacity: 1;
  animation: none;
}

/* mega menu sidebar*/
.megamenu-menu {
  background-color: var(--bg-color2);
  box-shadow: 3px 0px 10px rgba(0, 0, 0, 0.5);
}

/* return button in mega menu */
#megamenu-menu-sidebar .menu-style-btn {
  border: 0px; 
}

/* remove divider in mega menu */
.megamenu-menu-header {
  border-color: var(--menu-divider-color);
}

/* return button color in mega menu */
.megamenu-menu-header #megamenu-menu-header-title {
  color: var(--text-color2);
}

/* return button hover in mega menu */
.megamenu-menu-header:hover {
  background-color: var(--hover-bg-color1);
}

/* return button hover in mega menu */
.megamenu-menu-header:hover #megamenu-menu-header-title {
  color: var(--hover-text-color);
}

/* long button in mega menu */
.long-btn {
  border: 0px;
  background-color: var(--bg-color5);
  color: var(--text-color1);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
  margin-left: 10px;
}

/* recent file in mega menu */
#recent-file-panel {
  padding: 10px;
}

#recent-document-table {
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

#recent-file-panel-action-btn {
  background: var(--bg-color5);
  border: 0px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

#recent-file-panel thead tr {
  background-color: var(--table-thead-color);
}

#recent-file-panel tbody tr:nth-child(2n) {
  background-color: var(--table-bg-darker-color);
}

#recent-file-panel tbody tr:nth-child(2n + 1) {
  background-color: var(--table-bg-color);
}

#recent-file-panel-action-btn:hover {
  background-color: var(--hover-bg-color1);
  color: var(--text-color2);
}

/* theme preview */
.theme-preview-div {
  box-shadow: 10px 0px 10px rgba(0, 0, 0, 0.8);
}

/* theme preview hover */
.theme-preview-div:hover {
  border-color: var(--theme-select-color);
}

/* context menu and spell check panel */


/* TODO: */
.megamenu-menu-list li a {
  line-height: 44px;
  height: 44px;
  padding-left: 32px;
  color: inherit;
  text-decoration: none;
  font-size: 22px;
}


.dropdown-menu:not(.megamenu-menu-list) {
  background-color: var(--bg-color2);
  color: var(--text-color2);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

/* divider in context menu and spell check panel */
.dropdown-menu .divider {
  border-color: var(--menu-divider-color);
}

/* remove divider outline */
.dropdown-menu {
  border: 0px;
}

/* footer */
footer.ty-footer {
  border-top: 0px !important;
  background-color: var(--bg-color2) !important;
  /*     color: var(--text-color2); */
  box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.5);
}

/* footer item */
.footer-item,
#outline-btn,
#footer-word-count {
  color: var(--text-color2);
  opacity: 1;
}

/* footer item hover */
.footer-item:hover,
#outline-btn:hover {
  background-color: var(--hover-bg-color1);
  color: var(--hover-text-color);
}

/* button on some panel */
.btn {
  border: 0px;
  outline-width: 0px !important;
}

.btn:hover {
  background-color: var(--hover-bg-color1);
  color: var(--hover-text-color);
}

/* traffic button hover */
#top-titlebar .toolbar-icon.btn:hover {
  color: var(--text-color1);
  background-color: #434c5e;
}

/* traffic button hover */
#top-titlebar #w-close:hover {
  background-color: #bf616a !important;
}

/* adjust maxmize restore button height */
.typora-maxmized #w-restore {
  height: 24px;
}

/* left upper button hover */
.ty-menu-btn-area:hover .ty-menu-btn-area-sub {
  color: var(--text-color2) !important;
}

/* scrollbar */
::-webkit-scrollbar {
  width: 8px;
  padding-right: 10px;
  background-color: rgba(0, 0, 0, 0);
}

/* scrollbar track */
::-webkit-scrollbar-track:hover {
  background-color: #4c566a !important;
  border-radius: 4px;
}

/* scrollbar thumb */
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:active {
  background-color: #5e81ac !important;
  border-radius: 4px;
}

/* tip when hover on a button */
#ty-tooltip {
  background-color: var(--bg-color4);
  color: var(--text-color4);
}

/* item container hover in context menu */
.menu-item-container:hover {
  background-color: var(--bg-color2);
}

/* item in context menu */
.menu-item-container .menu-style-btn {
  border-color: var(--menu-divider-color);
}

/* mathjax edit panel*/
.md-rawblock-before {
  border-top-left-radius: 6px;
}

.md-rawblock-after {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* mathjax focus */
.MathJax_SVG:focus {
  outline: none;
  background-color: transparent;
}

/* notification panel */
#md-notification {
  background-color: #5e81ac !important;
  color: var(--text-color2);
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
}

#ty-surpress-mode-warning-close-btn {
  float: unset !important;
  margin: 0px !important;
}

.unibody-window #md-notification p {
  bottom: -4px !important;
}

/* inline codeblock */
code {
  font-family: var(--monospace);
  font-size: 0.9rem;
  background-color: var(--bg-color5);
  border-radius: 6px;
  padding: 4px 4px 4px 4px;
  margin: 0px 6px 0px 6px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

/* codeblock */
.md-fences,
.md-fences:active {
  background-color: var(--bg-color5);
  border-radius: 6px;
  padding: 8px 4px 8px 4px !important;
  margin-top: 15px;
  margin-bottom: 15px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.md-fences .code-tooltip {
  display: block !important;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
  background-color: var(--bg-color5);
}

.md-fences.md-focus .code-tooltip {
  opacity: 1;
  visibility: visible;
}

.CodeMirror-lines {
  padding-left: 4px;
}

/* selected text and cursor */
.CodeMirror-selected,
.CodeMirror-selectedtext {
  background: var(--code-select-bg-color) !important;
}

.CodeMirror div.CodeMirror-cursor {
  border-left: 2px solid var(--code-cursor-color);
  z-index: 3;
}

.CodeMirror.cm-s-typora-default div.CodeMirror-cursor {
  border-left: 3px solid var(--code-cursor-color);
}

/* highlight */
.cm-s-inner .cm-property {
  color: var(--code-blue-color) !important;
}

.cm-s-inner .cm-operator {
  color: var(--code-cyan-color) !important;
}

.cm-s-inner .cm-keyword {
  color: var(--code-purple-color) !important;
}

.cm-s-inner .cm-tag {
  color: var(--code-red-color) !important;
}

.cm-s-inner .cm-attribute {
  color: var(--code-orange-color) !important;
}

.cm-s-inner .cm-string {
  color: var(--code-green-color) !important;
}

.cm-s-inner .cm-comment,
.cm-s-inner.cm-comment {
  /*     color: var(--code-orange-color) !important; */
  color: var(--code-grey-color) !important;
  font-style: italic;
}

.cm-s-inner .cm-header,
.cm-s-inner .cm-def,
.cm-s-inner.cm-header,
.cm-s-inner.cm-def {
  /*     color: var(--code-red-color) !important; */
  color: var(--code-blue-color) !important;
}

.cm-s-inner .cm-meta,
.cm-s-inner .cm-qualifier {
  color: var(--code-red-color) !important;
}

.cm-s-inner .cm-builtin {
  /*     color: var(--code-blue-color) !important; */
  color: var(--code-cyan-color) !important;
}

.cm-s-inner .cm-bracket {
  color: var(--text-color1) !important;
}

.cm-s-inner .cm-number {
  color: var(--code-orange-color) !important;
}

.cm-s-inner .cm-variable {
  color: var(--text-color1) !important;
}

.cm-s-inner .cm-variable-2 {
  /*     color: var(--code-blue-color) !important; */
  color: var(--code-yellow-color) !important;
}

.cm-s-typora-default .cm-header,
.cm-s-typora-default .cm-property {
  color: var(--code-red-color) !important;
}

.cm-s-typora-default .cm-string {
  /*     color: var(--code-blue-color); */
  color: var(--code-purple-color);
}

.cm-s-typora-default .cm-atom {
  color: var(--code-grey-color);
  font-style: italic;
}

.cm-s-typora-default .cm-number {
  color: var(--code-orange-color);
  font-style: normal !important;
}

.cm-s-typora-default .cm-link {
  color: var(--code-blue-color);
}

.cm-s-typora-default .CodeMirror-activeline-background {
  background: var(--hover-bg-color1);
}

.cm-s-typora-default .cm-comment,
.cm-s-typora-default .cm-code {
  color: var(--code-purple-color);
}

.cm-s-typora-default .cm-tag {
  /*     color: var(--code-red-color); */
  color: var(--code-blue-color);
}

.cm-s-typora-default .cm-strong,
.cm-s-typora-default .cm-em,
.cm-s-typora-default .cm-del {
  /*     color: var(--code-green-color); */
  color: var(--code-orange-color);
}

.cm-s-typora-default .cm-block-start.cm-variable-2 {
  /*     color: var(--code-orange-color); */
  color: var(--code-red-color);
}

.cm-formatting-task .cm-formatting-task {
  color: var(--code-red-color);
}

/* math formula tag */
.cm-s-inner .cm-atom,
.cm-s-inner.cm-atom {
  color: var(--code-blue-color);
}

/* inline codeblock in source mode */
.cm-s-typora-default .cm-comment {
  color: var(--code-green-color);
}

/* horizontal divider when language is markdown */
.cm-s-inner .cm-hr {
  color: var(--text-color1);
}

/* variable type when language is c/cpp */
.cm-s-inner .cm-variable-3 {
  color: var(--code-purple-color);
}

/* unknown highlight keyword */
.cm-s-inner .cm-quote,
.cm-s-inner.cm-quote {
  color: var(--code-green-color);
}

.cm-s-inner .cm-link {
  color: var(--code-blue-color);
}

.cm-s-inner .cm-negative {
  color: var(--code-purple-color);
}

.cm-s-inner .cm-positive {
  color: var(--code-green-color);
}

.cm-s-inner .cm-string-2 {
  color: var(--code-red-color);
}

.CodeMirror-gutters {
  border-right: none;
}



/* --------------------------------------------- */

/* FOCUS MODE */

.on-focus-mode #write img, .on-focus-mode #write svg {
  opacity: 0.8;
}

/* FOCUS MODE END */


/* -------------------------------------------- */

/* focus mode */
.on-focus-mode .md-end-block:not(.md-focus) .md-toc-item {
  opacity: 0.5;
}

.on-focus-mode #write h1:not(.md-focus):before {
  opacity: 0.5;
}

.on-focus-mode #write h2:not(.md-focus):before {
  opacity: 0.5;
}

.on-focus-mode #write h1:not(.md-focus) {
  border-color: var(--text-color5);
}

.on-focus-mode #write h2:not(.md-focus) {
  border-color: var(--text-color5);
}

.on-focus-mode #write h3:not(.md-focus) {
  border-color: var(--text-color5);
}

/* default pre is set similar to code (gwyneth 20201123) */
pre {
  font-family: var(--monospace);
  font-size: 0.9rem;
  background-color: var(--bg-color5);
}

/* YAML block */
pre.md-meta-block,
pre.md-meta-block:active {
  background-color: var(--bg-color5);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 10px;
  padding-left: 20px;
  padding-right: 20px;
}

/* switch between different mode */
#typora-source {
  display: block !important;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
}

.typora-sourceview-on #typora-source {
  visibility: visible;
  opacity: 1;
}

#typora-source .CodeMirror-lines {
  max-width: 1200px;
  padding-left: 70px;
  padding-right: 70px;
}

#write {
  display: block !important;
  visibility: visible;
  opacity: 1;
  transition: 0.3s;
  max-width: 1200px;
  padding-left: 70px;
  padding-right: 70px;
}

.typora-sourceview-on #write {
  visibility: hidden;
  opacity: 0;
}

/* #md-searchpanel {
    visibility: hidden;
    opacity: 0;
    transition: 0.3s !important;
}

.on-search-panel-open #md-searchpanel {
    visibility: visible;
    opacity: 1;
} */

.uni-preference-panel {
  display: block;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
}

.show-preference-panel .uni-preference-panel {
  visibility: visible;
  opacity: 1;
}

/* quick open menu */
.typora-quick-open-item:hover {
  background-color: var(--hover-bg-color1);
  color: var(--hover-text-color);
}

/* insert table panel */
.modal-content {
  border: 0px;
  border-radius: 6px;
}

.modal-content .btn-primary {
  background-color: var(--hover-bg-color1);
  color: var(--text-color1);
  outline-width: 0px;
}

.modal-content .btn-primary:hover {
  color: var(--hover-text-color);
}

.modal-content .form-control,
.modal-content .form-control:focus {
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.modal-backdrop {
  background-color: black;
  opacity: 0.3 !important;
}

/* zoom  */
#zoom-hint #zoom-hint-reset {
  color: var(--text-color1);
}

#zoom-hint .zoom-hint-button:hover {
  color: var(--hover-text-color) !important;
}

/* word count */
#footer-word-count-info {
  display: block;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
}

.ty-show-word-count #footer-word-count-info {
  visibility: visible;
  opacity: 1;
}

/* spell check */
#spell-check-panel {
  display: block;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
}

.ty-show-spell-check #spell-check-panel {
  visibility: visible;
  opacity: 1;
}

/* search result */
.md-search-select {
  border: 2px solid rgb(69, 125, 255);
  box-sizing: content-box;
  color: var(--text-color1) !important;
}

.md-search-hit {
  background-color: var(--search-select-bg-color);
}

/* search panel message */
#searchpanel-msg {
  background-color: var(--bg-color2);
  color: var(--text-color2);
}

.searchpanel-msg-btn:hover {
  background-color: var(--hover-bg-color1);
  color: var(--hover-text-color);
}

/* language selection for codeblock */
.auto-suggest-container {
  border: 0px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color2);
}

/* sidebar outline item hover and active */
.outline-item:hover {
  color: var(--hover-text-color);
}

.outline-label:hover {
  text-decoration: none;
}

.pin-outline .outline-active {
  color: var(--hover-text-color);
}

/* sidebar title hover */
.info-panel-tab:hover {
  color: var(--hover-text-color) !important;
}

/* active file in sidebar file menu treeview */
.file-tree-node.active > .file-node-background {
  background-color: var(--hover-bg-color1);
}

/* hover file in sidebar file menu treeview */
.file-node-content:hover {
  cursor: pointer;
}

/* saved button in megamenu */
#m-saved:hover {
  background-color: var(--bg-color2);
  color: var(--text-color2);
  cursor: default;
}

/* mermaid sequence*/
text.actor {
  fill: var(--text-color1);
}

.labelText {
  fill: var(--text-color1);
}

.loopText {
  fill: var(--text-color1);
}

/* mermaid flowchart */
.node rect,
.node circle,
.node ellipse,
.node polygon {
  fill: var(--bg-color2);
  stroke: var(--text-color1);
  stroke: var(--menu-divider-color);
}

.edgePath .path {
  stroke: var(--menu-divider-color);
}

.label {
  color: var(--text-color1);
}

/* mermaid gantt */
.titleText {
  fill: var(--text-color1);
}

.section0,
.section2 {
  fill: var(--table-thread-color);
}

.section1,
.section3 {
  fill: var(--table-bg-color);
}

.task0,
.task1,
.task2,
.task3 {
  fill: rgb(80, 84, 90);
  stroke: rgb(80, 84, 90);
}

.taskText0,
.taskText1,
.taskText2,
.taskText3 {
  fill: var(--text-color2) !important;
}

.active0,
.active1,
.active2,
.active3 {
  fill: rgb(100, 104, 110);
  stroke: rgb(100, 104, 110);
}

.activeText0,
.activeText1,
.activeText2,
.activeText3 {
  fill: var(--text-color2) !important;
}

.done0,
.done1,
.done2,
.done3 {
  fill: rgb(48, 51, 58);
  stroke: rgb(48, 51, 58);
}

.crit0,
.crit1,
.crit2,
.crit3 {
  fill: rgb(150, 150, 150);
  stroke: var(--text-color1);
}

.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
  fill: rgb(100, 104, 110);
  stroke: var(--text-color1);
}

.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
  fill: rgb(48, 51, 58);
  stroke: var(--text-color1);
}

.taskTextOutside0,
.taskTextOutside2,
.taskTextOutside1,
.taskTextOutside3 {
  fill: var(--text-color1) !important;
}

.grid text {
  fill: white;
}

.today {
  stroke: var(--text-color1);
}

/* flow diagram */
.md-fences[lang="flow"] .md-diagram-panel-preview rect {
  fill: var(--bg-color2);
  stroke: var(--menu-divider-color);
  stroke-width: 1.2;
}

.md-fences[lang="flow"] .md-diagram-panel-preview path {
  stroke: var(--menu-divider-color);
  stroke-width: 1.2;
}

.md-fences[lang="flow"] #cond {
  fill: var(--bg-color2);
}

/* sequence diagram */
.md-fences[lang="sequence"] .md-diagram-panel-preview rect:not([fill="none"]) {
  fill: var(--bg-color2);
  stroke: var(--menu-divider-color);
  stroke-width: 1.2;
}

.md-fences[lang="sequence"] .md-diagram-panel-preview path {
  fill: var(--menu-divider-color);
  stroke: var(--menu-divider-color);
  stroke-width: 1.2;
}

.md-fences[lang="sequence"] text,
.md-fences[lang="flow"] text {
  font-family: var(--monospace) !important;
}

/* remove box shadow when not edit graph */
.md-fences[lang="sequence"]:not(.md-focus),
.md-fences[lang="mermaid"]:not(.md-focus),
.md-fences[lang="flow"]:not(.md-focus) {
  box-shadow: none;
}

/* remove border when edit graph */
.md-diagram-panel {
  border: none !important;
}
