* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Mason Alternate Regular', sans-serif;
  background: #1a1a2e;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  color: #f8fafc;
}

.container {
  max-width: 100%;
  padding: 20px;
}

header {
  text-align: center;
  padding: 20px 20px;
  margin-bottom: 30px;
}

header h1 {
  font-family: 'Mason Alternate Regular', sans-serif;
  font-size: 2rem;
  color: #d4af37;
  background: none;
  -webkit-text-fill-color: initial;
  filter: none;
  letter-spacing: 1px;
  font-weight: 700;
}

header p {
  font-family: 'Mason Alternate Regular', sans-serif;
  font-size: 1rem;
  font-style: italic;
  color: #b8b8b8;
  margin-top: 5px;
}

.search-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
}

.search-controls {
  display: grid;
  grid-template-columns: 44% 44% calc(12% - 30px);
  gap: 15px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: 'Mason Alternate Regular', sans-serif;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: border-color 0.3s;
  width: 100%;
  background: #ffffff;
  color: #333;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.bi-info-circle {
  font-size: 1rem !important;
  color: #0d6efd !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 14px;
}

.tab-btn {
  padding: 12px 20px;
  font-family: 'Mason Alternate Regular', sans-serif;
  background: none;
  border: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
  margin-bottom: -2px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn.active {
  color: #d4af37;
  border-bottom-color: #d4af37;
}

.tab-btn:hover {
  color: #ffc107;
}

/* Hamburger menu toggle button */
.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
}

.mobile-header {
  display: none;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.mobile-tab-indicator {
  display: none;
  font-family: 'Mason Alternate Regular', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile menu styles */
#navMenu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

/* Desktop: menu always visible */
@media (min-width: 769px) {
  .mobile-header {
    display: none !important;
  }

  .menu-toggle {
    display: none !important;
  }

  .mobile-tab-indicator {
    display: none !important;
  }

  #navMenu {
    display: flex !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    flex-direction: row !important;
    padding: 0 !important;
    z-index: auto !important;
    border-bottom: 2px solid #e0e0e0 !important;
  }

  /* Override .mobile-hidden on desktop */
  #navMenu.mobile-hidden {
    display: flex !important;
  }

  .tab-btn {
    padding: 12px 20px;
    border-bottom: 3px solid transparent;
    border-left: none !important;
  }
}

.btn-search {
  background-color: #3f4052;
  border: 2px solid #d4af37;
  color: #f8fafc;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 20px;
  transition: all 0.3s ease;
  font-family: 'Mason Alternate Regular', sans-serif;
  text-transform: uppercase;
}

.btn-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #666;
}

.btn-search:hover:not(:disabled) {
  background-color: #d4af37;
  color: #1a1a2e;
}

.btn-clear,
.btn-inventory {
  background-color: #3f4052;
  border: 2px solid #d4af37;
  color: #f8fafc;
  border-radius: 4px;
  font-family: 'Mason Alternate Regular', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-clear:hover,
.btn-inventory:hover {
  background-color: #d4af37;
  color: #1a1a2e;
}

.results-section {
  background: #252632;
  padding: 30px;
  border-radius: 10px;
  border: 2px solid #3f4052;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.results-info {
  margin-bottom: 20px;
  color: #b8b8b8;
  font-size: 0.95rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

/* Virtual Scrolling Styles */
.virtual-scroll-container {
  height: 100%;
  width: 100%;
  position: relative;
}

.virtual-scroll-viewport {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.virtual-scroll-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}

/* Ensure smooth scrolling on all devices */
.virtual-scroll-viewport::-webkit-scrollbar {
  width: 8px;
}

.virtual-scroll-viewport::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.virtual-scroll-viewport::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.virtual-scroll-viewport::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.card {
  background: var(--primer-bg, #37375b);
  border: 2px solid var(--primer-border, #3f4052);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  color: var(--primer-text-main, #e8e8f0);
}

.card:hover {
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
  border-color: #d4af37;
}

.card-header {
  display: flex;
  flex-direction: row;
  align-content: normal;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.card-title {
  font-family: 'Mason Alternate Regular', sans-serif;
  flex: 1;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primer-accent, #d4af37);
}

.card-hex {
  white-space: nowrap;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  margin-left: auto;
  cursor: pointer;
  display: inline-block;
  user-select: none;
}

.card-hex:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-hex:active {
  transform: scale(0.9) !important;
}

.card-code {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primer-accent, #ffc107);
}

.card-keywords {
  color: var(--primer-text-main, #f8fafc);
  width: 100%;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 300;
  background-color: var(--primer-border, #3f4052);
  padding: 4px;
}

.silver-preview {
  background: linear-gradient(135deg, #e6e6e6 0%, #b8b8b8 50%, #808080 100%);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.5);
}

.gold-preview {
  background: linear-gradient(135deg, #ffe082 0%, #d4af37 50%, #8b6d10 100%);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.3);
}

.card-field {
  margin-bottom: 12px;
}

.card-label {
  font-family: 'Mason Alternate Regular', sans-serif;
  font-weight: 600;
  color: var(--primer-accent, #ffc107);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.card-value {
  color: var(--primer-text-main, #d0d0d0);
  line-height: 1.5;
  font-size: 0.95rem;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(212, 175, 55, 0.2);
  color: #ffc107;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 5px;
  margin-bottom: 5px;
  border: 1px solid #d4af37;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.empty-state h3 {
  font-family: 'Mason Alternate Regular', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #d4af37;
}

.empty-state p {
  font-size: 0.95rem;
  color: #b8b8b8;
}

.empty-state .suggestions {
  margin-top: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.empty-state .suggestions h4 {
  color: #667eea;
  font-size: 1rem;
  margin-bottom: 10px;
}

.empty-state .suggestions ul {
  padding-left: 20px;
}

.empty-state .suggestions li {
  margin-bottom: 8px;
  color: #555;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

.spinner {
  border: 3px solid #f0f0f0;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.color-preview {
  width: 100%;
  height: 60px;
  border-radius: 6px;
  border: 2px solid #e0e0e0;
  margin-bottom: 10px;
  background: linear-gradient(45deg, #667eea, #764ba2);
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  header h1 {
    font-size: 1.8rem;
  }

  /* Show mobile header on mobile */
  .mobile-header {
    display: flex;
    margin-bottom: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
  }

  /* Show hamburger menu on mobile */
  .menu-toggle {
    display: flex;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    gap: 5px;
  }

  .mobile-tab-indicator {
    display: block;
    flex: 1;
  }

  .hamburger-line {
    width: 26px;
    height: 3px;
    background: #d4af37;
    border-radius: 2px;
  }

  /* Mobile fullscreen menu layout */
  .search-section {
    padding: 20px 15px;
    margin-top: 0;
  }

  .tabs {
    border: none;
    margin: 0;
    gap: 0;
  }

  #navMenu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 100px;
    padding-bottom: 20px;
    z-index: 1999;
    border: none;
    margin: 0;
    overflow-y: auto;
    gap: 0;
  }

  #navMenu.mobile-hidden {
    display: none !important;
  }

  .tab-btn {
    padding: 20px 20px;
    border-bottom: 2px solid #e0e0e0;
    border-left: 5px solid transparent;
    margin: 0;
    display: block !important;
    width: 100%;
    text-align: left;
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
    touch-action: manipulation;
    border-bottom-color: #d4af37 !important;
    border-bottom-width: 3px !important;
  }

  .tab-btn.active {
    background: #f0f0f0;
    border-left-color: #d4af37;
    color: #333;
  }

  .tab-btn:active {
    background: #ddd;
  }

  .search-controls {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .results-grid {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .results-section {
    padding: 20px;
  }

  .card {
    width: 100%;
    overflow-x: hidden;
  }
}

.disclaimer-container {
  background-color: rgba(47, 41, 133, 0.4);
  padding: 30px;
  border-radius: 12px;
  margin: 60px auto 20px;
  border-left: 6px solid whitesmoke;
  max-width: 1000px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.disclaimer-text {
  color: #ffffff !important;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.disclaimer-text strong {
  color: whitesmoke;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.main-footer {
  border-top: 1px solid whitesmoke;
  padding-top: 20px;
  color: whitesmoke;
  font-weight: 600;
  font-size: 0.85rem;
} 


.filters-container {
  grid-column: 1 / -1; 
  display: flex;       
  flex-wrap: wrap;     
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.filter-group {
  margin: 10px;
}

/* Visual separator + extra spacing for every filter group after the first
   (e.g. Value/Lightness and Manufacturer sit to the right of Phase) */
.filter-group + .filter-group {
  border-left: 1px solid #d0d0d0;
  padding-left: 1.5em;
  margin-left: 1.5em;
}

.filter-checkboxes {
  display: flex;
  flex-wrap: wrap;     
  gap: 15px;           
}

.filter-label {
  color: #29230f !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;  
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
  user-select: none;
  transition: color 0.2s;
}

.checkbox-label:hover {
  color: #667eea;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + * {
  font-weight: 600;
  color: #667eea;
}

@media (max-width: 768px) {
  .filters-container {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  /* Groups stack vertically on mobile: use a top separator instead of left */
  .filter-group + .filter-group {
    border-left: none;
    padding-left: 0;
    margin-left: 10px;
    border-top: 1px solid #d0d0d0;
    padding-top: 12px;
  }
}

.footer-content {
    margin-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.footer-links a {
    color: whitesmoke;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    text-decoration: none;
    border-bottom: none;
}

.footer-links a:before {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

.footer-links a[title="Instagram"]:before {
    content: "\f16d"; /* Instagram icon */
}

.footer-links a[title="Blog"]:before {
    content: "\f19a"; /* WordPress icon */
}

.footer-links a i {
    display: none; /* Hide the original icon element */
}

.footer-links a:hover {
    color: #fff;
    transform: translateY(-3px);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.contribution-text {
    font-size: 0.85rem;
    color: #ccc !important;
    line-height: 1.6;
}

.contribution-text a {
    color: whitesmoke;
    text-decoration: none;
    font-weight: 600;
}

.contribution-text a:hover {
    text-decoration: underline;
}

.top-language-bar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 10px;    
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.flag-container {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease; 
}

.flag-container:hover {
    opacity: 1;
    transform: scale(1.1);
}

.flag-container.active {
    opacity: 1;
    border-color: #007bff; 
    background-color: rgba(0, 123, 255, 0.1); 
    box-shadow: 0 0 8px rgba(150, 175, 202, 0.8);
    transform: scale(1.1);
}

.wip-text {
    font-size: 0.7rem;
    color: #ccc;
    font-family: sans-serif; 
}


.dilution-container {
    margin-top: 1px;
    width: 100%;
}


.dilution-rule {
    height: 50px;
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    background: linear-gradient(to right, 
        var(--paint-color) 0%, 
        var(--paint-color) 20%, 
        rgba(255, 255, 255, 0.5) 80%, 
        #ffffff 100%
    );
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border: none; 
    outline: 1px solid rgba(0,0,0,0.05); 
}


.dilution-disclaimer {
    font-size: 0.6rem;
    color: #999;
    font-style: italic;
    text-align: right;
    margin-top: 2px;
    font-family: sans-serif;
}


.sort-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.primer-selector-container {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.primer-label {
    color: #d4af37;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
    transition: color 0.2s ease;
}

.primer-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0 !important;
    border-radius: 4px;
    background: #ffffff !important;
    color: #333 !important;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.3s;
    font-family: 'Mason Alternate Regular', sans-serif;
}

.primer-select:focus {
    outline: none;
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
    background: #ffffff !important;
    color: #333 !important;
}

.primer-select:hover {
    border-color: #d4af37 !important;
    background: #ffffff !important;
    color: #333 !important;
}

.primer-tooltip {
    font-size: 0.9rem;
    color: #0d6efd;
    cursor: help;
    transition: color 0.2s;
}

.primer-tooltip:hover {
    color: #0b5ed7;
}

.sort-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 8px;
    transition: all 0.2s;
}

.sort-btn:hover {
    background: #f0f0f0;
    border-color: #888;
}

.sort-btn.desc #sort-icon-asc { display: none !important; }
.sort-btn.desc #sort-icon-desc { display: inline !important; }

#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #1a1a1a; display: flex; justify-content: center; align-items: center;
    z-index: 10000; transition: opacity 0.5s;
}

.hobby-loader { position: relative; width: 120px; height: 150px; text-align: center; }


.paint-pot {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 50px; border: 4px solid #eee;
    border-radius: 5px 5px 15px 15px; background: transparent; overflow: hidden;
}

.paint-fill {
    position: absolute; bottom: 0; width: 100%; height: 60%;
    background: #e74c3c; 
    animation: paint-wave 2s infinite ease-in-out;
}


.brush {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 20px; animation: brush-dip 2s infinite ease-in-out;
}

.brush-handle { width: 6px; height: 60px; background: #8b4513; margin: 0 auto; border-radius: 5px; }
.brush-ferrule { width: 5px; height: 10px; background: #aaa; margin: -5px auto 0; }
.brush-bristles { 
    width: 3px; height: 18px; background: #d2b48c; margin: 0 auto; 
    border-radius: 0 0 5px 5px;
}


@keyframes brush-dip {
    0%, 80% { transform: translate(-50%, 0) rotate(0deg); }
    30% { transform: translate(-50%, 30px) rotate(5deg); } 
    45% { transform: translate(-50%, 30px) rotate(-5deg); } 
}

@keyframes paint-wave {
    0%, 100% { height: 60%; }
    50% { height: 65%; }
}

#loadingText {
    position: absolute; bottom: -40px; width: 200px; left: 50%; 
    transform: translateX(-50%); color: #eee; font-family: sans-serif;
    font-size: 0.8rem; letter-spacing: 1px;
}






.medieval-table-wrapper {
    width: 100% !important;
    box-sizing: border-box;
    margin: 20px 0;
    background: #2c2c3d;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    overflow-x: auto;
}


.custom-medieval-table {
    width: 100% !important;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0 5px;
    table-layout: fixed; 
}

.custom-medieval-table th, 
.custom-medieval-table td {
    padding: 12px 15px !important;
    white-space: normal;
    vertical-align: middle;
}


.custom-medieval-table thead th {
    border-bottom: 2px solid #d4af37 !important;
    color: #d4af37;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-align: center;
}


.custom-medieval-table tbody td {
    background-color: #38384d;
    border: none !important;
    color: #e0e0e0;
    font-size: 0.85rem;
}


.custom-medieval-table tbody td:first-child {
    background-color: #1a1a2e;
    color: #d4af37;
    font-weight: bold;
    width: 15%;
}


.custom-medieval-table th:nth-child(2) { width: 20%; } 
.custom-medieval-table th:nth-child(3) { width: 25%; } 
.custom-medieval-table th:nth-child(4) { width: 20%; } 
.custom-medieval-table th:nth-child(5) { width: 20%; } 

.custom-medieval-table .text-info { color: #0dcaf0 !important; }
.custom-medieval-table .text-warning { color: #ffc107 !important; }
.custom-medieval-table .text-danger { color: #dc3545 !important; }


.text-danger { color: #ff6b6b !important; }
.fw-bold { font-weight: bold; }


@media (max-width: 768px) {
    .custom-medieval-table {
        table-layout: auto; 
    }
}

#results.massa-active {
    display: block !important;
    width: 100% !important;
    overflow: visible; 
}


.massa-active .medieval-table-wrapper {
    width: 100%;
}


.massa-active .custom-medieval-table {
    border-collapse: collapse;
    width: 100%;
}

.massa-active .custom-medieval-table td, 
.massa-active .custom-medieval-table th {
    border: 1px solid #444 !important;
}


#results.massa-active {
    display: block !important;
}

.medieval-table-wrapper {
    width: 100%;
    background: #2c2c3d;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
    box-sizing: border-box;
    margin: 20px 0;
}

.custom-medieval-table {
    width: 100% !important;
    border-collapse: collapse !important; 
    table-layout: fixed;
}


.custom-medieval-table th, 
.custom-medieval-table td {
    border: 1px solid #444 !important; 
    padding: 12px 8px !important;
    text-align: center;
    vertical-align: middle;
    font-size: 0.85rem;
    word-wrap: break-word;
}


.custom-medieval-table tbody td:first-child {
    background-color: #1a1a2e;
    color: #d4af37;
    font-weight: bold;
    text-align: left;
}


.table-footer-notes {
    margin-top: 15px;
    padding: 12px;
    border-top: 1px solid #555;
    background: rgba(0,0,0,0.2);
    font-size: 0.8rem;
    color: #ccc;
}

.photo-placeholder-zone {
    margin-top: 10px;
    padding: 20px;
    border: 2px dashed #444;
    text-align: center;
    color: #888;
    border-radius: 4px;
}


.projects-accordion {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 15px;
}

.project-desc {
    white-space: pre-line; 
}


.accordion-item {
  background-color: #2a2b36; 
  border: 1px solid #3f4052;
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
}


.accordion-button {
  width: 100%;
  background-color: #21222d;
  color: #fff;
  border: none;
  padding: 18px 20px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s;
}

.accordion-button:hover {
  background-color: #282936;
}


.project-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-right: 20px;
}

.project-title {
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #ffc107; 
}


.project-badges {
  display: flex;
  gap: 10px;
}

.badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
}

.status-progress { background-color: #fd7e14; color: #fff; } 
.project-pct { background-color: #4f5063; color: #fff; }


.accordion-body {
  padding: 20px;
  border-top: 1px solid #3f4052;
  display: block;
  background-color: #1f2029;
}

.project-desc {
  color: #b9bac7;
  font-style: italic;
  margin-bottom: 20px;
}


.project-dependencies-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
  margin-top: 15px;
}

.dep-column {
  background: #21222d;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #3f4052;
}

.dep-column h5 {
  color: #03a9f4;
  border-bottom: 1px solid #3f4052;
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.mini-chip {
  display: block !important;
  background-color: #2a2b36 !important;
  padding: 8px 12px !important;
  margin-bottom: 8px !important;
  border-radius: 4px !important;
  font-size: 0.85rem !important;
  color: #e1e1e6 !important;
  border-left: 3px solid #555; 
}




.status-progress { 
    background-color: #fd7e14 !important; 
    color: #fff !important; 
}


.status-done { 
    background-color: #28a745 !important; 
    color: #fff !important; 
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.4); 
}


.status-todo { 
    background-color: #007bff !important; 
    color: #fff !important; 
}


.status-parking { 
    background-color: #6c757d !important; 
    color: #e1e1e6 !important; 
}



.canva-carousel-container {
    width: 100%;
    margin-top: 20px;
    padding: 0; 
    background-color: #1f2029;
    border: 1px solid #3f4052;
    border-radius: 6px;
    overflow: hidden; 
}


.canva-long-strip {
    width: 100% !important;   
    height: auto !important;   
    display: block;            
}


.accordion-item {
    background-color: #2a2b36;
    border: 1px solid #3f4052;
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden; 
}

.accordion-body {
    padding: 20px;
    border-top: 1px solid #3f4052;
    background-color: #1f2029;
    width: 100%;
    box-sizing: border-box;
}


.project-more-info {
    margin-top: -5px; 
    margin-bottom: 20px;
    padding: 10px 14px;
    background-color: #252632; 
    border-left: 3px solid #ffc107; 
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}


.project-more-info .info-label {
    color: #a0a2b7;
    font-weight: 500;
}


.project-link {
    color: #4da6ff !important; 
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease-in-out, text-decoration 0.2s;
}


.project-link:hover {
    color: #80bfff !important; 
    text-decoration: underline; 
}


@media (max-width: 768px) {

    .placeholder-image
    {
        width: 100% !important;
        height: auto !important;
    } 
    
    
    .project-dependencies-grid {
        display: flex !important;
        flex-direction: column !important; 
        gap: 20px !important;
        width: 100% !important;
    }

    .dep-column {
        width: 100% !important;
        min-width: 0 !important;
    }

    
    .accordion-button {
        padding: 12px 15px !important;
    }

    .project-header-main {
        display: flex !important;
        flex-direction: column !important; 
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .project-title {
        font-size: 1.1rem !important; 
        white-space: normal !important; 
    }

    .project-badges {
        display: flex !important;
        flex-wrap: wrap !important; 
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    
    .tabs-container { 
        display: flex !important;
        overflow-x: auto !important; 
        white-space: nowrap !important;
        justify-content: flex-start !important;
        padding-bottom: 5px !important;
    }

    .tab-button {
        padding: 10px 15px !important;
        font-size: 0.85rem !important; 
    }


    
    /* .medieval-table-wrapper table, 
    .medieval-table-wrapper thead, 
    .medieval-table-wrapper tbody, 
    .medieval-table-wrapper th, 
    .medieval-table-wrapper td, 
    .medieval-table-wrapper tr { 
        display: block !important; 
        width: 100% !important;
        box-sizing: border-box;
    }

    
    .medieval-table-wrapper thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    
    .medieval-table-wrapper tr { 
        background: #1f2029 !important; 
        border: 1px solid #3f4052 !important;
        border-radius: 8px !important;
        margin-bottom: 20px !important;
        padding: 0 !important; 
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    
    .medieval-table-wrapper td:nth-of-type(1) {
        background-color: #2a2b36 !important; 
        border-bottom: 2px solid #ffc107 !important; 
        padding: 12px 15px !important;
        font-size: 1.1rem !important;
        font-weight: bold !important;
        color: #ffc107 !important; 
        display: block !important;
        text-align: left !important; 
    }
    
    .medieval-table-wrapper td:nth-of-type(1)::before { 
        content: "" !important; 
    }

    
    .medieval-table-wrapper td:not(:nth-of-type(1)) { 
        border: none !important;
        border-bottom: 1px solid #2e2f3d !important; 
        position: relative !important;
        padding: 10px 15px 10px 45% !important; 
        text-align: right !important; 
        font-size: 0.9rem !important;
        color: #e3e4e8 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        min-height: 40px;
    }

    .medieval-table-wrapper td:last-child {
        border-bottom: none !important;
    }

    
    .medieval-table-wrapper td:nth-of-type(2)::before { content: "Type:"; font-weight: bold; color: #a0a2b7; }
    .medieval-table-wrapper td:nth-of-type(3)::before { content: "Drying Time:"; font-weight: bold; color: #a0a2b7; }
    .medieval-table-wrapper td:nth-of-type(4)::before { content: "Shrinkage:"; font-weight: bold; color: #a0a2b7; }
    .medieval-table-wrapper td:nth-of-type(5)::before { content: "Notes:"; font-weight: bold; color: #a0a2b7; }
    
    
    .medieval-table-wrapper td::before {
        position: absolute !important;
        left: 15px !important;
        width: 40% !important;
        text-align: left !important;
        white-space: nowrap;
    } */

    @media (max-width: 768px) {
      .medieval-table-wrapper {
          overflow-x: visible;
      }

      .medieval-table-wrapper table,
      .medieval-table-wrapper thead,
      .medieval-table-wrapper tbody,
      .medieval-table-wrapper th,
      .medieval-table-wrapper td,
      .medieval-table-wrapper tr {
          display: block !important;
          width: 100% !important;
          box-sizing: border-box;
      }

      /* Show table title before first row */
      .medieval-table-wrapper table::before {
          content: "Feature / Product";
          display: block;
          font-weight: bold;
          color: #ffc107;
          font-size: 1rem;
          padding: 15px 15px 0;
          margin-bottom: 10px;
      }

      /* Hide original header */
      .medieval-table-wrapper thead {
          display: none !important;
      }

      /* Style each row as a card */
      .medieval-table-wrapper tbody tr {
          background: #2a2b36 !important;
          border: 1px solid #3f4052 !important;
          border-radius: 8px !important;
          margin-bottom: 20px !important;
          padding: 0 !important;
          overflow: hidden;
      }

      /* First cell = feature name (bold header) */
      .medieval-table-wrapper td:nth-child(1) {
          background-color: #1f2029 !important;
          border-bottom: 2px solid #ffc107 !important;
          padding: 12px 15px !important;
          font-size: 1rem !important;
          font-weight: bold !important;
          color: #ffc107 !important;
          display: block !important;
      }

      /* Data cells with labels */
      .medieval-table-wrapper td:not(:nth-child(1)) {
          border-bottom: 1px solid #3f4052 !important;
          padding: 12px 15px !important;
          text-align: left !important;
          font-size: 0.9rem !important;
          color: #e3e4e8 !important;
          display: flex !important;
          justify-content: space-between !important;
          align-items: center !important;
      }

      .medieval-table-wrapper td:last-child {
          border-bottom: none !important;
      }

      /* Column headers as ::before labels */
      .medieval-table-wrapper td:nth-child(2)::before { content: "Cyanoacrylate + Baking Soda"; }
      .medieval-table-wrapper td:nth-child(3)::before { content: "Araldite + Baking Soda"; }
      .medieval-table-wrapper td:nth-child(4)::before { content: "Araldite (Pure)"; }
      .medieval-table-wrapper td:nth-child(5)::before { content: "Putty / Paste"; }

      .medieval-table-wrapper td:not(:nth-child(1))::before {
          font-weight: bold;
          color: #a0a2b7;
          font-size: 0.8rem;
          flex: 0 0 45%;
      }

      .placeholder-image {
          width: 100% !important;
          height: auto !important;
      }
  }
       
    
    .tabs {
        display: flex !important;
        justify-content: space-between !important; 
        overflow: hidden !important;             
        white-space: nowrap !important;
        padding: 8px 10px !important;            
        gap: 0px !important;                     
        width: 100% !important;
        box-sizing: border-box;
    }

    .tab-button {
        flex: 1 1 0% !important;                 
        padding: 8px 4px !important;             
        font-size: 0.78rem !important;           
        letter-spacing: 0px !important;          
        text-align: center !important;
        text-transform: uppercase;
        
        
        display: inline-block !important;
        overflow: hidden;
        text-overflow: clip; 
    }

    .tab-btn {
        flex: 1 1 0% !important;
        padding: 8px 4px !important;
        font-size: 0.68rem !important;
        letter-spacing: 0px !important;
    }
}

#sort-icon-desc { display: none; }
#btn-sort.desc #sort-icon-asc { display: none; }
#btn-sort.desc #sort-icon-desc { display: inline; }

/* ============ RECIPE STYLES (PAINT RECIPES TAB) ============ */

.recipe-accordion {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 15px;
}

.recipe-border {
  border: 1px solid #8b6914 !important;
  background-color: #2a2b36 !important;
}

.recipe-title {
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #d4af37;
}

.recipe-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-right: 20px;
  gap: 15px;
}

.recipe-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.recipe-system {
  background-color: #3d5a80 !important;
  color: #90caf9 !important;
}

.recipe-army {
  background-color: #5a3d80 !important;
  color: #ce93d8 !important;
}

.recipe-count {
  background-color: #4f5063 !important;
  color: #ffc107 !important;
}

.recipe-body {
  background-color: #1f2029 !important;
}

.recipe-credit {
  background-color: #252632;
  border-left: 4px solid #d4af37;
  padding: 12px 200px 12px 15px; /* right padding reserves space for logo */
  border-radius: 4px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  min-height: 60px;
}

@media (max-width: 768px) {
  .recipe-credit {
    padding-right: 15px;
    background-image: none !important;
  }
}

.credit-text {
  color: #b9bac7;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.credit-link {
  color: #4da6ff !important;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease-in-out;
}

.credit-link:hover {
  color: #80bfff !important;
  text-decoration: underline;
}

.credit-note {
  color: #888a9a;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 6px 0 0 0;
  font-style: italic;
  padding-bottom: 10px;
}

/* Recipe Scheme Tabs (2026-06-19) */
.recipe-schemes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #3f4052;
  padding-bottom: 8px;
}

.scheme-tab {
  padding: 10px 16px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #c8b88a;
  font-weight: 500;
  font-family: 'Mason Alternate Regular', sans-serif;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  white-space: normal;
  font-size: 0.95rem;
  flex: 0 0 calc(33.333% - 6px);
  box-sizing: border-box;
  text-align: center;
}

.scheme-tab:hover {
  color: #ffc107;
  text-decoration: underline;
}

.scheme-tab.active {
  color: #ffc107;
  border-bottom-color: #ffc107;
  font-weight: 700;
}

.scheme-content {
  display: none;
}

.scheme-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.recipe-step {
  margin-bottom: 25px;
  background-color: #252632;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #3f4052;
}

.step-title {
  color: #d4af37;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3f4052;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.paint-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid #3f4052;
}

.paint-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #1f2029;
}

.paint-table thead {
  background-color: #21222d;
  border-bottom: 2px solid #d4af37;
}

.paint-table th {
  color: #d4af37;
  padding: 12px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid #3f4052;
}

.paint-table th:last-child {
  border-right: none;
}

.paint-row {
  border-bottom: 1px solid #3f4052;
  transition: background-color 0.2s;
}

.paint-row:hover {
  background-color: #282936;
}

.paint-row:last-child {
  border-bottom: none;
}

.paint-cell {
  padding: 10px 8px;
  text-align: center;
  color: #b9bac7;
  font-size: 0.85rem;
  border-right: 1px solid #3f4052;
}

.paint-cell:last-child {
  border-right: none;
}

.citadel-cell {
  color: #ffc107;
  font-weight: 500;
}

.ak-cell {
  color: #90caf9;
  font-weight: 500;
}

.vallejo-cell {
  color: #ce93d8;
  font-weight: 500;
}

.match-cell {
  text-align: center;
  padding: 10px 8px;
}

.match-score {
  background-color: #3d5a80;
  color: #90caf9;
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: help;
}

.votes-cell {
  text-align: center;
  padding: 8px 4px;
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.vote-btn {
  background-color: transparent;
  border: 1px solid #555;
  color: #888;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 40px;
}

.vote-btn:hover:not(:disabled) {
  border-color: #d4af37;
  color: #d4af37;
  background-color: rgba(212, 175, 55, 0.1);
}

.vote-btn.voted {
  background-color: #d4af37;
  color: #1a1a2e;
  border-color: #d4af37;
  font-weight: bold;
}

.vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vote-btn span {
  font-weight: 600;
  min-width: 20px;
}

/* Inline colour swatch (hex dot next to paint name) */
.paint-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.25);
  vertical-align: middle;
  margin-right: 5px;
  flex-shrink: 0;
  cursor: help;
}

/* Paint type label (Base / Layer / Contrast / Shade) */
.paint-type {
  color: #888;
  font-size: 0.72rem;
  margin-left: 4px;
}

/* ΔE-based match badge — embedded inline in AK / Vallejo cells */
.match-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
  white-space: nowrap;
}

.match-exact { background-color: #0d3320; color: #56e887; border: 1px solid #1a6640; }
.match-close { background-color: #1a4a1a; color: #7ece7a; border: 1px solid #2e7a2e; }
.match-good  { background-color: #3a3000; color: #ffd740; border: 1px solid #806800; }
.match-fair  { background-color: #3a1a00; color: #ff9840; border: 1px solid #804000; }
.match-poor  { background-color: #3a0000; color: #ff6060; border: 1px solid #800000; }

/* ============ RECIPE FILTER BAR ============ */

.recipe-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 20px;
  background-color: #21222d;
  border-bottom: 1px solid #3f4052;
  align-items: center;
}

.recipe-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.recipe-filter-label {
  color: #b9bac7;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-right: 4px;
}

.recipe-filter-btn {
  background-color: #2a2b36;
  border: 1px solid #3f4052;
  color: #b9bac7;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.recipe-filter-btn:hover {
  border-color: #d4af37;
  color: #d4af37;
  background-color: rgba(212, 175, 55, 0.08);
}

.recipe-filter-btn.active {
  background-color: #d4af37;
  border-color: #d4af37;
  color: #1a1a2e;
  font-weight: 700;
}

@media (max-width: 768px) {
  .recipe-filter-bar {
    padding: 10px 12px;
    gap: 10px;
  }
  .recipe-filter-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
  .scheme-tab {
    flex: 0 0 calc(50% - 4px);
  }
}

/* ============ ΔE LEGEND TABLE ============ */

.delta-e-legend {
  max-width: 1100px;
  margin: 24px auto 0 auto;
  padding: 18px 20px;
  background-color: #1a1b24;
  border: 1px solid #3f4052;
  border-radius: 6px;
  box-sizing: border-box;
}

.legend-title {
  color: #d4af37;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legend-text {
  color: #b9bac7;
  font-size: 0.84rem;
  line-height: 1.65;
  margin: 0 0 16px 0;
}

.legend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.legend-table th {
  color: #888;
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid #3f4052;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.legend-table td {
  padding: 7px 10px;
  color: #b9bac7;
  border-bottom: 1px solid #252632;
  vertical-align: middle;
}

.legend-table tr:last-child td {
  border-bottom: none;
}

.legend-de {
  font-family: 'Courier New', monospace;
  color: #d4af37;
  font-weight: 600;
  white-space: nowrap;
  width: 60px;
}

@media (max-width: 768px) {
  .legend-table th:nth-child(4),
  .legend-table td:nth-child(4) { display: none; }
  .legend-table th:nth-child(3),
  .legend-table td:nth-child(3) { display: none; }
}

.like-btn {
  border-color: #28a745;
  color: #28a745;
}

.like-btn:hover:not(:disabled) {
  border-color: #28a745;
  color: #28a745;
  background-color: rgba(40, 167, 69, 0.1);
}

.like-btn.voted {
  background-color: #28a745;
  color: #fff;
}

.dislike-btn {
  border-color: #dc3545;
  color: #dc3545;
}

.dislike-btn:hover:not(:disabled) {
  border-color: #dc3545;
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.dislike-btn.voted {
  background-color: #dc3545;
  color: #fff;
}

@media (max-width: 768px) {
  .paint-table {
    font-size: 0.75rem;
  }

  .paint-table th,
  .paint-table td {
    padding: 8px 4px;
  }

  .vote-btn {
    padding: 3px 5px;
    min-width: 32px;
    font-size: 0.7rem;
  }

  .recipe-header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .recipe-badges {
    justify-content: flex-start;
    width: 100%;
  }

  .paint-cell {
    word-wrap: break-word;
  }
}

/* ============================================================
   ABOUT TAB — Warhammer 40K Datasheet Layout
   ============================================================ */

.about-datasheet {
  max-width: 900px;
  margin: 0 auto;
  border: 2px solid #5a3a1a;
  border-radius: 4px;
  overflow: hidden;
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: #1e1e2e;
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
}

/* --- Header --- */
.about-header {
  background: linear-gradient(135deg, #6b0f0f 60%, #8b1a1a 100%);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: 130px;
  position: relative;
  overflow: hidden;
}

.about-header-text {
  padding: 20px 24px;
  flex: 1;
  z-index: 1;
}

.about-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
  margin-bottom: 16px;
  line-height: 1.1;
}

.about-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.about-stat {
  background: #e8d5a3;
  min-width: 52px;
  padding: 4px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* top-left & bottom-right: 90° sharp | top-right & bottom-left: chamfered */
  clip-path: polygon(
    0 0,
    calc(100% - 9px) 0,
    100% 9px,
    100% 100%,
    9px 100%,
    0 calc(100% - 9px)
  );
  filter: drop-shadow(0 0 1.5px #8b6914) drop-shadow(0 0 1px #8b6914);
}

.about-stat-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: #3a2000;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}

.about-stat-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #1a0a00;
  line-height: 1.1;
}

.about-header-image {
  width: 160px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  clip-path: polygon(20% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.about-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* --- Body --- */
.about-body {
  display: grid;
  grid-template-columns: 58% 42%;
  border-top: 3px solid #5a3a1a;
}

.about-col-left {
  border-right: 2px solid #3f4052;
  padding: 0 0 16px 0;
}

.about-col-right {
  padding: 0 0 16px 0;
  display: flex;
  flex-direction: column;
}

/* --- Section headers (brown bar) --- */
.about-section-header {
  background: linear-gradient(90deg, #5a3a1a, #7a5022);
  color: #e8d5a3;
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #8b6914;
}

/* --- Skills table --- */
.about-skills-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.about-skills-table thead tr {
  background: #2a2a3e;
  border-bottom: 1px solid #5a3a1a;
}

.about-skills-table th {
  color: #d4af37;
  padding: 6px 14px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-skills-table tbody tr {
  border-bottom: 1px solid #2a2a3e;
  transition: background 0.15s;
}

.about-skills-table tbody tr:hover {
  background: rgba(212, 175, 55, 0.07);
}

.about-skills-table td {
  padding: 6px 14px;
  color: #d0d0e0;
  vertical-align: middle;
}

.about-skills-table td:first-child {
  color: #d0d0e0;
  font-size: 0.85rem;
}

/* --- XP pip bar --- */
.xp-bar {
  display: flex;
  gap: 4px;
  align-items: center;
}

.xp-pip {
  width: 14px;
  height: 14px;
  border: 2px solid #8b6914;
  border-radius: 2px;
  background: transparent;
  flex-shrink: 0;
}

.xp-pip.filled {
  background: #d4af37;
  box-shadow: 0 0 4px rgba(212, 175, 55, 0.5);
}

/* Tooltip font size override for About stats */
.tooltip-inner {
  font-size: 0.8em;
}

/* --- About Me text block --- */
.about-text-block {
  padding: 14px 16px;
  flex: 1;
}

.about-text-block p {
  font-size: 0.88rem;
  color: #c8c8d8;
  line-height: 1.65;
  margin-bottom: 10px;
}

.about-text-block p:last-child {
  margin-bottom: 0;
}

.about-contact-link {
  color: #d4af37;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
  transition: border-color 0.2s;
}

.about-contact-link:hover {
  color: #f0cc5a;
  border-bottom-color: #f0cc5a;
}

/* --- Footer --- */
.about-footer {
  background: #161622;
  border-top: 3px solid #5a3a1a;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  font-size: 0.78rem;
  flex-wrap: wrap;
}

.about-footer-keywords {
  flex: 1;
  color: #c8c8d8;
  min-width: 0;
}

.about-footer-faction {
  flex: 2;
  color: #c8c8d8;
  min-width: 0;
}

.about-footer-label {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #e8d5a3;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.about-footer-icon {
  color: #d4af37;
  font-size: 1.2rem;
  padding-top: 6px;
  flex-shrink: 0;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .about-name {
    font-size: 1.15rem;
    letter-spacing: 1px;
  }

  .about-header-image {
    width: 100px;
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%);
  }

  .about-stat {
    min-width: 42px;
    padding: 3px 6px;
  }

  .about-stat-value {
    font-size: 0.9rem;
  }

  .about-body {
    grid-template-columns: 1fr;
  }

  .about-col-left {
    border-right: none;
    border-bottom: 2px solid #3f4052;
  }

  .about-footer {
    flex-direction: column;
    gap: 8px;
  }

  .about-footer-icon {
    display: none;
  }
}
