/* ==========================================================================
   W3Seekers Complete Consolidated Master Stylesheet (style.css)
   Combines lib/index.css, lib/tagsapp.css, lib/code.css, lib/hilight.css,
   lib/admin.css, and patch_fonts.css into a single unified stylesheet.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,700&family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=JetBrains+Mono:wght@400;500;600;700&family=Fira+Code:wght@400;500;600&display=swap');

/* --- Reset & Global Base Typography --- */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Theme variables */
:root {
  --ad-bg: #F1F5F9;
  --ad-border: #CBD5E1;
  --muted: #64748B;
}

html.dark,
body.dark-theme {
  --ad-bg: #1F1F23;
  --ad-border: #3F3F46;
  --muted: #A1A1AA;
}

/* Ad Container for centering */
.ad-container {
  width: 100%;
  margin: 14px auto;
  display: flex;
  justify-content: center;
}

main > .ad-container:first-child,
main#root > .ad-container:first-child,
main#root > div:first-child {
  margin-top: 0;
  margin-bottom: 10px;
}

main > .ad-container:last-child,
main#root > .ad-container:last-child {
  margin-top: 14px;
  margin-bottom: 0;
}

/* Base Ad Slot */
.ad-slot {
  position: relative; /* Allows the label to be absolutely positioned at the top */
  width: 100%;
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 2px;
  text-align: center;
  box-sizing: border-box; /* Prevents padding from breaking responsive width */
}

/* Top Ad Label */
.ad-slot .ad-label {
  position: absolute;
  top: 4px; /* Locks the label to the top */
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

/* Ad Size Text (Placeholder) */
.ad-slot .ad-size {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 6px; /* Leaves room so the top label doesn't overlap placeholder text */
}

/* Ad Size Variants */
.ad-slot.leaderboard {
  min-height: 70px;
  max-width: 970px;
}

.ad-slot.rectangle {
  min-height: 250px;
  max-width: 336px;
  margin: 0 auto;
}

.ad-slot.header-ad {
  min-height: 50px;
  height: 90px;
  max-width: 728px;
  width: 100%;
  margin: 0 auto;
}

.header-ad-container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 768px) {
  .ad-slot.header-ad {
    height: 60px;
    min-height: 50px;
  }
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: #1e293b !important;
  background-color: #ffffff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Inter', sans-serif !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-top: 0;
  margin-bottom: 0.6em;
}

h1 {
  font-size: 24px !important;
}

p {
  font-size: 16px;
  margin-top: 1em;
  margin-bottom: 1.2em;
  line-height: 1.6;
}

a {
  background-color: transparent;
  color: #5b7d9b;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline !important;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0;
}

img {
  max-width: 100%;
  height: auto;
  border: 1px solid #eeeeee;
  border-radius: 4px;
}

/* --- Layout Utility Classes --- */
.left { float: left !important; }
.right { float: right !important; }
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* --- Header Component --- */
#header {
  background: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  border-bottom: 1px solid #e5e7eb;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 14px;
  box-sizing: border-box;
  user-select: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-main-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  transition: background 0.15s ease;
}

.header-menu-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

#header #menu {
  content: url("/assets/svg/menu.svg");
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0.15);
  transition: filter 0.2s ease;
}

.header-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

.header-badge-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
  transition: transform 0.2s ease;
}

.header-logo-badge:hover .header-badge-img {
  transform: scale(1.05);
}

.header-logo-badge,
.header-badge-img,
.kebab-wrapper,
#kebabBtn,
header#header:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > a:nth-of-type(1),
header#header:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(2) > div:nth-of-type(1) > span#kebabBtn:nth-of-type(1),
header#header:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > a:nth-of-type(1) > img:nth-of-type(1) {
  display: none !important;
}

.header-brand-link {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none !important;
  margin-left: 2px;
  white-space: nowrap;
}

.brand-times {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.4px;
  line-height: 1;
}

.brand-patriot,
header#header:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > a:nth-of-type(1) > span:nth-of-type(2) {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: bold;
  font-style: italic;
  color: #e05349;
  text-transform: capitalize;
  margin-left: 6px;
  line-height: 1;
}

@media (max-width: 520px) {
  .brand-times, .brand-patriot {
    font-size: 20px;
  }
  .header-badge-img {
    width: 34px;
    height: 34px;
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

#header #darkmode {
  content: url("/assets/svg/moon.svg");
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 8px;
  box-sizing: border-box;
  cursor: pointer;
  background: transparent;
  filter: brightness(0.15);
  transition: background-color 0.2s ease, transform 0.15s ease, filter 0.2s ease;
}

#header #darkmode:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.08);
}

#header #search {
  content: url("/assets/svg/search.svg");
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 8px;
  box-sizing: border-box;
  cursor: pointer;
  filter: brightness(0.15);
  transition: filter 0.2s ease;
}

#header #kebabBtn {
  content: url("/assets/svg/more-vertical.svg");
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 8px;
  box-sizing: border-box;
  cursor: pointer;
  filter: brightness(0.15);
  transition: filter 0.2s ease;
}

.kebab-wrapper {
  position: relative;
  display: inline-block;
}

.kebab-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  z-index: 150;
  overflow: hidden;
  padding: 6px 0;
}

.kebab-dropdown-menu.show {
  display: block;
  animation: kebabFadeIn 0.15s ease-out;
}

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

.kebab-item {
  color: #1e293b;
  padding: 10px 16px;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.kebab-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* --- SlideNav / SubNav (Category bar) --- */
.slideNav {
  display: block;
  position: relative;
  height: 44px;
  width: 100%;
  padding: 0;
  margin: 0;
  margin-top: 56px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 90;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.slideNavMenu {
  display: flex;
  align-items: center;
  overflow-x: auto;
  width: 100%;
  height: 44px;
  white-space: nowrap;
  margin: 0;
  padding: 0 12px;
  box-sizing: border-box;
  scrollbar-width: none;
}

.slideNavMenu::-webkit-scrollbar {
  display: none;
}

.slideNavMenu a {
  color: #475569;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  height: 44px;
  line-height: 44px;
  box-sizing: border-box;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
}

.slideNavMenu a:hover {
  color: #e05349;
  background-color: rgba(224, 83, 73, 0.05);
}

.slideNavMenu a.active {
  color: #e05349;
  border-bottom: 3px solid #e05349;
  font-weight: 800;
}

/* --- Side Navigation Drawer --- */
#sidenav {
  width: 280px;
  max-width: 85vw;
  position: fixed;
  height: 100%;
  z-index: 120;
  background: #ffffff;
  color: #1e293b;
  top: 0;
  left: -290px;
  overflow-y: auto;
  transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  box-shadow: rgba(0, 0, 0, 0.15) 4px 0 16px;
  border-right: 1px solid #e2e8f0;
}

#sidennavbg {
  width: 100%;
  height: 100%;
  position: fixed;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 115;
  top: 0;
  display: none;
  left: 0;
}

.sidenav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.sidenav-logo-img,
aside#sidenav:nth-of-type(1) > div:nth-of-type(1) > img:nth-of-type(1) {
  display: none !important;
}

.sidenav-brand-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  line-height: 1.2;
}

.brand-times-nav {
  font-weight: 800;
  color: #111827;
}

.brand-patriot-nav,
aside#sidenav:nth-of-type(1) > div:nth-of-type(1) > div:nth-of-type(1) > span:nth-of-type(2) {
  font-weight: 700;
  font-style: italic;
  color: #e05349;
  text-transform: capitalize;
}

.sidenav-close-btn {
  margin-left: auto;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  text-decoration: none !important;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.sidenavlink {
  overflow-y: auto;
  height: calc(100% - 69px);
  width: 100%;
  background: #ffffff;
  padding-bottom: 24px;
}

.sidenavlink h2 {
  margin: 16px 16px 6px 16px;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b !important;
}

.sidenavlink h2.sidenav-subheading,
.sidenavlink h2:not(:first-of-type) {
  margin: 20px 16px 6px 16px !important;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b !important;
}

.sidenavlink a {
  display: block;
  color: #334155 !important;
  text-decoration: none !important;
  padding: 8px 18px;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidenavlink a:hover {
  background-color: #f1f5f9;
  color: #0f172a !important;
}

.sidenavlink a.active {
  background-color: #e05349 !important;
  color: #ffffff !important;
  font-weight: 600;
}

/* --- Main Page Container & Content Area --- */
.main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 16px 20px 48px 20px;
  min-height: calc(100vh - 200px);
}

.btn-container {
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  text-decoration: none !important;
  background-color: #e05349;
  border-radius: 4px;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: background-color 0.15s ease;
}

.btn:hover {
  background-color: #c93d33;
}

.btn-outline {
  text-decoration: none !important;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #1e293b !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background-color 0.15s ease;
}

.btn-outline:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

/* Callouts & References Boxes */
.exholder {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #e05349;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 20px 0;
}

.exholder p {
  margin: 0 0 10px 0;
}

.exholder p:last-child {
  margin-bottom: 0;
}

.htmlindex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.htmlindex a, .htmlindex-link {
  display: block;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #1e293b !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.htmlindex a:hover, .htmlindex-link:hover {
  background: #e05349;
  color: #ffffff !important;
  border-color: #e05349;
}

/* --- Codebox Component --- */
.codebox {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin: 24px 0;
}

.codebox-header,
.codebox-footer {
  display: none !important;
}

a.try-btn,
article a[href*="editor.html"],
.markdown-body-content a[href*="editor.html"],
main#root article p > a[href*="editor.html"] {
  height: 42px;
  padding: 0 20px;
  color: #ffffff !important;
  font-size: 14px;
  line-height: 42px;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
  background-color: #e05349;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

a.try-btn:hover,
article a[href*="editor.html"]:hover,
.markdown-body-content a[href*="editor.html"]:hover,
main#root article p > a[href*="editor.html"]:hover {
  background-color: #c93d33;
}

/* --- Code & Syntax Highlighting --- */
pre,
pre code,
code[class*="language-"],
pre[class*="language-"],
.codebox pre,
article pre,
main#root pre,
main#root:nth-of-type(1) > article:nth-of-type(1) > div:nth-of-type(1) > pre:nth-of-type(1),
main#root:nth-of-type(1) > article:nth-of-type(1) > div:nth-of-type(2) > pre:nth-of-type(1) {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  word-wrap: break-word !important;
  font-family: 'Fira Code', 'Cascadia Code', 'Source Code Pro', Consolas, 'SF Mono', Menlo, Monaco, monospace !important;
  font-size: 15.5px !important;
  line-height: 1.75 !important;
  letter-spacing: 0.01em !important;
  tab-size: 2 !important;
  color: #1e293b;
  outline: none;
  text-shadow: none !important;
}

code[class*="language-"] *,
pre[class*="language-"] *,
.token {
  text-shadow: none !important;
}

article pre,
main#root pre {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  text-shadow: none !important;
}

.codebox pre,
main#root:nth-of-type(1) > article:nth-of-type(1) > div:nth-of-type(1) > pre:nth-of-type(1),
main#root:nth-of-type(1) > article:nth-of-type(1) > div:nth-of-type(2) > pre:nth-of-type(1) {
  background-color: #ffffff !important;
  border: none !important;
  border-radius: 8px;
  padding: 16px 20px !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

body.dark-theme article pre,
body.dark-theme main#root pre,
body.dark-theme .codebox pre,
body.dark-theme main#root:nth-of-type(1) > article:nth-of-type(1) > div:nth-of-type(1) > pre:nth-of-type(1),
body.dark-theme main#root:nth-of-type(1) > article:nth-of-type(1) > div:nth-of-type(2) > pre:nth-of-type(1) {
  background-color: #141418 !important;
  border-color: #2e2e38 !important;
  color: #e2e8f0 !important;
  text-shadow: none !important;
}

:not(pre) > code[class*="language-"] {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #94424e;
  font-size: 0.9em;
}

/* Syntax Highlighting Colors matching design */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata,
.token.doctype .token.name,
.token.doctype .token.punctuation {
  color: #708090 !important;
  font-style: italic !important;
}

.token.tag,
.token.tag .token.punctuation,
.token.selector,
.token.keyword {
  color: #94424e !important;
}

.token.attr-name {
  color: #966b36 !important;
}

.token.string,
.token.attr-value,
.token.char,
.token.builtin,
.token.attr-value .token.punctuation {
  color: #2e7d8e !important;
}

.token.property,
.language-css .token.property,
.token.function,
.token.method {
  color: #2b79c2 !important;
}

.language-css .token.pseudo-class,
.language-css .token.pseudo-element,
.token.pseudo-class,
.token.pseudo-element {
  color: #3c763d !important;
}

.language-css .token.id,
.language-css .token.selector .token.id,
.token.id {
  color: #4a2373 !important;
}

.token.punctuation,
.token.operator {
  color: #1e293b !important;
}

.token.number,
.token.unit,
.token.boolean,
.token.constant {
  color: #1e293b !important;
}

/* --- Dark Theme Token Overrides --- */
body.dark-theme .token.comment,
body.dark-theme .token.prolog,
body.dark-theme .token.doctype,
body.dark-theme .token.cdata {
  color: #8ba2b5 !important;
}

body.dark-theme .token.tag,
body.dark-theme .token.tag .token.punctuation,
body.dark-theme .token.selector,
body.dark-theme .token.keyword {
  color: #ff7b72 !important;
}

body.dark-theme .token.attr-name {
  color: #d2a8ff !important;
}

body.dark-theme .token.string,
body.dark-theme .token.attr-value,
body.dark-theme .token.char,
body.dark-theme .token.builtin,
body.dark-theme .token.attr-value .token.punctuation {
  color: #7ee787 !important;
}

body.dark-theme .token.property,
body.dark-theme .language-css .token.property,
body.dark-theme .token.function,
body.dark-theme .token.method {
  color: #79c0ff !important;
}

body.dark-theme .language-css .token.pseudo-class,
body.dark-theme .language-css .token.pseudo-element {
  color: #7ee787 !important;
}

body.dark-theme .language-css .token.id,
body.dark-theme .token.id {
  color: #d2a8ff !important;
}

body.dark-theme .token.punctuation,
body.dark-theme .token.operator {
  color: #c9d1d9 !important;
}

body.dark-theme .token.number,
body.dark-theme .token.unit,
body.dark-theme .token.boolean,
body.dark-theme .token.constant {
  color: #ff9e64 !important;
}

/* --- Tables --- */
.overflow,
.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

table,
article table,
main#root article table,
.markdown-body-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
}

table th,
table td,
article table th,
article table td,
main#root article table th,
main#root article table td,
.markdown-body-content table th,
.markdown-body-content table td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
  color: #1e293b;
}

table th,
article table th,
main#root article table th,
.markdown-body-content table th {
  background-color: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}

table tr:nth-child(even),
article table tr:nth-child(even),
main#root article table tr:nth-child(even),
.markdown-body-content table tr:nth-child(even) {
  background-color: #f8fafc;
}

table tr:hover,
article table tr:hover,
main#root article table tr:hover {
  background-color: #f1f5f9;
}

/* --- Footer --- */
#footer {
  background-color: #ffffff;
  border-top: 1px solid #eaeaea;
  padding: 50px 30px 30px 30px;
  clear: both;
}

.footer-new-container {
  max-width: 1020px;
  margin: 0 auto;
}

.footer-top-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-columns {
  display: flex;
  flex-grow: 1;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col h3 {
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111111 !important;
  margin-bottom: 16px !important;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 13.5px !important;
}

.footer-col ul li a {
  color: #555555 !important;
  text-decoration: none !important;
}

.footer-col ul li a:hover {
  color: #e05349 !important;
}

.footer-brand-section {
  max-width: 320px;
}

.footer-brand-logo {
  font-size: 22px;
  font-weight: 800;
  color: #111111;
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: #64748b !important;
  margin-bottom: 16px !important;
}

.footer-divider {
  border: 0;
  border-top: 1px solid #eaeaea;
  margin: 30px 0 20px 0;
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
}

#scrolltoTop {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  background-color: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* --- Dark Theme Overrides --- */
body.dark-theme {
  background-color: #131314 !important;
  color: #cbd5e1 !important;
}

body.dark-theme #header,
body.dark-theme #footer {
  background-color: #131314 !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme #header #menu,
body.dark-theme #header #search,
body.dark-theme #header #kebabBtn {
  filter: invert(1) !important;
}

body.dark-theme #header #darkmode {
  content: url("/assets/svg/sun.svg") !important;
  filter: none !important;
}

body.dark-theme .brand-times {
  color: #ffffff !important;
}

body.dark-theme .slideNav {
  background-color: #131314 !important;
  border-color: #1e293b !important;
}

body.dark-theme .slideNavMenu a {
  color: #cbd5e1 !important;
}

body.dark-theme .slideNavMenu a:hover {
  color: #f87171 !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .slideNavMenu a.active {
  color: #e05349 !important;
  border-bottom: 3px solid #e05349 !important;
}

body.dark-theme #sidenav,
body.dark-theme .sidenavlink {
  background-color: #131314 !important;
  border-color: #1e293b !important;
}

body.dark-theme .sidenav-header {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .brand-times-nav {
  color: #ffffff !important;
}

body.dark-theme .sidenavlink h2 {
  color: #94a3b8 !important;
}

body.dark-theme .sidenavlink h2.sidenav-subheading,
body.dark-theme .sidenavlink h2:not(:first-of-type) {
  border-top-color: #27272a !important;
  color: #94a3b8 !important;
}

body.dark-theme .sidenavlink a {
  color: #cbd5e1 !important;
}

body.dark-theme .sidenavlink a:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

body.dark-theme .main {
  background-color: #131314 !important;
  color: #cbd5e1 !important;
}

body.dark-theme h1, body.dark-theme h2, body.dark-theme h3,
body.dark-theme h4, body.dark-theme h5, body.dark-theme h6 {
  color: #f8fafc !important;
}

body.dark-theme p, body.dark-theme li {
  color: #cbd5e1 !important;
}

body.dark-theme .exholder {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

body.dark-theme .htmlindex a, body.dark-theme .htmlindex-link {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

body.dark-theme .htmlindex a:hover, body.dark-theme .htmlindex-link:hover {
  background-color: #e05349 !important;
  color: #ffffff !important;
}

body.dark-theme .codebox {
  background-color: #141418 !important;
  border-color: #2e2e38 !important;
}

body.dark-theme .codebox-header {
  background-color: #1e1e24 !important;
  border-color: #2e2e38 !important;
}

body.dark-theme .codebox-header h4 {
  color: #f1f5f9 !important;
}

body.dark-theme .codebox pre,
body.dark-theme code[class*="language-"],
body.dark-theme pre[class*="language-"],
body.dark-theme .token {
  background-color: #141418 !important;
  color: #e2e8f0 !important;
  text-shadow: none !important;
}

body.dark-theme .footer-col h3,
body.dark-theme .footer-brand-logo {
  color: #ffffff !important;
}

body.dark-theme .footer-col ul li a,
body.dark-theme .footer-brand-desc {
  color: #94a3b8 !important;
}

body.dark-theme table,
body.dark-theme article table,
body.dark-theme main#root article table,
body.dark-theme .markdown-body-content table {
  background-color: #141418 !important;
  border-color: #334155 !important;
}

body.dark-theme table th,
body.dark-theme article table th,
body.dark-theme main#root article table th,
body.dark-theme .markdown-body-content table th {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body.dark-theme table td,
body.dark-theme article table td,
body.dark-theme main#root article table td,
body.dark-theme .markdown-body-content table td {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme table tr:nth-child(even),
body.dark-theme article table tr:nth-child(even),
body.dark-theme main#root article table tr:nth-child(even),
body.dark-theme .markdown-body-content table tr:nth-child(even) {
  background-color: #1a1a24 !important;
}

body.dark-theme table tr:hover,
body.dark-theme article table tr:hover,
body.dark-theme main#root article table tr:hover {
  background-color: #22222e !important;
}

/* ==========================================================================
   Admin Portal Styles
   ========================================================================== */
:root {
  --admin-primary: #e05349;
  --admin-primary-hover: #c93d33;
  --admin-success: #10b981;
  --admin-danger: #ef4444;
  --admin-warning: #f59e0b;
  --admin-bg-page: #f8fafc;
  --admin-bg-card: #ffffff;
  --admin-bg-sidebar: #0f172a;
  --admin-border: #e2e8f0;
  --admin-text-main: #0f172a;
  --admin-text-muted: #64748b;
}

body.admin-dark {
  --admin-bg-page: #0b0f19;
  --admin-bg-card: #1e293b;
  --admin-bg-sidebar: #020617;
  --admin-border: #334155;
  --admin-text-main: #f8fafc;
  --admin-text-muted: #94a3b8;
}

.admin-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-toast {
  background: #ffffff;
  color: #0f172a;
  border-left: 4px solid var(--admin-primary);
  padding: 12px 18px;
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.admin-toast.success { border-left-color: var(--admin-success); }
.admin-toast.error { border-left-color: var(--admin-danger); }

.admin-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--admin-bg-page);
  padding: 20px;
}

.admin-auth-card {
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
}

.admin-auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.admin-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-auth-logo img {
  width: 42px;
  height: 42px;
  border: none;
}

.admin-auth-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
}

.admin-auth-title {
  font-size: 20px !important;
  margin-bottom: 6px !important;
}

.admin-auth-subtitle {
  font-size: 13px;
  color: var(--admin-text-muted);
  margin: 0;
}

.admin-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.admin-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--admin-text-main);
}

.admin-input-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--admin-bg-card);
  color: var(--admin-text-main);
}

.admin-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--admin-primary);
  color: #ffffff !important;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-btn:hover {
  background: var(--admin-primary-hover);
}

.admin-mobile-menu-btn {
  background: transparent;
  color: #ffffff;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-mobile-menu-btn:hover {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.admin-sidebar-close-btn {
  background: transparent;
  color: #94a3b8;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 4px;
}
.admin-sidebar-close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

.admin-dashboard {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--admin-bg-page);
  overflow: hidden;
}

.admin-sidebar-overlay {
  display: none;
}

.admin-navbar {
  height: 56px;
  background: var(--admin-bg-sidebar);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.admin-navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
}

.admin-navbar-logo img {
  width: 32px;
  height: 32px;
  border: none;
}

.admin-badge-portal {
  background: rgba(224, 83, 73, 0.2);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.admin-navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.admin-user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--admin-success);
}

.admin-main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.admin-sidebar {
  width: 240px;
  background: var(--admin-bg-sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  transition: margin-left 0.25s ease, transform 0.25s ease;
}

.admin-sidebar:not(.open) {
  margin-left: -240px;
}

.admin-sidebar-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
}

.admin-sidebar-add-path-btn {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.admin-sidebar-paths {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.admin-path-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: #cbd5e1 !important;
  text-decoration: none !important;
  font-size: 13.5px;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: background 0.15s ease;
}

.admin-path-item:hover, .admin-path-item.active {
  background: rgba(255,255,255,0.1);
  color: #ffffff !important;
}

.admin-path-item.active {
  background: var(--admin-primary);
  font-weight: 600;
}

.admin-path-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #94a3b8;
}

.admin-content-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--admin-bg-page);
}

.admin-content-header {
  padding: 14px 20px;
  background: var(--admin-bg-card);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-path-breadcrumb {
  font-size: 16px;
  font-weight: 700;
}

.admin-path-domain {
  color: var(--admin-text-muted);
}

.admin-path-current {
  color: var(--admin-primary);
}

.excel-ribbon-bar {
  background: var(--admin-bg-card);
  border-bottom: 1px solid var(--admin-border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}

.excel-grid-container {
  flex: 1;
  overflow: auto;
  padding: 0;
}

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

.excel-table th {
  background: var(--admin-bg-page);
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  text-align: left;
  font-weight: 600;
  color: var(--admin-text-muted);
}

.excel-table td {
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
}

.excel-table tr:hover {
  background: rgba(224, 83, 73, 0.04);
}

.excel-kebab-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--admin-text-muted);
}

.excel-dropdown-menu {
  position: fixed;
  z-index: 9000;
  background: var(--admin-bg-card);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  padding: 6px;
  min-width: 180px;
}

.excel-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--admin-text-main);
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
  width: 100%;
}

.excel-dropdown-item:hover {
  background: var(--admin-bg-page);
}

/* Admin StackEdit Markdown Editor */
.admin-editor-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.admin-editor-topbar {
  padding: 10px 16px;
  background: var(--admin-bg-card);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-editor-slug-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 280px;
}

.admin-editor-path-prefix {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--admin-bg-page);
  border: 1px solid var(--admin-border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--admin-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.admin-editor-path-select {
  border: none;
  background: transparent;
  font-weight: 700;
  color: var(--admin-primary);
  outline: none;
  font-size: 13px;
  cursor: pointer;
}

.admin-editor-slug-input {
  padding: 6px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 13.5px;
  background: var(--admin-bg-card);
  color: var(--admin-text-main);
  min-width: 200px;
  flex: 1;
  outline: none;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.admin-editor-slug-input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 2px rgba(224, 83, 73, 0.15);
}

.admin-editor-sort-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--admin-bg-page);
  border: 1px solid var(--admin-border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--admin-text-muted);
  white-space: nowrap;
}

.admin-editor-sort-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--admin-text-muted);
  user-select: none;
}

.admin-editor-sort-input {
  width: 70px;
  padding: 3px 6px;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: var(--admin-bg-card);
  color: var(--admin-text-main);
  outline: none;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.admin-editor-sort-input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 2px rgba(224, 83, 73, 0.15);
}

.admin-editor-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stackedit-toolbar {
  background: var(--admin-bg-card);
  border-bottom: 1px solid var(--admin-border);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.stackedit-tool-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  color: var(--admin-text-main);
}

.stackedit-tool-btn:hover {
  background: var(--admin-bg-page);
  border-color: var(--admin-border);
}

.stackedit-panes {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.stackedit-editor-pane, .stackedit-preview-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stackedit-textarea {
  flex: 1;
  width: 100%;
  padding: 16px;
  border: none;
  resize: none;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  background: var(--admin-bg-card);
  color: var(--admin-text-main);
}

.stackedit-preview-pane {
  border-left: 1px solid var(--admin-border);
  padding: 20px;
  overflow-y: auto;
  background: var(--admin-bg-card);
}

.stackedit-preview-pane ul {
  list-style-type: disc;
  padding-left: 2em;
  margin: 12px 0;
}
.stackedit-preview-pane ol {
  list-style-type: decimal;
  padding-left: 2em;
  margin: 12px 0;
}
.stackedit-preview-pane ul ul,
.stackedit-preview-pane ol ul {
  list-style-type: circle;
  margin: 4px 0;
}
.stackedit-preview-pane ul ul ul,
.stackedit-preview-pane ol ul ul {
  list-style-type: square;
}
.stackedit-preview-pane ol ol,
.stackedit-preview-pane ul ol {
  list-style-type: lower-alpha;
  margin: 4px 0;
}
.stackedit-preview-pane li {
  margin: 4px 0;
  display: list-item;
}

.stackedit-statusbar {
  padding: 6px 16px;
  background: var(--admin-bg-card);
  border-top: 1px solid var(--admin-border);
  font-size: 12px;
  color: var(--admin-text-muted);
  display: flex;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 1000;
  }
  
  .admin-sidebar:not(.open) {
    transform: translateX(-100%);
    margin-left: 0;
  }
  
  .admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }
  
  .admin-sidebar-overlay.active {
    display: block;
  }
}

/* StackEdit Preview Table Styling */
.stackedit-preview-pane table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
.stackedit-preview-pane th, .stackedit-preview-pane td {
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  text-align: left;
}
.stackedit-preview-pane th {
  background: var(--admin-bg-body);
  font-weight: 600;
  color: var(--admin-text-main);
}
.stackedit-preview-pane tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}
.admin-dark .stackedit-preview-pane tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Responsive and Scrollable Markdown Table Wrapper */
.table-container {
  max-height: 100%;
  overflow-y: auto;
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0;
  border-radius: 6px;
}


body.page-root .btn-container {
  display: none !important;
}


@media (max-width: 900px) {
  .btn-container > a.btn-outline {
    font-size: 0 !important;
  }

  .btn-container > a.btn-outline::after {
    content: "❮ Previous";
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
  }

  .btn-container > a.btn.right {
    font-size: 0 !important;
  }

  .btn-container > a.btn.right::after {
    content: "Next ❯";
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
  }
}

