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

:root {
  --background: hsl(0, 0%, 98%);
  --foreground: hsl(20, 14.3%, 4.1%);
  --primary: hsl(207, 90%, 54%);
  --primary-dark: hsl(207, 85%, 45%);
  --border: hsl(20, 5.9%, 90%);
  --muted: hsl(60, 4.8%, 95.9%);
  --muted-foreground: hsl(25, 5.3%, 32%);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Site Message Banner */
.site-message-banner {
  padding: 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.site-msg-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-msg-text {
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 500;
}

.site-msg-text p {
  margin: 0;
  display: inline;
}

.site-msg-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.site-msg-cta:hover {
  background-color: rgba(0,0,0,0.05);
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  font-size: 1.25rem;
  font-weight: 700;
}

.logo svg {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.nav .cta-button {
  position: absolute;
  right: 1.5rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}

.cta-button {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}

.cta-button:hover {
  background: var(--primary-dark);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.breadcrumb-link {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 0.25rem;
  color: var(--border);
}

.breadcrumb-current {
  color: var(--foreground);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
}

/* Main Content */
.main {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 4rem;
}

.content-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.content-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.content-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  line-height: 1.3;
}

.content-id {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.content-body {
  padding: 2rem;
}

/* Technical Details Horizontal Bar with Dividers */
.tech-details-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  background: hsl(0, 0%, 97%);
  border-radius: 12px;
  border: 1px solid hsl(0, 0%, 90%);
  margin-bottom: 2rem;
  overflow: hidden;
}


.tech-detail-cell {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tech-detail-label span {
  white-space: nowrap;
}

.tech-detail-divider {
  width: 1px;
  background: hsl(0, 0%, 88%);
  align-self: stretch;
  flex-shrink: 0;
}

.tech-detail-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.tech-detail-label svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.tech-detail-value-large {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.3;
}

.tech-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.tech-detail-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.tech-detail-link svg {
  flex-shrink: 0;
}

.tech-detail-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

/* Meta badges - compact rounded style */
.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid;
  white-space: nowrap;
}

.meta-badge-blue {
  background: hsl(207, 90%, 95%);
  color: hsl(207, 90%, 35%);
  border-color: hsl(207, 90%, 85%);
}

.meta-badge-green {
  background: hsl(140, 70%, 95%);
  color: hsl(140, 70%, 30%);
  border-color: hsl(140, 70%, 85%);
}

.meta-badge-orange {
  background: hsl(30, 100%, 95%);
  color: hsl(30, 100%, 35%);
  border-color: hsl(30, 100%, 85%);
}

.meta-badge-purple {
  background: hsl(270, 75%, 95%);
  color: hsl(270, 75%, 35%);
  border-color: hsl(270, 75%, 85%);
}

.meta-badge-red {
  background: hsl(0, 75%, 95%);
  color: hsl(0, 75%, 40%);
  border-color: hsl(0, 75%, 85%);
}

.meta-badge-gray {
  background: hsl(220, 10%, 95%);
  color: hsl(220, 10%, 35%);
  border-color: hsl(220, 10%, 85%);
}

/* Legacy badge classes for backward compatibility */
.tech-details {
  background: hsl(0, 0%, 97%);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.tech-detail-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

.badge-blue {
  background: hsl(207, 90%, 95%);
  color: hsl(207, 90%, 35%);
  border: 1px solid hsl(207, 90%, 85%);
}

.badge-green {
  background: hsl(120, 75%, 95%);
  color: hsl(120, 75%, 35%);
  border: 1px solid hsl(120, 75%, 85%);
}

.badge-orange {
  background: hsl(30, 100%, 95%);
  color: hsl(30, 100%, 40%);
  border: 1px solid hsl(30, 100%, 85%);
}

.badge-purple {
  background: hsl(270, 75%, 95%);
  color: hsl(270, 75%, 35%);
  border: 1px solid hsl(270, 75%, 85%);
}

.badge-red {
  background: hsl(0, 75%, 95%);
  color: hsl(0, 75%, 40%);
  border: 1px solid hsl(0, 75%, 85%);
}

.badge-gray {
  background: hsl(0, 0%, 95%);
  color: hsl(0, 0%, 35%);
  border: 1px solid hsl(0, 0%, 85%);
}

/* Content Sections */
.section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.section-content {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* HTML Content Styling within section-content */
.section-content h1,
.section-content h2,
.section-content h3,
.section-content h4 {
  color: var(--foreground);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.section-content h1 { font-size: 1.5rem; }
.section-content h2 { font-size: 1.25rem; }
.section-content h3 { font-size: 1.1rem; }
.section-content h4 { font-size: 1rem; }

.section-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.section-content ul,
.section-content ol {
  margin-left: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.8;
  padding-left: 0.5rem;
}

.section-content li {
  margin-bottom: 0.5rem;
}

.section-content strong,
.section-content b {
  font-weight: 600;
  color: var(--foreground);
}

.section-content em,
.section-content i {
  font-style: italic;
}

.section-content a {
  color: var(--primary);
  text-decoration: underline;
}

.section-content a:hover {
  color: var(--primary-dark);
}

.section-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--muted);
  font-style: italic;
}

.section-content code {
  background: var(--muted);
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875em;
}

.section-content pre {
  background: var(--muted);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.section-content pre code {
  background: none;
  padding: 0;
}

.section-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.section-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.section-content th,
.section-content td {
  padding: 0.5rem;
  border: 1px solid var(--border);
  text-align: left;
}

.section-content th {
  background: var(--muted);
  font-weight: 600;
}

.section-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

/* Q&A Section */
.qa-section {
  background: hsl(207, 90%, 98%);
  border: 1px solid hsl(207, 90%, 90%);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.qa-section h2 {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.qa-section h3 {
  color: var(--foreground);
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.qa-section p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* Enhanced Resources Section */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.resource-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--foreground);
  background: white;
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resource-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: hsl(0, 0%, 95%);
  overflow: hidden;
}

.resource-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.resource-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-size: 2rem;
  background: hsl(0, 0%, 97%);
}

.resource-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.resource-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: var(--foreground);
}

.resource-description {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  flex: 1;
}

.resource-type {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Change History Section */
.metadata-info {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.metadata-item strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Collapsible Section */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.5rem 0;
  user-select: none;
}

.collapsible-header:hover .toggle-icon {
  color: var(--primary);
}

.toggle-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.toggle-icon svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

.collapsible-header.expanded .toggle-icon svg {
  transform: rotate(180deg);
}

.collapsible-content {
  display: none;
  margin-top: 1rem;
}

.collapsible-content.expanded {
  display: block;
}

.change-history-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.change-entry {
  background: hsl(0, 0%, 99%);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid hsl(0, 0%, 96%);
}

.change-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid hsl(0, 0%, 94%);
}

.change-date {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.change-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  background: hsl(120, 40%, 97%);
  color: hsl(120, 60%, 35%);
  border: none;
}

.change-field {
  margin-bottom: 1.25rem;
}

.change-field:last-child {
  margin-bottom: 0;
}

.field-name {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.field-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.previous-value,
.new-value {
  background: transparent;
  padding: 0.875rem;
  border-radius: 6px;
  border: none;
  background: hsl(0, 0%, 99%);
}

.value-label {
  display: block;
  font-size: 0.75rem;
  color: hsl(0, 0%, 45%);  /* gray-500 equivalent */
  margin-bottom: 0.25rem;
  font-weight: normal;
}

.value-content {
  font-size: 0.8125rem;
  line-height: 1.6;
  word-break: break-word;
}

.value-content ul,
.value-content ol {
  margin-left: 1.5rem;
  padding-left: 0.5rem;
}

.value-content li {
  margin-bottom: 0.5rem;
}

/* Light gray borders for tables inside Change History section */
.value-content table {
  border: 1px solid hsl(0, 0%, 94%) !important;
}

.value-content th,
.value-content td {
  border: 1px solid hsl(0, 0%, 94%) !important;
}

.previous-value .value-content {
  background: hsl(0, 95%, 97%);  /* bg-red-50 equivalent */
  color: hsl(0, 84%, 40%);  /* text-red-800 equivalent */
  border: 1px solid hsl(0, 86%, 90%);  /* border-red-200 equivalent */
  border-radius: 6px;
  padding: 0.75rem;
}

.new-value .value-content {
  background: hsl(142, 78%, 97%);  /* bg-green-50 equivalent */
  color: hsl(142, 70%, 30%);  /* text-green-800 equivalent */
  border: 1px solid hsl(142, 69%, 85%);  /* border-green-200 equivalent */
  border-radius: 6px;
  padding: 0.75rem;
}

.no-history {
  text-align: center;
  padding: 2rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Related Items */
.related-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.related-item-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--foreground);
  transition: background 0.2s, transform 0.2s;
  background: white;
}

.related-item-card:hover {
  background: var(--muted);
  transform: translateX(4px);
}

.related-icon {
  font-size: 1.25rem;
}

.related-id {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
}

.arrow-icon {
  color: var(--muted-foreground);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, hsl(207, 90%, 98%), hsl(207, 90%, 95%));
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.cta-description {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: hsl(0, 0%, 97%);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.footer-link {
  display: block;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--foreground);
}

.mobile-menu-btn:hover {
  opacity: 0.7;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  z-index: 49;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav .nav-link,
.mobile-nav .cta-button {
  display: block;
  padding: 0.75rem;
  text-align: left;
  border-radius: 6px;
}

.mobile-nav .cta-button {
  text-align: center;
  margin-top: 0.5rem;
}

/* Responsive - 2 column layout for tablets */
@media (max-width: 1100px) {
  .tech-details-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tech-detail-divider {
    display: none;
  }
  
  .tech-detail-cell {
    min-width: unset;
    border-bottom: 1px solid hsl(0, 0%, 88%);
    border-right: 1px solid hsl(0, 0%, 88%);
  }
  
  .tech-detail-cell:nth-child(even) {
    border-right: none;
  }
  
  .tech-detail-cell:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

/* 1 column layout for mobile */
@media (max-width: 768px) {
  .header-content {
    display: flex;
    justify-content: space-between;
  }
  
  .nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .main {
    padding: 1.5rem 1rem;
  }
  
  .tech-details-bar {
    grid-template-columns: 1fr;
  }
  
  .tech-detail-cell {
    border-right: none;
    border-bottom: 1px solid hsl(0, 0%, 88%);
  }
  
  .tech-detail-cell:last-child {
    border-bottom: none;
  }
  
  .tech-detail-value-large {
    font-size: 0.95rem;
  }
  
  .tech-details {
    grid-template-columns: 1fr;
  }
  
  .content-title {
    font-size: 1.5rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-button {
    width: 100%;
  }
  
  .resource-grid {
    grid-template-columns: 1fr;
  }
  
  .related-items {
    grid-template-columns: 1fr;
  }
  
  .metadata-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  .field-values {
    grid-template-columns: 1fr;
  }
}

