.card.parchment {
  background:#f4e7c5;
  border:4px solid #a67c52;
  padding:24px;
  max-width:760px;
  margin:24px auto;
  font-family:Georgia,serif;
}
.card.parchment .section {
  border:2px inset #c4a484;
  padding:12px;
  margin-top:12px;
}
.breadcrumbs {
  margin-bottom:12px;
  font-size:0.9em;
}

/* Progressive unlocking styles from Patch 22 */
.card-tile.locked {
  opacity: 0.6;
  position: relative;
}
.lock-hint {
  font-size: 0.8rem;
  color: #888;
}

/* Enhanced Knowledge Cards UI - Responsive Design */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.letter-navigation {
  gap: 0.5rem;
}

.letter-navigation button {
  transition: all 0.2s ease;
  min-width: 40px;
}

.letter-navigation button.active {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

.letter-navigation button:hover:not(.active) {
  background-color: #e7f1ff;
  border-color: #0d6efd;
}

/* Mobile swipeable navigation */
.letter-navigation-mobile {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  position: relative;
}

.letter-navigation-mobile::-webkit-scrollbar {
  height: 6px;
}

.letter-navigation-mobile::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.letter-navigation-mobile::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.letter-navigation-mobile::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Swipe hint animation */
.swipe-hint {
  position: absolute;
  top: -25px;
  right: 10px;
  font-size: 12px;
  color: #6c757d;
  animation: pulse 2s infinite;
  pointer-events: none;
  z-index: 10;
}

.swipe-hint.hidden {
  display: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Card filtering */
.card-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-item.filtered-out {
  display: none !important;
}

/* Search results */
#globalSearchResults {
  max-height: 400px;
  overflow-y: auto;
  border-radius: 0.25rem;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item a {
  color: inherit;
}

.search-result-item strong {
  color: #0d6efd;
}

/* Loading skeleton animation */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 0.25rem;
  height: 200px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* See More button */
.see-more-btn {
  transition: all 0.3s ease;
  position: relative;
}

.see-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.see-more-btn i {
  transition: transform 0.3s ease;
}

.see-more-btn:hover i {
  transform: translateY(3px);
}

/* Responsive grid adjustments */
@media (max-width: 575px) {
  .row-cols-1 > * {
    width: 100%;
  }
  
  .row-cols-sm-2 > * {
    width: 50%;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .row-cols-sm-2 > * {
    flex: 0 0 auto;
    width: 50%;
  }
}

@media (min-width: 768px) {
  .row-cols-md-3 > * {
    flex: 0 0 auto;
    width: 33.333333%;
  }
}

@media (min-width: 992px) {
  .row-cols-lg-4 > * {
    flex: 0 0 auto;
    width: 25%;
  }
}

/* Domain section spacing */
.domain-section {
  scroll-margin-top: 100px;
}

/* Input groups styling */
.input-group-lg .form-control {
  border-radius: 0.3rem 0 0 0.3rem;
}

.input-group-lg .btn {
  border-radius: 0 0.3rem 0.3rem 0;
}

/* Card body content */
.card-body .card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.card-body .card-text {
  line-height: 1.4;
}

/* Badge styling */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* Smooth scrolling for the page */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.letter-btn:focus,
.letter-btn-mobile:focus,
.letter-all:focus,
.letter-all-mobile:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .letter-navigation,
  .letter-navigation-mobile,
  .see-more-btn,
  .input-group,
  .swipe-hint {
    display: none !important;
  }
  
  .card-item {
    display: block !important;
    page-break-inside: avoid;
  }
}
