/* Apps article pages - fully self-contained styles */
/* Used together with light-page class from main style.css */

/* Page layout */
.apps-article .example-detail {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.apps-article {
  --accent: #0ea5a8;
}

.apps-article .site-header .links a {
  color: #475569;
}

.apps-article .site-header .links a:hover {
  color: #0ea5a8;
}

/* Hero section */
.apps-article .page-hero {
  background: linear-gradient(135deg, rgba(14,165,168,0.08) 0%, rgba(159,194,107,0.08) 100%);
  border-radius: 1rem;
  padding: 2rem 2.2rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(14,165,168,0.15);
}

.apps-article .page-hero h1 {
  color: #0ea5a8;
  background: linear-gradient(135deg, #0ea5a8 0%, #059669 50%, #0ea5a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
}

.apps-article .page-hero .tile-eyebrow {
  color: #0ea5a8;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.apps-article .page-hero .lead-light {
  color: #475569;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

/* Content cards */
.apps-article .example-card {
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 0.9rem;
  padding: 1.5rem 1.8rem;
  box-shadow: 0 4px 20px rgba(15,23,42,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.apps-article .example-card:hover {
  box-shadow: 0 8px 30px rgba(15,23,42,0.1);
}

.apps-article .example-card h2 {
  color: #1e293b;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.8rem 0;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid rgba(14,165,168,0.3);
}

.apps-article .example-card p {
  color: #475569;
  line-height: 1.7;
  margin: 0 0 0.8rem 0;
}

.apps-article .example-card ul,
.apps-article .example-card ol {
  color: #475569;
  line-height: 1.7;
  margin: 0.5rem 0;
  padding-left: 1.4rem;
}

.apps-article .example-card li {
  margin: 0.4rem 0;
}

.apps-article .example-card strong {
  color: #1e293b;
  font-weight: 600;
}

/* Special accent cards */
.apps-article .example-card.accent-motivation {
  background: linear-gradient(135deg, rgba(14,165,168,0.06) 0%, rgba(255,255,255,1) 100%);
  border-left: 4px solid #0ea5a8;
}

.apps-article .example-card.accent-model {
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(255,255,255,1) 100%);
  border-left: 4px solid #6366f1;
}

.apps-article .example-card.accent-model h2 {
  border-bottom-color: rgba(99,102,241,0.3);
}

.apps-article .example-card.accent-code {
  background: linear-gradient(135deg, rgba(245,158,11,0.06) 0%, rgba(255,255,255,1) 100%);
  border-left: 4px solid #f59e0b;
}

.apps-article .example-card.accent-code h2 {
  border-bottom-color: rgba(245,158,11,0.3);
}

.apps-article .example-card.accent-results {
  background: linear-gradient(135deg, rgba(16,185,129,0.06) 0%, rgba(255,255,255,1) 100%);
  border-left: 4px solid #10b981;
}

.apps-article .example-card.accent-results h2 {
  border-bottom-color: rgba(16,185,129,0.3);
}

/* Tables */
.apps-article .example-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.95rem;
}

.apps-article .example-table th,
.apps-article .example-table td {
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(148,163,184,0.25);
  text-align: left;
}

.apps-article .example-table.has-ci th:nth-child(4),
.apps-article .example-table.has-ci td:nth-child(4) {
  white-space: nowrap;
  min-width: 8rem;
}

.apps-article .example-table thead {
  background: linear-gradient(135deg, rgba(14,165,168,0.1) 0%, rgba(99,102,241,0.08) 100%);
}

.apps-article .example-table th {
  font-weight: 600;
  color: #1e293b;
}

.apps-article .example-table tbody tr:hover {
  background: rgba(14,165,168,0.04);
}

.apps-article .example-table .winner {
  color: #059669;
  font-weight: 600;
}

/* Code blocks */
.apps-article pre {
  background: #1e293b;
  border-radius: 0.6rem;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin: 0.8rem 0;
  border: 1px solid rgba(148,163,184,0.2);
}

/* Output blocks - same dark style as code, slightly muted */
.apps-article pre.output {
  background: #0f172a;
  border-color: rgba(148,163,184,0.15);
}

.apps-article pre.output code {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.5;
}

.apps-article pre code {
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.apps-article code {
  background: rgba(14,165,168,0.1);
  color: #0d9488;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.9em;
}

.apps-article pre code {
  background: none;
  color: #e2e8f0;
  padding: 0;
}

/* Math blocks */
.apps-article .math-block {
  background: rgba(99,102,241,0.05);
  border-radius: 0.5rem;
  padding: 1rem 1.2rem;
  margin: 0.8rem 0;
  border-left: 3px solid rgba(99,102,241,0.4);
  overflow-x: auto;
}

/* Download links */
.apps-article .download-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.apps-article .example-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #0ea5a8 0%, #059669 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.apps-article .example-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14,165,168,0.3);
}

/* Back link */
.apps-article .back-link {
  margin: 0 0 0.5rem 0;
}

.apps-article .back-link a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.apps-article .back-link a:hover {
  color: #0ea5a8;
}

/* Footer */
.apps-article .site-footer {
  background: #f1f5f9;
  border-top: 1px solid rgba(148,163,184,0.2);
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 640px) {
  .apps-article .page-hero {
    padding: 1.5rem;
  }

  .apps-article .page-hero h1 {
    font-size: 1.8rem;
  }

  .apps-article .example-card {
    padding: 1.2rem;
  }
}
