/* General markdown styling */

/* Import the fonts */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;700&family=Work+Sans:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

.gradient-border {
  position: relative;
  border-radius: 20px;
  padding: 16px;
  z-index: 1;
}

.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 5px; /* Thickness of the gradient border */
  border-radius: inherit;
  background: linear-gradient(180deg, #f17134 0%, #13ffbe 55.23%, #64499e 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

/* Additional styles for other elements remain unchanged */

.markdown-body {
  color: rgb(51, 50, 55) !important;
  background-color: transparent !important;
  font-size: 15px;
  line-height: 1.5;
  font-family: "Roboto", sans-serif !important;
  min-height: auto !important;
  overflow-x: hidden !important;
  word-wrap: break-word;
  word-break: break-word;
}

.markdown-body p {
  font-weight: 400 !important;
  font-size: 1rem;
  margin-bottom: 1rem; /* Add space below paragraph */
}

.markdown-body.reasoned-content think {
  font-weight: 400 !important;
  font-size: 0.75rem !important;
  margin-bottom: 1rem !important; /* Add space below paragraph */
  color: rgb(51, 50, 55, 0.7) !important;
}

.markdown-body.reasoned-content p {
  font-weight: 400 !important;
  font-size: 0.75rem !important;
  margin-bottom: 1rem !important; /* Add space below paragraph */
  color: rgb(51, 50, 55, 0.7) !important;
}

/* Paragraphs and text */

.markdown-body ul,
.markdown-body ol {
  margin: 0;
  padding-bottom: 1rem;
  line-height: 1.6 !important;
}

/* Headings */
.markdown-body h1 {
  font-size: 1.4rem;
  font-weight: bold !important;
  margin-bottom: 1rem;
}

.markdown-body strong {
  font-weight: 600 !important;
  color: #333333;
  font-size: 1rem;
}

.dark .markdown-body strong {
  color: #f5f5f5;
}

.markdown-body h2 {
  font-size: 1.4rem !important;
  font-weight: bold !important;
  margin-bottom: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: #706f6f 0.7px solid;
}

.markdown-body h1 strong,
.markdown-body h2 strong,
.markdown-body h3 strong,
.markdown-body h4 strong,
.markdown-body h5 strong,
.markdown-body h6 strong {
  font-size: 1.4rem !important;
  font-weight: bold !important;
  margin-bottom: 0.75rem;
  padding-bottom: 1rem;
}

.markdown-body ol li strong {
  font-weight: 600;
  font-size: 1.1rem;
}

.markdown-body ul li strong {
  font-weight: 600 !important;
  font-size: 1.1rem;
}

.markdown-body strong {
  font-weight: 600;
  font-size: 1.1rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-weight: bold !important;
  font-family: "Roboto", sans-serif !important; /* Header font */
  line-height: 1.35 !important;
}

.markdown-body.edit-preview {
  padding: 10px;
  font-size: 14px;
}

.markdown-body h3 {
  font-size: 1.3rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}

.markdown-body h4 {
  font-size: 1.2rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}

.markdown-body h5 {
  font-size: 1rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}

.markdown-body h6 {
  font-size: 0.9rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}
/* Ordered lists */
.markdown-body ol {
  counter-reset: item;
  padding-left: 1.5rem !important;
  margin-bottom: 1rem !important;
  list-style: none; /* Disable default numbering */
}

.markdown-body ol > li {
  counter-increment: item;
  position: relative;
  padding-left: 1.5rem;
}

.markdown-body ol > li::before {
  content: counter(item) ". ";
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Nested ordered lists */
.markdown-body ol ol {
  counter-reset: subitem;
  padding-left: 2rem !important;
}

.markdown-body ol ol > li {
  counter-increment: subitem;
  position: relative;
  padding-left: 1.5rem;
}

.markdown-body ol ol > li::before {
  content: counter(item) "." counter(subitem) " ";
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Unordered lists */
.markdown-body ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-bottom: 1rem !important;
}

/* Consistent spacing */
.markdown-body ol li,
.markdown-body ul li {
  margin-bottom: 0.5rem !important;
}

/* Bold List Header */

.markdown-body .math-inline {
  font-family: "Work Sans", sans-serif;
  background-color: #f9f9f9;
  color: #333;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.95rem;
  display: inline-block;
}

.dark .markdown-body .math-inline {
  background-color: #444;
  color: #f3f3f3;
}

.markdown-body .math-block {
  font-family: "Work Sans", sans-serif !important;
  background-color: #f5f5f5;
  color: #333;
  padding: 1rem;
  border-radius: 4px;
  font-size: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.dark .markdown-body .math-block {
  background-color: #333;
  color: #f3f3f3;
}

.markdown-body code {
  font-family: "Courier New", monospace !important; /* Monospace font for code */
  background-color: #dcdbdb; /* Inline code background */
  color: #303030; /* Highlighted inline code text */
  padding: 2px 6px;
  border-radius: 4px;
  overflow-x: hidden !important;
  word-wrap: break-word;
  word-break: break-word;
}

/* Apply black background within .markdown-body for elements with node="[object Object]" */
pre > div[node="[object Object]"] {
  background-color: #000000 !important; /* Black background */
  color: #ffffff; /* White text for contrast */
  padding: 1rem; /* Optional padding */
  border-radius: 6px; /* Optional rounded corners */
  font-family: "Source Code Pro", monospace; /* Optional font for code */
  overflow-x: auto; /* Preserve horizontal scrolling */
}

/* General Code Block Styling */
.markdown-body pre {
  background-color: #000000 !important; /* Dark background for contrast */
  color: #e8ecef !important; /* Light text */
  padding: 1rem;
  font-size: 0.95rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: "Source Code Pro", monospace;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #c0c4c8; /* Subtle border */
  margin-bottom: 16px;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 800px;
  margin-top: 10px;
}

/* Tablet screens (768px - 1024px) */
@media (max-width: 1024px) {
  .markdown-body pre {
    font-size: 0.9rem; /* Adjusted for better readability */
    padding: 0.9rem;
    max-width: 90vw; /* Uses more screen space */
  }
}

/* Mobile screens (below 768px) */
@media (max-width: 768px) {
  .markdown-body pre {
    font-size: 0.85rem; /* Slightly smaller font */
    padding: 0.8rem;
    max-width: 75vw; /* Full width on smaller screens */
    white-space: pre-wrap; /* Wraps text naturally */
    word-wrap: break-word;
    overflow-x: auto; /* Prevents horizontal scroll */
  }
}

.custom-disabled-textarea {
  border: none !important;
  cursor: default !important;
  min-height: -moz-max-content !important;
  min-height: max-content !important;
  max-width: 70vw !important; /* Ensure it never exceeds this */
  overflow: hidden !important;
  font-size: 15px;
  font-family: "Roboto", sans-serif;
  font-weight: 400;

  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.dark.custom-disabled-textarea {
  border: none !important;
  cursor: default !important;
  min-height: -moz-max-content !important;
  min-height: max-content !important;
  max-width: 70vw !important; /* Ensure it never exceeds this */
  overflow: hidden !important;

  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari */
}

.hide-scrollbar {
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

/* Code Inside Pre */
.markdown-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

/* Lighter syntax highlighting */
.markdown-body .code-keyword {
  color: #d7263d; /* Muted red */
  font-weight: bold;
}

.markdown-body .code-string {
  color: #0070f3; /* Deep blue */
}

.markdown-body .code-function {
  color: #4a90e2; /* Softer blue */
}

.markdown-body .code-comment {
  color: #717171; /* Muted gray */
  font-style: italic;
}

.markdown-body .code-number {
  color: #d7263d; /* Muted red */
}

/* Line Number Styling */
.markdown-body pre::before {
  content: attr(data-line-numbers);
  position: absolute;
  left: 0;
  top: 0;
  padding: 1.5rem 0.5rem;
  color: #6b7280; /* Slightly darker gray for line numbers */
  text-align: right;
  font-family: monospace;
  font-size: 0.85rem;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  background-color: transparent !important; /* Same as code block */
}

/* Blockquotes */
.markdown-body blockquote {
  border-left: 4px solid #d0d0d0;
  padding-left: 1rem;
  color: #212121;
  margin: 1rem 0;
}

/* Horizontal Lines */
.markdown-body hr {
  border: none;
  border-top: 2px solid #b5b5b5;
  background-color: transparent;
  margin-bottom: 1.4rem;
}

/* General Table Styling */
.markdown-body table {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 650px !important;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;

  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1024px) {
  .table {
    font-size: 0.9rem;
    max-width: 95vw;
  }
}

/* Tablets and large phones */
@media (max-width: 768px) {
  .table {
    font-size: 0.85rem;
    max-width: 100%;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .table {
    font-size: 0.8rem;
    min-width: 100%;
  }
}

/* Scrollbar styling for overflow */
.markdown-body table::-webkit-scrollbar {
  height: 8px;
}
.markdown-body table::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.markdown-body table::-webkit-scrollbar-track {
  background: transparent;
}

/* Table header styling */
.markdown-body table th {
  background-color: #f9fafb;
  color: #1f2937;
  font-weight: 600;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

/* Table body styling */
.markdown-body table td {
  background-color: #ffffff;
  color: #374151;
  padding: 1rem;
  border-top: 1px solid #f3f4f6;
  vertical-align: top;
}

/* Rounded corners */
.markdown-body table th:first-child {
  border-top-left-radius: 0.5rem;
}
.markdown-body table th:last-child {
  border-top-right-radius: 0.5rem;
}
.markdown-body table tr:last-child td:first-child {
  border-bottom-left-radius: 0.5rem;
}
.markdown-body table tr:last-child td:last-child {
  border-bottom-right-radius: 0.5rem;
}

/* Hover effect */
.markdown-body table tr:hover td {
  background-color: #f1f5f9;
  transition: background-color 0.2s ease;
}

/* Dark Mode Table */

/* Adjustments for edit-preview markdown-body */
.markdown-body.edit-preview {
  padding: 1rem;
  font-size: 14px;
}

/* Resizable Panel */
.md-main {
  height: calc(100vh - 130px);
  overflow: hidden;
}

/* Resize Handle */
.resize-handle {
  width: 0.25rem;
  transition: 250ms linear background-color;
  background-color: #7f8082;
  outline: none;
}

.resize-handle:hover,
.resize-handle[data-resize-handle-active] {
  background-color: #5194eb;
}

/* Link Styling */
.markdown-body a {
  color: #1a73e8; /* Standard link color */
  text-decoration: underline; /* Underline for better visibility */
}

.dark .markdown-body a {
  color: #80bfff; /* Adjusted color for dark markdown-body */
  text-decoration: underline;
}

/* Hover effect for links */
.markdown-body a:hover {
  color: #0047cc; /* Darker shade on hover for light markdown-body */
  text-decoration: none;
}

.dark .markdown-body a:hover {
  color: #99ccff; /* Lighter shade on hover for dark markdown-body */
  text-decoration: none;
}
/* Footnote Styling */
.markdown-body .footnote-ref {
  font-size: 0.8rem;
  vertical-align: super;
  color: #1a73e8; /* Link color for references */
  text-decoration: none;
  cursor: pointer;
}

.markdown-body .footnote-ref:hover {
  text-decoration: underline;
}

.markdown-body .footnotes {
  font-size: 0.85rem;
  color: rgb(51, 50, 55);
  line-height: 1.5;
  margin-top: 2rem;
  border-top: 1px solid #d0d0d0;
  padding-top: 1rem;
}

.dark .markdown-body .footnotes {
  color: rgb(243, 243, 243);
  border-color: #555;
}

/* Individual footnote items */
.markdown-body .footnotes ol {
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.markdown-body .footnotes ol li {
  margin-bottom: 0.75rem;
  color: #555;
}

.dark .markdown-body .footnotes ol li {
  color: #e0e0e0;
}

/* Backlink styling */
.markdown-body .footnote-backref {
  font-size: 0.75rem;
  margin-left: 0.5rem;
  color: #007acc;
  text-decoration: none;
}

.markdown-body .footnote-backref:hover {
  text-decoration: underline;
}

.dark .markdown-body .footnote-backref {
  color: #80bfff;
}

/* General markdown styling */

/* Import the fonts */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;700&family=Work+Sans:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

/* Additional styles for other elements remain unchanged */

.mode {
  color: rgb(255, 255, 255) !important;
  background-color: transparent !important;
  font-size: 15px;
  line-height: 1.5;
  font-family: "Roboto", sans-serif !important;
  min-height: auto !important;
  max-width: 100vw;

  overflow-x: hidden !important;
  word-wrap: break-word;
  word-break: break-word;
}

.mode p {
  font-weight: 400 !important;
  font-size: 1rem;
  margin-bottom: 1rem; /* Add space below paragraph */
}

/* Paragraphs and text */

.mode ul,
.mode ol {
  margin: 0;
  padding-bottom: 1rem;
  line-height: 1.6 !important;
}

/* Headings */
.mode h1 {
  font-size: 1.4rem;
  font-weight: bold !important;
  margin-bottom: 1rem;
}

.mode strong {
  font-weight: 700;
  color: #333333;
  font-size: 1rem;
}

.dark .mode strong {
  color: #f5f5f5;
}

.mode h2 {
  font-size: 1.4rem;
  font-weight: bold !important;
  margin-bottom: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: #dbdbdb 0.7px solid;
}
.mode ol li strong {
  font-weight: 600 !important;
  font-size: 1.1rem;
}

.mode ul li strong {
  font-weight: 600 !important;
  font-size: 1.1rem;
}

.mode strong {
  font-weight: 600 !important;
  font-size: 1.1rem;
}

.mode p strong {
  font-weight: 600;
  font-size: 1.1rem;
}

.mode h1,
.mode h2,
.mode h3,
.mode h4,
.mode h5,
.mode h6 {
  font-family: "Roboto", sans-serif !important; /* Header font */
  line-height: 1.35 !important;
}

.mode h1 strong,
.mode h2 strong,
.mode h3 strong,
.mode h4 strong,
.mode h5 strong,
.mode h6 strong {
  font-size: 1.4rem !important;
  font-weight: bold !important;
  margin-bottom: 0.75rem;
  padding-bottom: 1rem;
}

.mode.edit-preview {
  padding: 10px;
  font-size: 14px;
}

.mode h3 {
  font-size: 1.3rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}

.mode h4 {
  font-size: 1.2rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}

.mode h5 {
  font-size: 1rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}

.mode h6 {
  font-size: 0.9rem;
  font-weight: bold !important;
  margin-bottom: 0.5rem;
}
/* Ordered lists */
.mode ol {
  counter-reset: item;
  padding-left: 1.5rem !important;
  margin-bottom: 1rem !important;
  list-style: none; /* Disable default numbering */
}

.mode ol > li {
  counter-increment: item;
  position: relative;
  padding-left: 1.5rem;
}

.mode ol > li::before {
  content: counter(item) ". ";
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Nested ordered lists */
.mode ol ol {
  counter-reset: subitem;
  padding-left: 2rem !important;
}

.mode ol ol > li {
  counter-increment: subitem;
  position: relative;
  padding-left: 1.5rem;
}

.mode ol ol > li::before {
  content: counter(item) "." counter(subitem) " ";
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Unordered lists */
.mode ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-bottom: 1rem !important;
}

/* Consistent spacing */
.mode ol li,
.mode ul li {
  margin-bottom: 0.5rem !important;
}

/* Bold List Header */

.mode .math-inline {
  font-family: "Work Sans", sans-serif;
  background-color: #f9f9f9;
  color: #333;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.95rem;
  display: inline-block;
}

.dark .mode .math-inline {
  background-color: #444;
  color: #f3f3f3;
}

.mode .math-block {
  font-family: "Work Sans", sans-serif;
  background-color: #f5f5f5;
  color: #333;
  padding: 1rem;
  border-radius: 4px;
  font-size: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.dark .mode .math-block {
  background-color: #333;
  color: #f3f3f3;
}

.mode code {
  font-family: "Courier New", monospace; /* Monospace font for code */
  background-color: #4a4949; /* Inline code background */
  color: #d9d8e1; /* Highlighted inline code text */
  padding: 2px 6px;
  border-radius: 4px;
}

/* Apply black background within .mode for elements with node="[object Object]" */
pre > div[node="[object Object]"] {
  background-color: #01091e !important; /* Black background */
  color: #ffffff; /* White text for contrast */
  padding: 1rem; /* Optional padding */
  border-radius: 6px; /* Optional rounded corners */
  font-family: "Source Code Pro", monospace; /* Optional font for code */
  overflow-x: auto; /* Preserve horizontal scrolling */
}

.mode .code-instruction {
  font-style: italic; /* Makes it italic */
  color: #616161; /* Gray text color */
  margin-top: 8px; /* Add spacing between the code block and instruction */
  font-size: 0.9rem; /* Slightly smaller text */
}

/* Code Block Styling */
.mode pre {
  background-color: #01091e; /* Black background for code blocks */
  color: #ffffff; /* Default text color (white for contrast) */
  padding: 1.5rem;
  font-size: 0.95rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: "Source Code Pro", monospace; /* Code font */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid #000000;
  margin-bottom: 16px;
  overflow-x: hidden !important;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 80vw;
  margin-top: 10px;
}

/* Remove default code block padding for inline code inside pre */
.mode pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

/* Syntax Highlighting for JavaScript */
.mode .code-keyword {
  color: #ff0000; /* Keywords in red */
  font-weight: bold;
}

.mode .code-string {
  color: #0000ff; /* Strings in blue */
}

.mode .code-function {
  color: #0000ff; /* Function names in blue */
}

.mode .code-comment {
  color: #808080; /* Comments in gray */
  font-style: italic;
}

.mode .code-number {
  color: #ff0000; /* Numbers in red */
}

/* Syntax Highlighting for Python */
.mode .python-keyword {
  color: #ff0000; /* Keywords in red */
  font-weight: bold;
}

.mode .python-string {
  color: #0000ff; /* Strings in blue */
}

.mode .python-function {
  color: #0000ff; /* Function names in blue */
}

.mode .python-comment {
  color: #808080; /* Comments in gray */
  font-style: italic;
}

.mode .python-number {
  color: #ff0000; /* Numbers in red */
}

/* Optional Line Numbers for Code Blocks */
.mode pre {
  position: relative;
  padding-left: 3rem; /* Extra padding for line numbers */
}

.mode pre::before {
  content: attr(data-line-numbers); /* Line numbers provided as attribute */
  position: absolute;
  left: 0;
  top: 0;
  padding: 1.5rem 0.5rem;
  color: #7f7f7f; /* Line number color */
  text-align: right;
  font-family: monospace;
  font-size: 0.85rem;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  background-color: #000000;
}
/* Blockquotes */
.mode blockquote {
  border-left: 4px solid #d0d0d0;
  padding-left: 1rem;
  color: #dbdada;
  margin: 1rem 0;
}

/* Horizontal Lines */
.mode hr {
  border: none;
  border-top: 2px solid #b5b5b5;
  background-color: transparent;
  margin-bottom: 1.4rem;
}

/* General Table Styling */
.mode table {
  width: 100%;
  max-width: 90vw !important;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Scrollbar styling for overflow */
.mode table::-webkit-scrollbar {
  height: 8px;
}
.mode table::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.mode table::-webkit-scrollbar-track {
  background: transparent;
}

/* Table header styling */
.mode table {
  width: -moz-fit-content;
  width: fit-content;
  max-width: 650px !important;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;

  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1024px) {
  .table {
    font-size: 0.9rem;
    max-width: 95vw;
  }
}

/* Tablets and large phones */
@media (max-width: 768px) {
  .table {
    font-size: 0.85rem;
    max-width: 100%;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .table {
    font-size: 0.8rem;
    min-width: 100%;
  }
}

/* Table body styling */
.mode table td {
  background-color: #ffffff;
  color: #374151;
  padding: 1rem;
  border-top: 1px solid #f3f4f6;
  vertical-align: top;
}

/* Rounded corners */
.mode table th:first-child {
  border-top-left-radius: 0.5rem;
}
.mode table th:last-child {
  border-top-right-radius: 0.5rem;
}
.mode table tr:last-child td:first-child {
  border-bottom-left-radius: 0.5rem;
}
.mode table tr:last-child td:last-child {
  border-bottom-right-radius: 0.5rem;
}

/* Hover effect */
.mode table tr:hover td {
  background-color: #f1f5f9;
  transition: background-color 0.2s ease;
}

/* Dark Mode Table */
.dark .mode table {
  border: 1px solid #555;
}

/* Adjustments for edit-preview mode */
.mode.edit-preview {
  padding: 1rem;
  font-size: 14px;
}

/* Resizable Panel */
.md-main {
  height: calc(100vh - 130px);
  overflow: hidden;
}

/* Resize Handle */
.resize-handle {
  width: 0.25rem;
  transition: 250ms linear background-color;
  background-color: #7f8082;
  outline: none;
}

.resize-handle:hover,
.resize-handle[data-resize-handle-active] {
  background-color: #5194eb;
}

/* Link Styling */
.mode a {
  color: #1a73e8; /* Standard link color */
  text-decoration: underline; /* Underline for better visibility */
}

.dark .mode a {
  color: #80bfff; /* Adjusted color for dark mode */
  text-decoration: underline;
}

/* Hover effect for links */
.mode a:hover {
  color: #0047cc; /* Darker shade on hover for light mode */
  text-decoration: none;
}

.dark .mode a:hover {
  color: #99ccff; /* Lighter shade on hover for dark mode */
  text-decoration: none;
}
/* Footnote Styling */
.mode .footnote-ref {
  font-size: 0.8rem;
  vertical-align: super;
  color: #1a73e8; /* Link color for references */
  text-decoration: none;
  cursor: pointer;
}

.mode .footnote-ref:hover {
  text-decoration: underline;
}

.mode .footnotes {
  font-size: 0.85rem;
  color: rgb(51, 50, 55);
  line-height: 1.5;
  margin-top: 2rem;
  border-top: 1px solid #d0d0d0;
  padding-top: 1rem;
}

.dark .mode .footnotes {
  color: rgb(243, 243, 243);
  border-color: #555;
}

/* Individual footnote items */
.mode .footnotes ol {
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.mode .footnotes ol li {
  margin-bottom: 0.75rem;
  color: #555;
}

.dark .mode .footnotes ol li {
  color: #e0e0e0;
}

/* Backlink styling */
.mode .footnote-backref {
  font-size: 0.75rem;
  margin-left: 0.5rem;
  color: #007acc;
  text-decoration: none;
}

.mode .footnote-backref:hover {
  text-decoration: underline;
}

.dark .mode .footnote-backref {
  color: #80bfff;
}

.dark.mode h1,
.dark.mode h2,
.dark.mode h3,
.dark.mode h4,
.dark.mode h5,
.dark.mode h6,
.dark.mode p,
.dark.mode li,
.dark.mode strong,
.dark.mode ul,
.dark.mode em,
.dark.mode span,
.dark.mode div,
.dark.mode blockquote,
.dark.mode pre {
  color: white;
}

