@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");
@import "tippy.js/animations/scale.css";

/* Typography */
:root {
  --font-size-small: 1.2rem;
  --font-size-base: 1.4rem;
  --font-size-base-large: 1.6rem;
  --font-size-medium: 1.8rem;
  --font-size-large: 2.4rem;

  --title-large: 3.2rem;
  --title-medium: 2.4rem;
  --title-small: 1.8rem;
  --title-smaller: 1.6rem;
  --title-xsmall: 1.4rem;

  --sidebar-width-expanded: 19vw;
  --sidebar-width-collapsed: 0;
  --content-padding: clamp(1.6rem, 3vw, 3.2rem);

  /* Table variables */
  --table-bg: #ffffff;
  --table-text: #2c2c2e;
  --table-muted: #6e6e73;
  --table-border: #e5e5ea;
  --table-divider: #ededf2;
  --table-head-bg: #f5f5f7;
  --table-head-text: #1c1c1e;
  --table-rowhead-bg: #f5f5f7;
  --table-rowhead-text: #1c1c1e;
  --table-radius: 12px;
  --table-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --table-cell-py: clamp(1.2rem, 1vw + 0.8rem, 1.6rem);
  --table-cell-px: clamp(1.4rem, 1.2vw + 1rem, 1.8rem);
}

/* Text Overflow Utilities */
.text-ellipsis-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-ellipsis-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-ellipsis-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-ellipsis-5 {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#main-sidebar::-webkit-scrollbar,
#content0-target::-webkit-scrollbar,
.inner-grid::-webkit-scrollbar,
#outer-grid::-webkit-scrollbar {
  width: 1px;
}

/* general Use */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
}

body {
  font-family:
    "Open Sans", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
  background-color: #f4f4f4;
  color: #212529;
  font-size: var(--font-size-base);
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.hidden {
  display: none !important;
}

p {
  font-size: var(--font-size-base-large);
  line-height: calc(var(--font-size-base-large) + 2px);
  margin-bottom: 1.2rem;
  text-align: left;
}

a {
  color: #143873;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:visited {
  color: #143873;
}
a:active {
  color: #74c0fc;
}

button {
  cursor: pointer;
  background-color: #e9ecef;
  color: #343a40;
  border: 1px solid #ced4da;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}
button.l {
  padding: 1rem 2rem;
  font-size: 1.6rem;
  border-radius: 8px;
}
button.m {
  padding: 0.8rem 1.5rem;
  font-size: 1.4rem;
  border-radius: 6px;
}
button.s {
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  border-radius: 4px;
}
button:hover {
  background-color: #ced4da;
}
button:active {
  background-color: #868e96;
}
button:disabled {
  background-color: #adb5bd;
  cursor: not-allowed;
}

ul,
ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 0.6rem;
  gap: 0.45rem;
}

/* Dark Mode */
body.dark-mode {
  a {
    color: #74c0fc;
  }
  background-color: #343a40;
  color: #f1f3f5;

  #main-sidebar {
    background-color: #495057;
    border-right: 1px solid #6c757d;
    color: #f1f3f5;
  }

  /* text section */

  .sidebar-link {
    color: #f1f3f5;
  }
  .sidebar-link:hover {
    background-color: #6c757d;
  }
  .section-link[open] {
    background-color: #6c757d;
  }
  .section-link:has(#logo-container) {
    background-color: #495057;
  }
  .section-link summary::before {
    filter: invert(1);
  }
  #logo {
    filter: brightness(2.5) contrast(1.2);
  }
  .label {
    border: 1px solid #adb5bd;
    color: #adb5bd;
  }

  #table-menu-list-title {
    color: #495057;
  }

  .header {
    background-color: #495057;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }

  .card-front,
  .card-back {
    background-color: #495057;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }
  .card-corner {
    background-color: #212529;
  }
  .card-corner:hover {
    background-color: #343a40;
  }

  .card-title {
    color: #f1f3f5;
  }

  .card-description {
    color: #e9ecef;
  }

  .big-card.single-sided-card,
  .medium-card.single-sided-card,
  .small-card.single-sided-card {
    background-color: #495057;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }

  .big-card.single-sided-card:hover,
  .medium-card.single-sided-card:hover,
  .small-card.single-sided-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }

  .big-card.single-sided-card .big-card-title,
  .medium-card.single-sided-card .medium-card-title,
  .small-card.single-sided-card .small-card-title {
    color: #f1f3f5;
  }

  .big-card.single-sided-card .big-card-description,
  .medium-card.single-sided-card .medium-card-description {
    color: #e9ecef;
  }

  /* Ul/Ol in plain content */
  .plain-content-section ul,
  .plain-content-section ol {
    color: #e9ecef;
  }

  .plain-content-section ul a,
  .plain-content-section ol a {
    color: #74c0fc;
  }

  .plain-content-section ul li,
  .plain-content-section ol li {
    background: linear-gradient(135deg, #495057 0%, #3a4149 100%);
    border-color: #6c757d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  .plain-content-section ul li:hover,
  .plain-content-section ol li:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    border-color: #868e96;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  }

  /* Table menu */
  .table-menu .table-contents {
    background-color: #3a4149;
  }

  #table-menu-list-title {
    color: #f1f3f5;
    border-bottom-color: #6c757d;
  }

  .table-menu .table-contents ul li a {
    color: #e9ecef;
  }

  .table-menu .table-contents ul li a:hover {
    background-color: #5a6268;
    color: #ffffff;
  }

  .table-menu .table-contents ul.nested {
    border-left-color: #6c757d;
  }

  .table-menu .table-contents ul.nested li a {
    color: #ced4da;
  }

  .table-menu .table-contents ul.nested li a:hover {
    color: #f1f3f5;
    background-color: #5a6268;
  }

  .table-menu .table-contents::-webkit-scrollbar-track {
    background: #343a40;
  }

  .table-menu .table-contents::-webkit-scrollbar-thumb {
    background: #6c757d;
  }

  .table-menu .table-contents::-webkit-scrollbar-thumb:hover {
    background: #868e96;
  }

  /* Dark mode table variables */
  --table-bg: #495057;
  --table-text: #f1f3f5;
  --table-muted: #adb5bd;
  --table-border: #6c757d;
  --table-divider: #5a6268;
  --table-head-bg: #364fc7;
  --table-head-text: #ffffff;
  --table-rowhead-bg: #3a4149;
  --table-rowhead-text: #f1f3f5;
  --table-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

  table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }

  table.table-striped tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
  }

  /* code editor */
  .code-editor-banner {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    border-bottom-color: #495057;
  }

  .code-editor-container {
    border-color: #6c757d;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }

  .code-editor-container::before {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 111.07 122.88"%3E%3Cpath fill="%23ced4da" d="M97.67,20.81h.01l.01.02c3.7.01,7.04,1.51,9.46,3.93 2.4,2.41,3.9,5.74,3.9,9.42h.02v.02 75.28.01h-.02c-.01,3.68-1.51,7.03-3.93,9.46-2.41,2.4-5.74,3.9-9.42,3.9v.02h-.02-59.19-.01v-.02c-3.69-.01-7.04-1.5-9.46-3.93-2.4-2.41-3.9-5.74-3.91-9.42H25.1V34.2h.02c.01-3.69,1.52-7.04,3.94-9.46 2.41-2.4,5.73-3.9,9.42-3.91v-.02h.02 39.72 19.45zM.02,75.38L0,13.39v-.01h.02C.03,9.69,1.54,6.34,3.95,3.92 6.36,1.52,9.69.02,13.37.01V0h.02 59.19c7.69,0,8.9,9.96.01,10.16H13.4h-.02v-.02c-.88,0-1.68.37-2.27.97-.59.58-.96,1.4-.96,2.27h.02v.01 3.17 58.81C10.17,83.63.02,84.09.02,75.38zm100.89,34.11V34.2v-.02h.02c0-.87-.37-1.68-.97-2.27-.59-.58-1.4-.96-2.28-.96v.02h-.01-59.19-.02v-.02c-.88,0-1.68.38-2.27.97-.59.58-.96,1.4-.96,2.27h.02v.01 75.28.02h-.02c0,.88.38,1.68.97,2.27.59.59,1.4.96,2.27.96v-.02h.01 59.19.02v.02c.87,0,1.68-.38,2.27-.97.59-.58.96-1.4.96-2.27z"/%3E%3C/svg%3E');
    opacity: 0.3;
  }

  .code-editor-banner .title-and-icon button {
    border: none;
    outline: none;
  }

  /* grid-tiles */
  .grid-tile {
    background-color: #495057;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);

    .grid-tile-title {
      color: #f1f3f5;
    }

    .grid-tile-description {
      color: #e9ecef;
    }
  }

  /* Dark mode */
  .active-category-selection {
    background: linear-gradient(135deg, #495057 0%, #3a4149 100%);
  }

  /* Category slider */
  .category-label {
    color: #ced4da;
  }

  .category-slider {
    background: linear-gradient(135deg, #5c7cfa 0%, #748ffc 100%);
  }

  .active-category-selection
    input[type="radio"]:nth-child(1):checked
    ~ .category-grid
    label:nth-child(1)
    span,
  .active-category-selection
    input[type="radio"]:nth-child(2):checked
    ~ .category-grid
    label:nth-child(2)
    span,
  .active-category-selection
    input[type="radio"]:nth-child(3):checked
    ~ .category-grid
    label:nth-child(3)
    span,
  .active-category-selection
    input[type="radio"]:nth-child(4):checked
    ~ .category-grid
    label:nth-child(4)
    span {
    color: #ffffff;
  }
}

/* Grids */
.grid {
  display: grid;
  gap: 0;
  grid-template-rows: auto;
  grid-template-columns: auto;
}

.grid.gapped {
  gap: clamp(1rem, 1.8rem, 2.4rem);
}

.grid.gapped-sm {
  gap: clamp(0.8rem, 1.6rem, 1.6rem);
}

.grid-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.grid-rows-2 {
  grid-template-rows: repeat(2, auto);
}
.grid-rows-3 {
  grid-template-rows: repeat(3, auto);
}

/* Main Content */
.inner-grid {
  grid-template-rows: auto 1fr;
  gap: 1.6rem;
}

#mode-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 100%;
  visibility: hidden;
}

.header {
  padding: 1.6rem;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

  display: flex;
  align-items: center;
  justify-content: space-between;

  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.header.sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Search Field Styles */
.field-container {
  position: relative;
  padding: 0;
  margin: 0;
  border: 0;
  width: 330px;
  height: 40px;
}

body:not(.dark-mode) .field-container input {
  border: 1px solid #ced4da;
}

.search-suggestions {
  position: absolute;
  top: 101%;
  left: 0;
  width: 100%;
  background-color: #fff;
  border-radius: 0 0 3px 3px;
  box-shadow: 0px 4px 8px rgba(77, 77, 77, 0.1);
  z-index: 10;
  padding: 5px 10px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.search-suggestions ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.search-suggestions ul li {
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.search-suggestions ul li.focused {
  background-color: #e9ecef;
}

.search-suggestions ul li:hover {
  background-color: #f1f3f5;
  cursor: pointer;
}

.icons-container {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  overflow: hidden;
}

.icon-close {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 75%;
  height: 75%;
  opacity: 0;
  cursor: pointer;
  transform: translateX(-200%);
  border-radius: 50%;
  transition:
    opacity 0.25s ease,
    transform 0.43s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.icon-close:before {
  content: "";
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 2px solid transparent;
  border-top-color: #6495ed;
  border-left-color: #6495ed;
  border-bottom-color: #6495ed;
  transition: opacity 0.2s ease;
}

.icon-close .x-up {
  position: relative;
  width: 100%;
  height: 50%;
}

.icon-close .x-up:before {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 3px;
  width: 50%;
  height: 2px;
  background-color: #6495ed;
  transform: rotate(45deg);
}

.icon-close .x-up:after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 0px;
  width: 50%;
  height: 2px;
  background-color: #6495ed;
  transform: rotate(-45deg);
}

.icon-close .x-down {
  position: relative;
  width: 100%;
  height: 50%;
}

.icon-close .x-down:before {
  content: "";
  position: absolute;
  top: 5px;
  left: 4px;
  width: 50%;
  height: 2px;
  background-color: #6495ed;
  transform: rotate(-45deg);
}

.icon-close .x-down:after {
  content: "";
  position: absolute;
  top: 5px;
  right: 1px;
  width: 50%;
  height: 2px;
  background-color: #6495ed;
  transform: rotate(45deg);
}

.is-type .icon-close:before {
  opacity: 1;
  animation: spin 0.85s infinite;
}

.is-type .icon-close .x-up:before,
.is-type .icon-close .x-up:after {
  animation: color-1 0.85s infinite;
}

.is-type .icon-close .x-up:after {
  animation-delay: 0.3s;
}

.is-type .icon-close .x-down:before,
.is-type .icon-close .x-down:after {
  animation: color-1 0.85s infinite;
}

.is-type .icon-close .x-down:before {
  animation-delay: 0.2s;
}

.is-type .icon-close .x-down:after {
  animation-delay: 0.1s;
}

.icon-search {
  position: relative;
  top: 5px;
  left: 8px;
  width: 50%;
  height: 50%;
  opacity: 1;
  border-radius: 50%;
  border: 3px solid #9fb4e8;
  transition:
    opacity 0.25s ease,
    transform 0.43s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.icon-search:after {
  content: "";
  position: absolute;
  bottom: -9px;
  right: -2px;
  width: 4px;
  border-radius: 3px;
  transform: rotate(-45deg);
  height: 10px;
  background-color: #9fb4e8;
}

.field {
  border: 0;
  width: 100%;
  height: 100%;
  padding: 10px 20px;
  background: white;
  border-radius: 3px;
  box-shadow: 0px 8px 15px rgba(77, 77, 77, 0.1);
  transition: all 0.4s ease;
}

.field:focus {
  outline: none;
  box-shadow: 0px 9px 20px rgba(77, 77, 77, 0.3);
}

.field:focus + .icons-container .icon-close {
  opacity: 1;
  transform: translateX(0);
}

.field:focus + .icons-container .icon-search {
  opacity: 0;
  transform: translateX(200%);
}

/* table-menu */
.table-menu {
  display: grid;
  position: fixed;
  top: 13%;
  right: 0;
  max-height: 70vh;
  grid-template-columns: auto 1fr;
  transform: translateX(calc(100% - 5rem)); /* Show only the icon tab */
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  clip-path: inset(0px -10px -10px -10px);
  border-radius: 12px 0 0 12px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1000;
}

.table-menu.expanded {
  transform: translateX(0); /* Full menu visible */
}

.table-menu .protruding-icon {
  width: 5rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #364fc7 0%, #5c7cfa 100%);
  color: #ffffff;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  pointer-events: auto;
  border: 1px inset #5a6268;
  border-right: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.table-menu .protruding-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-menu .protruding-icon:hover {
  background: linear-gradient(135deg, #5c7cfa 0%, #748ffc 100%);
}

.table-menu .protruding-icon:hover::before {
  opacity: 1;
}

.table-menu .protruding-icon svg {
  transition: transform 0.3s ease;
}

.table-menu.expanded .protruding-icon svg {
  transform: scale(1.1);
}

.table-menu .table-contents {
  background-color: #ffffff;
  /* box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15); */
  border-left: 2px inset #748ffc;
  padding: 2.4rem;
  width: 28rem;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

#table-menu-list-title {
  font-size: var(--title-medium);
  font-weight: 700;
  color: #212529;
  margin-bottom: 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid #e9ecef;
  letter-spacing: -0.02em;
}

.table-menu .table-contents ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0;
}

.table-menu .table-contents ul li {
  list-style: none;
}

.table-menu .table-contents ul li a {
  display: block;
  padding: 0.8rem 1.2rem;
  color: #495057;
  font-size: var(--font-size-base);
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.table-menu .table-contents ul li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, #364fc7 0%, #5c7cfa 100%);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.table-menu .table-contents ul li a:hover {
  background-color: #f1f3f5;
  color: #364fc7;
  padding-left: 1.6rem;
  text-decoration: none;
}

.table-menu .table-contents ul li a:hover::before {
  height: 60%;
}

.table-menu .table-contents ul.nested {
  margin-left: 1.2rem;
  margin-top: 0.4rem;
  padding-left: 1.2rem;
  border-left: 2px solid #e9ecef;
}

.table-menu .table-contents ul.nested li a {
  font-size: calc(var(--font-size-base) - 0.1rem);
  font-weight: 400;
  color: #6c757d;
  padding: 0.6rem 1rem;
}

.table-menu .table-contents ul.nested li a:hover {
  color: #495057;
  background-color: #f8f9fa;
}

/* Custom scrollbar for table contents */
.table-menu .table-contents::-webkit-scrollbar {
  width: 6px;
}

.table-menu .table-contents::-webkit-scrollbar-track {
  background: #f1f3f5;
  border-radius: 3px;
}

.table-menu .table-contents::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.table-menu .table-contents::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* Layout */
#outer-wrapper {
  height: 100vh;
  max-width: 100vw;
  overflow: hidden;
}
#outer-grid {
  position: relative;
  height: 100%;
  grid-template-columns: var(--sidebar-width-expanded) 1fr;
  transition: grid-template-columns 0.3s ease;
  overflow-y: scroll;
  overflow-x: hidden;
}
#outer-grid.sidebar-collapsed {
  grid-template-columns: var(--sidebar-width-collapsed) 1fr;
}
#main-sidebar {
  position: sticky;
  top: 0;
  background-color: #e9ecef;
  padding-bottom: 2rem;
  height: 100vh;
  border-right: 1px solid #ced4da;
  transition: all 0.3s ease;
  overflow: hidden;
  overflow-y: auto;
}
#content-target {
  padding: 2.4rem;
  overflow-y: auto;
}

.section {
  margin-bottom: 6.7rem;
}
.section-subtitle {
  font-size: var(--title-xsmall);
  color: #868e96;
  margin-bottom: 0.4rem;
}
.section-title {
  font-size: var(--title-small);
  font-weight: bold;
  margin-bottom: 1.2rem;
}

/* Sidebar Links */
.label {
  position: absolute;
  font-size: 1.05rem;
  font-weight: bolder;
  line-height: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  border: 1px solid #364fc7;
  color: #364fc7;
  background-color: #e7f1ff;
  opacity: 0.8;
  transform: translateY(-1rem);
}
.section-link:has(#logo-container) {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background-color: #e9ecef;
  z-index: 10;
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
  margin-bottom: 2rem;
}

.section-link summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  list-style: none;
  position: relative;
  padding-left: 2rem;
  transition: all 0.3s ease;
}
.section-link summary::before,
.code-preview-title::before {
  content: "";
  position: absolute;
  left: 0;
  width: 1.6rem;
  height: 1.6rem;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 7L15 12L10 17' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.23s ease;
}
.section-link[open],
.codepen-preview-embed.expanded {
  background-color: #dee2e6;

  summary::before {
    transform: rotate(90deg);
  }
}

.section #logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  margin: auto;
}
#logo {
  max-width: 100%;
  max-height: 3.7rem;
  object-fit: contain;
}

.sidebar-section {
  margin-top: 0.8rem;
  padding: 0.2rem 1.5rem;
  font-weight: 700;
}

.sidebar-section-title {
  font-size: var(--font-size-base-large);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.2rem 1.5rem;
  font-weight: 500;
  color: #495057;
  transition: background-color 0.3s ease;
}
.sidebar-link.collapsible-section {
  display: block;
}
.sidebar-link-img {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  margin-right: 0.7rem;
}
.sidebar-link:hover {
  background-color: #dee2e6;
}
.sidebar-link a {
  color: inherit;
}
.sidebar-link a:active {
  color: inherit;
}
.sidebar-link a :visited {
  color: inherit;
}

/* plain content */
.plain-content-section .ul-title,
.plain-content-section .ol-title {
  font-size: var(--font-size-base-large);
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

.plain-content-section ul,
.plain-content-section ol {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.6rem;
  padding-left: 1.6rem;
  margin-bottom: 1.2rem;
}

.plain-content-section ul li,
.plain-content-section ol li {
  display: flex;
  align-items: center;
  padding: 1rem 1.4rem;
  border-radius: 8px;
  gap: 0.8rem;
  font-size: var(--font-size-base-large);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 0.6rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Subtle shine effect */
.plain-content-section ul li::before,
.plain-content-section ol li::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.plain-content-section ul li:hover::before,
.plain-content-section ol li:hover::before {
  left: 100%;
}

.plain-content-section ul li:hover,
.plain-content-section ol li:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  border-color: #ced4da;
  background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
}

.plain-content-section ul.with-steps,
.plain-content-section ol.with-steps {
  li {
    width: 100%;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
  }

  .li-content {
    font-size: var(--font-size-base-large);
    margin-left: 0.6rem;
  }
}

.plain-content-section ol.with-steps {
  counter-reset: step-counter;
  li::before {
    content: counter(step-counter) ".";
    counter-increment: step-counter;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border-radius: 50%;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-m);
  }
}

.plain-content-section ul li input[type="checkbox"],
.plain-content-section ol li input[type="checkbox"] {
  margin-left: 0.4rem;
}

.plain-content-section .li-content {
  flex: 1;
  font-weight: 500;
  padding: 0.1rem;
}

/* Checkbox and radio */
input:where([type="checkbox"], [type="radio"]) {
  appearance: none;
  width: var(--font-size-large);
  height: var(--font-size-large);
  border: 2px solid #868e96;
  margin: calc(0.75rem - 2px) 0 0 0;
  border-radius: 4px;
  background: #fff no-repeat center;
}

input[type="radio"] {
  border-radius: 50%;
}

input:where([type="checkbox"], [type="radio"]):where(
    :active:not(:disabled),
    :focus
  ),
input:where([type="checkbox"], [type="radio"]):where(
    :active:not(:disabled),
    :focus
  ) {
  border-color: #5c7cfa;
  outline: none;
}

input:where([type="checkbox"], [type="radio"]):disabled {
  background: #eee;
}

input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3C!--!Font Awesome Free v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--%3E%3Cpath d='M530.8 134.1C545.1 144.5 548.3 164.5 537.9 178.8L281.9 530.8C276.4 538.4 267.9 543.1 258.5 543.9C249.1 544.7 240 541.2 233.4 534.6L105.4 406.6C92.9 394.1 92.9 373.8 105.4 361.3C117.9 348.8 138.2 348.8 150.7 361.3L252.2 462.8L486.2 141.1C496.6 126.8 516.6 123.6 530.9 134z'/%3E%3C/svg%3E");
  background-color: #ced4da;
}

input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg fill='%23000000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='SVGRepo_bgCarrier' stroke-width='0'%3E%3C/g%3E%3Cg id='SVGRepo_tracerCarrier' stroke-linecap='round' stroke-linejoin='round'%3E%3C/g%3E%3Cg id='SVGRepo_iconCarrier'%3E%3Cpath d='M12 18a6 6 0 100-12 6 6 0 000 12z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-color: #ced4da;
}

/* Cards */
.card {
  position: relative;
  width: 100%;
  margin: 1rem auto;
  padding: 0;
  background-color: transparent;
  perspective: 1000px;
  transition: all 0.3s ease;
}
.big-card {
  height: 32rem;
  width: 100%;
  max-width: 28rem;
}
.medium-card {
  height: 15rem;
  width: 100%;
  max-width: 42rem;
}
.small-card {
  height: 7.5rem;
  width: 100%;
  max-width: 30rem;
}
.card-corner {
  display: flex;
  padding: 1px;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 38px;
  height: 38px;
  overflow: hidden;
  top: 0;
  right: 0;
  background-color: #143873;
  border-radius: 0 8px 0 32px;
  transition: all 0.22s ease;
}
.absolute-arrow-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  cursor: pointer;
}

.card.two-sided-card:hover:not(:has(.card-front .card-corner:hover))
  .card-inner {
  transform: rotateY(180deg);
}
.card:hover .card-corner {
  background-color: #364fc7;
}

/* default back side position */
.card-back {
  transform: rotateY(180deg);
}

.card-description {
  font-size: var(--font-size-base);
  color: #495057;
  margin-top: 0.6rem;
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
}

.card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.big-card .card-front {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M485.291,129.408l-224-128c-3.285-1.877-7.296-1.877-10.581,0l-224,128c-3.328,1.899-5.376,5.44-5.376,9.259v234.667c0,3.819,2.048,7.36,5.376,9.259l224,128c1.643,0.939,3.456,1.408,5.291,1.408c1.835,0,3.648-0.469,5.291-1.408l224-128c3.328-1.899,5.376-5.44,5.376-9.259V138.667C490.667,134.848,488.619,131.307,485.291,129.408z M469.333,367.147L256,489.045L42.667,367.147V144.853L256,22.955l213.333,121.899V367.147z' fill='none' stroke='%23adb5bd' stroke-width='2.5' opacity='0.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom -9rem right -3rem;
  background-size: 18rem;
}

.big-card .card-inner,
.big-card .card-front,
.big-card .card-back {
  min-height: 32rem;
  max-height: 32rem;
}
.medium-card .card-inner {
  min-height: 15rem;
  height: 15rem;
}
.medium-card .card-front,
.medium-card .card-back {
  height: 15rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.small-card .card-inner,
.small-card .card-front,
.small-card .card-back {
  min-height: 7.5rem;
  max-height: 7.5rem;
}

.card-front,
.card-back {
  position: absolute;
  display: flex;
  width: 100%;
  backface-visibility: hidden;
  padding: 1.5rem;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* BIG CARDS */
.big-card {
  position: relative;
  border-radius: 8px;
  /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1.6rem; */
}
.two-sided-card .card-front::after {
  position: absolute;
  content: "";
  bottom: 0.5rem;
  left: 1rem;
  width: 4rem;
  height: clamp(2rem, 20%, 6rem);
  background-image: url("data:image/svg+xml,%3Csvg width='193px' height='193px' viewBox='-2.4 -2.4 28.80 28.80' fill='none' xmlns='http://www.w3.org/2000/svg' transform='matrix(1, 0, 0, 1, 0, 0)rotate(0)'%3E%3Cg id='SVGRepo_bgCarrier' stroke-width='0'%3E%3C/g%3E%3Cg id='SVGRepo_tracerCarrier' stroke-linecap='round' stroke-linejoin='round' stroke='%23CCCCCC' stroke-width='0.048'%3E%3C/g%3E%3Cg id='SVGRepo_iconCarrier'%3E%3Cpath d='M5.99986 16.5001L18.9999 16.5001' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M8.39825 19.9999L4.99986 16.4999L8.39825 12.9999' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M17.9999 7.49991L4.99989 7.50016' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M15.6015 11.0002L18.9999 7.50016L15.6015 4.00018' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.big-card:hover .card-front::after {
  opacity: 0.8;
}
.big-card .card-front,
.big-card .card-back {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.2rem;
}
.big-card .card-text * {
  flex: 1;
  height: fit-content;
}
.big-card-img-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 5.4rem;
}
.big-card-img-container img {
  width: 4.8rem;
  height: 4.8rem;
  object-fit: cover;
  border-radius: 8px;
}
.big-card-title {
  font-size: var(--title-smaller);
  color: #343a40;
  font-weight: bold;
  margin-top: 1rem;
  padding-right: 4rem;
}
.big-card-description {
  font-size: var(--font-size-base);
  color: #495057;
  margin-top: 0.8rem;
  line-height: 1.6;
  text-align: left;
}
.big-card-text-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 0.8rem;
}
.big-card-text-container * {
  flex: none !important;
  height: auto !important;
}
.big-card-back-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 0.8rem;
}
.big-card-back-text * {
  flex: none !important;
  height: auto !important;
}
.big-card .big-card-back-description {
  font-size: var(--font-size-base);
  color: #495057;
  line-height: 1.6;
  text-align: left;
}

/* BIG CARD - SINGLE SIDED */
.big-card.single-sided-card {
  position: relative;
  padding: 1.5rem;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.2rem;
  transition: box-shadow 0.3s ease;
}
.big-card.single-sided-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.big-card.single-sided-card .big-card-img-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 5.4rem;
}
.big-card.single-sided-card .big-card-img-container img {
  width: 4.8rem;
  height: 4.8rem;
  object-fit: cover;
  border-radius: 8px;
}
.big-card.single-sided-card .big-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: 0.8rem;
  width: 100%;
}
.big-card.single-sided-card .big-card-title {
  font-size: var(--title-smaller);
  color: #343a40;
  font-weight: bold;
}
.big-card.single-sided-card .big-card-description {
  font-size: var(--font-size-base);
  color: #495057;
  line-height: 1.6;
  text-align: left;
}
.big-card-back-title {
  font-size: var(--title-smaller);
  color: #343a40;
  font-weight: bold;
}
.big-card-back-description {
  font-size: var(--font-size-base);
  color: #495057;
  line-height: 1.6;
  text-align: left;
}

/* MEDIUM CARDS */
.medium-card {
  border-radius: 6px;
}
.medium-card-img-container img {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: 8px;
}
.medium-card .card-front {
  display: flex;
  flex-direction: row;
  gap: 1.2rem;
  align-items: center;
  justify-content: flex-start;
}
.medium-card-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  overflow: hidden;
}
.medium-card-title {
  font-size: var(--title-smaller);
  color: #343a40;
  font-weight: bold;
  padding-right: 4rem;
}

.medium-card-back-title {
  font-size: var(--title-smaller);
  color: #343a40;
  font-weight: bold;
}
.medium-card-description {
  line-height: 1.4;
}

/* MEDIUM CARD - SINGLE SIDED */
.medium-card.single-sided-card {
  position: relative;
  padding: 1.5rem;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  display: flex;
  flex-direction: row;
  gap: 1.2rem;
  align-items: center;
  justify-content: flex-start;
  transition: box-shadow 0.3s ease;
}
.medium-card.single-sided-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.medium-card.single-sided-card .medium-card-img-container {
  flex-shrink: 0;
}
.medium-card.single-sided-card .medium-card-img-container img {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: 8px;
}
.medium-card.single-sided-card .medium-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  overflow: hidden;
}
.medium-card.single-sided-card .medium-card-title {
  font-size: var(--title-smaller);
  color: #343a40;
  font-weight: bold;
}
.medium-card.single-sided-card .medium-card-description {
  font-size: var(--font-size-base);
  color: #495057;
  line-height: 1.4;
}

.small-card {
  border-radius: 4px;
}
.small-card .card-front {
  display: flex;
  flex-direction: row;
  gap: 0.8rem;
  align-items: center;
  justify-content: flex-start;
}
.small-card-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}
.small-card-img-container img {
  margin-right: auto;
  width: 4.6rem;
  height: 4.6rem;
  object-fit: cover;
}

.small-card-text-container {
  display: flex;
  flex-direction: column;
  text-align: center;
  height: 100%;
  justify-content: center;
  padding-right: 2.5rem;
  flex: 1;
}
.small-card-title {
  font-size: var(--title-xsmall);
  color: #343a40;
  font-weight: bold;
}
.small-card .card-back-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  gap: 0.6rem;
  padding-right: 1.6rem;
  overflow: hidden;
}
.small-card .card-back-content * {
  text-align: center;
}

/* SMALL CARD - SINGLE SIDED */
.small-card.single-sided-card {
  position: relative;
  padding: 1.5rem;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  display: flex;
  flex-direction: row;
  gap: 0.8rem;
  align-items: center;
  justify-content: flex-start;
  transition: box-shadow 0.3s ease;
}
.small-card.single-sided-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.small-card.single-sided-card .small-card-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.small-card.single-sided-card .small-card-img-container img {
  width: 4.6rem;
  height: 4.6rem;
  object-fit: cover;
}
.small-card.single-sided-card .small-card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  flex: 1;
  overflow: hidden;
}
.small-card.single-sided-card .small-card-title {
  font-size: var(--title-xsmall);
  color: #343a40;
  font-weight: bold;
}

/* COMPONENT STYLING */
.hypertitle {
  font-size: var(--font-size-small);
  font-weight: bold;
  margin-bottom: 1.4rem;
}
.page-title {
  font-size: var(--title-medium);
  font-weight: bold;
}
.page-subtitle {
  font-size: var(--title-xsmall);
  font-weight: semi-bold;
  margin-bottom: 1.2rem;
}

/* Carousel */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-container .dot-container {
  text-align: center;
  display: flex;
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translate(50%, 0);
  width: fit-content;
  border: none;
  background: transparent;
}

.carousel-container .dot-container .dots__dot {
  height: 1rem;
  width: 1rem;
  aspect-ratio: 1/1;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.carousel-container .dot-container .dots__dot.active {
  background-color: #615e5e;
}

.carousel-container .dot-container .dots__dot:hover {
  background-color: #444242;
}

.carousel-nav {
  display: flex;
  gap: 0.4rem;
}

.carousel-track {
  display: flex;
  position: relative;
  flex: 1;
  gap: 1.6rem;
  overflow: hidden;
  transition: transform 0.5s ease;
}

.carousel-track.has-big-card {
  height: 38rem;
}
.carousel-track.has-medium-card {
  height: 20rem;
}
.carousel-track.has-small-card {
  height: 13rem;
}

.carousel-slide {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 1.6rem, 2.4rem);
  transition: transform 0.5s ease;
}

.carousel-button {
  background: none;
  border: none;
  font-size: 2.4rem;
  height: auto;
  cursor: pointer;
  padding: 0 1rem;
  color: #495057;
}

/* Hide carousel buttons when there's only one slide */
.carousel-container:has(.carousel-track .carousel-slide:only-child)
  .carousel-button {
  display: none;
}

/* Table - Responsive Design */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--table-bg);
  color: var(--table-text);
  border: 1px solid var(--table-border);
  border-radius: var(--table-radius);
  overflow: hidden;
  box-shadow: var(--table-shadow);
  margin: 2rem 0;
  font-size: var(--font-size-base);
}

table th,
table td {
  padding: var(--table-cell-py) var(--table-cell-px);
}

thead {
  background: var(--table-head-bg);
  color: var(--table-head-text);
}

thead th {
  font-weight: 600;
  border-bottom: 1px solid var(--table-border);
  text-align: center;
  font-size: var(--font-size-base);
  letter-spacing: 0.02em;
}

thead th:first-child {
  text-align: left;
}

tbody th {
  background: var(--table-rowhead-bg);
  color: var(--table-rowhead-text);
  font-weight: 600;
  border-bottom: 1px solid var(--table-divider);
  text-align: left;
}

tbody td {
  border-bottom: 1px solid var(--table-divider);
  text-align: center;
  color: var(--table-text);
}

tbody tr:last-child > * {
  border-bottom: 0;
}

tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Desktop: Add right borders */
@media (min-width: 768px) {
  thead th,
  tbody tr > * {
    border-right: 1px solid var(--table-divider);
  }

  thead th:last-child,
  tbody tr > *:last-child {
    border-right: 0;
  }
}

/* Mobile: Card-style layout */
@media (max-width: 767px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  /* Hide thead visually but keep for accessibility */
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  tbody tr {
    border-bottom: 1px solid var(--table-divider);
  }

  tbody tr:last-child {
    border-bottom: 0;
  }

  tbody tr td:first-child {
    border-top: 1px solid var(--table-divider);
    background-color: var(--table-head-bg);
  }

  tbody th {
    background: var(--table-head-bg);
    font-weight: 700;
    font-size: var(--font-size-base-large);
    text-align: center;
    padding: 1.2rem;
  }

  tbody td {
    position: relative;
    border-bottom: none;
  }

  /* Show column headers as labels on mobile */
  tbody td[data-label]::before {
    content: attr(data-label) ": ";
    position: absolute;
    left: var(--table-cell-px);
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    padding-right: 1rem;
    white-space: nowrap;
    text-align: left;
    font-weight: 600;
    color: var(--table-muted);
  }
}

/* Table variants */
table.table-striped tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

table.table-bordered {
  border: 2px solid var(--table-border);
}

table.table-compact th,
table.table-compact td {
  padding: 0.8rem 1.2rem;
}

/* Responsive table wrapper */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--table-radius);
}

.table-wrapper table {
  margin: 0;
}

/* code editor - monaco */
.code-editor-wrapper {
  margin: 2rem 0;
}

.code-editor-container {
  position: relative;
}

.code-editor-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.6rem;
  background: linear-gradient(135deg, #364fc7 0%, #5c7cfa 100%);
  color: #ffffff;
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid #364fc7;
  letter-spacing: 0.03em;
}

.code-editor-banner .language-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: var(--font-size-small);
  font-weight: 500;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.code-editor-banner .title-and-icon {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.code-editor-banner .title-and-icon button {
  background: #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  width: 3.2rem;
  height: 3.2rem;
  outline: 1px solid #6495ed;
  cursor: pointer;
  padding: 0;
  transition: scale 0.2s ease;
}

.code-editor-banner .title-and-icon button:hover {
  scale: 1.08;

  .editor-header-icon {
    scale: 1.08;
  }
}

.code-editor-banner .title-and-icon button:active {
  scale: 1.01;

  .editor-header-icon {
    scale: 1.01;
  }
}

.editor-header-icon {
  width: 1.8rem;
  height: 1.8rem;
  transition: all 0.2s ease;
}

.code-editor-container {
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* grid tiles */
.grid-tiles-title {
  font-size: var(--title-small);
  font-weight: bold;
  margin-bottom: 1rem;
}

/* tile height and width are defined inside the minmax */
.grid-tiles-container {
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  /* grid-template-rows: repeat(auto-fill, minmax(22rem, 1fr)); */
}

.grid-tile {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 1.2rem;
  padding-top: 2rem;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.grid-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.grid-tile.our-choice::after {
  position: absolute;
  font-size: 1rem;
  top: 0.1rem;
  left: 0;
  padding: 0.2rem 0.4rem;
  border-radius: 0 8px 8px 0;

  content: "Our Choice";
  background-color: #6495ed;
  color: #ffffff;
}

.grid-tile-link {
  text-decoration: none;
  color: inherit;
}

.grid-tile-img {
  width: 100%;
  max-height: 6.4rem;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.grid-tile-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
}

.grid-tile-description {
  font-size: var(--font-size-small);
  font-weight: 700;
  color: #6c757d;
  text-align: center;
  margin-top: 0.4rem;
}

/* CodePenPreview */

.codepen-preview-container {
  display: grid;
  grid-template-rows: 2rem 1fr;
}

.codepen-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 3rem;
  margin: 20px 0;
}

.codepen-item {
  display: flex;
  flex-direction: column;
  max-width: 80rem;
}

.codepen-item iframe {
  height: 35rem;
  width: 100%;
  border: 2px solid #ccc;
  border-radius: 8px;
}

.codepen-title {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  color: var(--text-color);
}
.codepen-description {
  margin: 0 0 15px 0;
  color: #666;
}

/* Collapsible section */
.collapsible-section {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr;
}

.collapsible-section > .section-title-container {
  position: relative;
  cursor: pointer;
  padding: 0.8rem 1.2rem;
  background-color: #f1f3f5;
  border-radius: 6px;
  border: 1px solid #ced4da;
  margin-bottom: 1.2rem;
}

.collapsible-section:first-child .section-title-container::after {
  position: absolute;
  content: "";
  width: 2.4rem;
  height: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 7L15 12L10 17' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  right: 1.2rem;
  top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  transition: all 0.23s;
}

.collapsible-section:first-child .section-title-container:hover::after {
  opacity: 1;
}

.collapsible-section .section-title {
  margin-bottom: 0;
}

/* Sidebar active category selection */
.active-category-selection * {
  transition: all 0.3s ease;
}
.active-category-selection {
  --category-gap: clamp(0.4rem, 0.5vw, 0.6rem);
  --category-padding: clamp(0.4rem, 0.5vw, 0.6rem);

  position: relative;
  display: block;
  padding: var(--category-padding);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: clamp(8px, 1vw, 12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 0 1rem;
  width: calc(100% - 2rem);
  transition: all 0.3s ease;
}

.active-category-selection input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: var(--category-gap);
  z-index: 1;
}

.category-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.6rem, 1vw, 1rem) clamp(1rem, 1.5vw, 2rem);
  font-size: clamp(1.2rem, 1.3vw, var(--font-size-base));
  font-weight: 600;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
  text-align: center;
  min-width: clamp(7rem, 8vw, 9rem);
  min-height: clamp(3.5rem, 4vw, 4.5rem);
  border-radius: clamp(6px, 0.8vw, 8px);
}

.category-label span {
  position: relative;
  z-index: 2;
}

/* Active state - change text color to white when selected */
.active-category-selection
  input[type="radio"]:nth-child(1):checked
  ~ .category-grid
  label:nth-child(1)
  span,
.active-category-selection
  input[type="radio"]:nth-child(2):checked
  ~ .category-grid
  label:nth-child(2)
  span,
.active-category-selection
  input[type="radio"]:nth-child(3):checked
  ~ .category-grid
  label:nth-child(3)
  span,
.active-category-selection
  input[type="radio"]:nth-child(4):checked
  ~ .category-grid
  label:nth-child(4)
  span {
  color: #ffffff;
}

/* Slider background */
.category-slider {
  position: absolute;
  top: var(--category-padding);
  left: var(--category-padding);
  width: calc(50% - var(--category-padding) - var(--category-gap) / 2);
  height: calc(50% - var(--category-padding) - var(--category-gap) / 2);
  background: linear-gradient(135deg, #364fc7 0%, #5c7cfa 100%);
  border-radius: clamp(6px, 0.8vw, 8px);
  transition: transform 0.33s cubic-bezier(0.68, -0.15, 0.265, 1.15);
  box-shadow: 0 2px 6px rgba(54, 79, 199, 0.3);
  z-index: 0;
}

/* Slider positions based on checked input - 2x2 grid layout */
.active-category-selection
  input[type="radio"]:nth-child(1):checked
  ~ .category-slider {
  transform: translate(0, 0);
}

.active-category-selection
  input[type="radio"]:nth-child(2):checked
  ~ .category-slider {
  transform: translate(calc(100% + var(--category-gap)), 0);
}

.active-category-selection
  input[type="radio"]:nth-child(3):checked
  ~ .category-slider {
  transform: translate(0, calc(100% + var(--category-gap)));
}

.active-category-selection
  input[type="radio"]:nth-child(4):checked
  ~ .category-slider {
  transform: translate(
    calc(100% + var(--category-gap)),
    calc(100% + var(--category-gap))
  );
}

/* Hover effects */
.category-label:hover {
  color: #495057;
}

.active-category-selection
  input[type="radio"]:checked
  ~ .category-grid
  label:hover
  span {
  filter: brightness(1.1);
}

/* Collapsed sidebar state */
#outer-grid.sidebar-collapsed {
  grid-template-columns: var(--sidebar-width-collapsed) 1fr;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  #outer-grid {
    grid-template-columns: var(--sidebar-width-collapsed) 1fr;
  }

  .table-menu {
    transform: translateX(calc(100% - 5rem));
  }

  /* Make category selector more compact on medium screens */
  .active-category-selection {
    --category-gap: 0.4rem;
    --category-padding: 0.4rem;
  }

  .category-label {
    padding: 0.6rem 1rem;
    font-size: 1.2rem;
    min-width: 7rem;
    min-height: 3.5rem;
  }
}

@media (max-width: 768px) {
  #outer-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  #main-sidebar {
    position: fixed;
    left: -100%;
    z-index: 1000;
    height: 100vh;
    transition: left 0.3s ease;
  }

  #main-sidebar.mobile-open {
    left: 0;
  }

  .codepen-grid-container {
    grid-template-columns: 1fr;
  }

  .codepen-item iframe {
    height: 350px;
  }

  /* Make category selector even smaller on mobile */
  .active-category-selection {
    --category-gap: 0.3rem;
    --category-padding: 0.3rem;
  }

  .category-label {
    padding: 0.5rem 0.8rem;
    font-size: 1.1rem;
    min-width: 6rem;
    min-height: 3rem;
  }
}

/* .big-card-img-container img,
.medium-card-img-container img,
.small-card-img-container img,
.grid-tile-img {
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.2));
} */
