/* Visual Detail Page Styling - Light Theme to match homepage */
/* Override all dark theme styles */
:root {
  --bg: #ffffff !important;
  --card: #ffffff !important;
  --ink: #333333 !important;
  --muted: #666666 !important;
  --accent: #8968CD !important;
  --bad: #ef4444 !important;
  --good: #10b981 !important;
  --brand-purple: #8968CD;
  --brand-blue: #0D4F8B;
  --brand-light-blue: #B9D3EE;
  --brand-lavender: #E6E8FA;
  --bg-light: #f4f4f4;
  --bg-white: #ffffff;
  --text-primary: #333;
  --text-secondary: #666;
}

/* Force body background */
body {
  background: linear-gradient(to bottom, #ffffff, #f4f4f4) !important;
  color: #333 !important;
}

/* Article container */
.visual {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2rem;
  background: white !important;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Title */
.visual h1 {
  color: #0D4F8B !important;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.visual .intro {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #666 !important;
  margin-bottom: 2rem;
}

/* Table of Contents */
.toc {
  background: #E6E8FA !important;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 2px solid #B9D3EE;
}

.toc h2 {
  margin-top: 0;
  color: #0D4F8B !important;
  font-size: 1.25rem;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.toc li {
  margin: 0.5rem 0;
}

.toc a {
  color: #0D4F8B !important;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.toc a:hover {
  color: #8968CD !important;
}

/* Section headers */
.visual h2 {
  color: #0D4F8B !important;
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  border-bottom: 3px solid #B9D3EE;
  padding-bottom: 0.5rem;
}

.visual h3 {
  color: #0D4F8B !important;
  font-size: 1.5rem;
  margin-top: 2rem;
}

.visual h4 {
  color: #0D4F8B !important;
  font-size: 1.25rem;
}

/* Examples section */
.examples {
  margin: 2rem 0;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.fig {
  background: white !important;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid #B9D3EE;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fig img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

.fig figcaption {
  margin-top: 0.75rem;
  color: #666 !important;
  font-size: 0.9375rem;
  text-align: center;
}

/* Do's and Don'ts */
.good li {
  color: #333 !important;
  margin: 1rem 0;
  padding: 1rem;
  background: #d1fae5 !important;
  border-left: 4px solid #10b981;
  border-radius: 8px;
  list-style: none;
}

.good li strong {
  color: #065f46 !important;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.good li p {
  margin: 0;
  color: #064e3b !important;
  line-height: 1.6;
}

.bad li {
  color: #333 !important;
  margin: 1rem 0;
  padding: 1rem;
  background: #fee2e2 !important;
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  list-style: none;
}

.bad li strong {
  color: #991b1b !important;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.bad li p {
  margin: 0;
  color: #7f1d1d !important;
  line-height: 1.6;
}

/* Use cases */
.visual ul {
  padding-left: 0;
}

.visual ul li {
  margin: 1rem 0;
  padding: 1rem;
  background: #f4f4f4 !important;
  border-left: 4px solid #8968CD;
  border-radius: 8px;
  list-style: none;
}

.visual ul li strong {
  color: #0D4F8B !important;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.visual ul li p {
  margin: 0;
  color: #666 !important;
  line-height: 1.6;
}

/* Story help / Note */
.story-help {
  background: linear-gradient(135deg, #0D4F8B, #8968CD) !important;
  color: white !important;
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
}

.story-help h2 {
  color: white !important;
  border: none;
  margin-top: 0;
}

.story-help p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin: 0;
  color: white !important;
}

.note {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #8968CD;
  background: #E6E8FA !important;
  border-radius: 8px;
  color: #0D4F8B !important;
  font-weight: 600;
}

/* Common Mistakes Section */
.common-mistakes {
  margin-top: 2rem;
  padding: 2rem;
  background: white !important;
  border-radius: 14px;
  border: 2px solid #B9D3EE;
}

.common-mistakes h2 {
  margin-top: 0;
  color: #0D4F8B !important;
}

.mistakes-intro {
  color: #666 !important;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.mistakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.mistake-card {
  background: #fff5f5 !important;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #fecaca;
  transition: all 0.3s ease;
}

.mistake-card:hover {
  border-color: #ef4444;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.mistake-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.mistake-card h4 {
  margin: 0 0 1rem;
  color: #dc2626 !important;
  font-size: 1.2rem;
}

.mistake-card p {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: #666 !important;
}

.mistake-card strong {
  color: #333 !important;
}

/* Accessibility Section */
.accessibility-section {
  margin-top: 2rem;
  padding: 2rem;
  background: white !important;
  border-radius: 14px;
  border: 2px solid #B9D3EE;
}

.accessibility-section h2 {
  margin-top: 0;
  color: #0D4F8B !important;
}

.accessibility-intro {
  color: #666 !important;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.accessibility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .accessibility-grid {
    grid-template-columns: 1fr;
  }
}

.accessibility-card {
  background: #E6E8FA !important;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #B9D3EE;
  transition: all 0.3s ease;
}

.accessibility-card:hover {
  border-color: #8968CD;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(137, 104, 205, 0.15);
}

.accessibility-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.accessibility-card h4 {
  margin: 0 0 1rem;
  color: #0D4F8B !important;
  font-size: 1.2rem;
}

.accessibility-content p {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: #333 !important;
}

.accessibility-content ul {
  margin: 0.5rem 0 1rem 1.2rem;
  padding: 0;
}

.accessibility-content li {
  margin: 0.4rem 0;
  line-height: 1.6;
  color: #666 !important;
}

.accessibility-content strong {
  color: #333 !important;
}

.color-palette {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.color-swatch {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  min-width: 80px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.example-text {
  background: white !important;
  padding: 1rem;
  border-radius: 8px;
  font-style: italic;
  color: #333 !important;
  margin-top: 0.5rem;
  border-left: 3px solid #8968CD;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.accessibility-resources {
  background: #E6E8FA !important;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #B9D3EE;
}

.accessibility-resources h4 {
  margin: 0 0 1rem;
  color: #0D4F8B !important;
}

.accessibility-resources ul {
  margin: 0;
  padding-left: 1.2rem;
}

.accessibility-resources li {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: #333 !important;
}

/* Related Visuals Section */
.related-visuals {
  margin-top: 3rem;
  padding: 2rem;
  background: white !important;
  border-radius: 14px;
  border: 2px solid #B9D3EE;
}

.related-visuals h2 {
  margin-top: 0;
  color: #0D4F8B !important;
}

.related-intro {
  color: #666 !important;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: #f4f4f4 !important;
  padding: 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: #333 !important;
  border: 2px solid #B9D3EE;
  transition: all 0.3s ease;
}

.related-card:hover {
  border-color: #8968CD;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(137, 104, 205, 0.15);
}

.related-header h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: #0D4F8B !important;
}

.related-desc {
  margin: 0 0 1rem;
  color: #666 !important;
  line-height: 1.6;
  flex-grow: 1;
}

.related-cta {
  color: #8968CD !important;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-card:hover .related-cta {
  gap: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  
  .visual {
    padding: 1rem;
  }
  
  .visual h1 {
    font-size: 2rem;
  }
}
