/* Escbase — Shared Article Styles (new-format posts) */
:root {
  --bg: #09090b;
  --card-bg: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #16a34a;
  --accent-blue: #60a5fa;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-green: #22c55e;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: #86efac; }

/* Layout */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Article Header */
.article-header { margin-bottom: 2.5rem; }

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .22);
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  color: #4ade80;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: .9rem;
}

.meta span {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Article Content */
.article-content {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: .75rem;
}

.article-content p { margin-bottom: 1.25rem; }
.article-content ul { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.article-content li { margin-bottom: .5rem; }

.article-content strong { color: var(--text); }

/* Highlight Boxes */
.highlight-box {
  background: linear-gradient(135deg, rgba(34, 197, 94, .12) 0%, rgba(96, 165, 250, .06) 100%);
  border: 1px solid rgba(34, 197, 94, .22);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.highlight-box h4 {
  color: #4ade80;
  font-size: 1.1rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.highlight-box-blue {
  background: linear-gradient(135deg, rgba(96, 165, 250, .12) 0%, rgba(96, 165, 250, .05) 100%);
  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.highlight-box-blue h4 {
  color: var(--accent-blue);
  font-size: 1.1rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.highlight-box-green {
  background: linear-gradient(135deg, rgba(34, 197, 94, .10) 0%, rgba(34, 197, 94, .04) 100%);
  border: 1px solid rgba(34, 197, 94, .20);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.highlight-box-green h4 {
  color: #4ade80;
  font-size: 1.1rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.highlight-box-yellow {
  background: linear-gradient(135deg, rgba(245, 158, 11, .10) 0%, rgba(245, 158, 11, .04) 100%);
  border: 1px solid rgba(245, 158, 11, .20);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.highlight-box-yellow h4 {
  color: var(--accent-yellow);
  font-size: 1.1rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.highlight-box-red {
  background: linear-gradient(135deg, rgba(239, 68, 68, .1) 0%, rgba(239, 68, 68, .05) 100%);
  border: 1px solid rgba(239, 68, 68, .2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.highlight-box-red h4 {
  color: var(--accent-red);
  font-size: 1.1rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Quote Block */
.quote-block {
  border-left: 4px solid var(--accent-yellow);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: rgba(245, 158, 11, .05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.tag {
  padding: .5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .85rem;
  color: var(--text-secondary);
}

/* Source Links */
.source-links {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.source-links h4 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: .75rem;
}

.source-links ul { padding-left: 1.5rem; }
.source-links li { margin-bottom: .35rem; }

/* Images */
.article-header img,
.article-content img,
.inline-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 1.5rem auto;
}

.article-header img,
.article-header .inline-image {
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

/* Inline code */
.article-content code {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .15rem .4rem;
  font-size: .88em;
  word-break: break-word;
}

/* Code blocks */
.article-content pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-content pre code {
  border: none;
  padding: 0;
  background: none;
  word-break: normal;
}

/* Table responsive */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.table-wrapper table {
  margin: 0;
  border: none;
  min-width: 480px;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; line-height: 1.25; }
  .container { padding: 1.25rem .85rem; }
  .article-content { font-size: 1rem; }
  .article-content h2 { font-size: 1.3rem; margin-top: 2rem; }
  .article-content h3 { font-size: 1.1rem; margin-top: 1.5rem; }
  .article-content ul { padding-left: 1.25rem; }
  .meta { gap: .75rem; font-size: .82rem; }
  .category-badge { font-size: .8rem; padding: .4rem .85rem; }
  .highlight-box,
  .highlight-box-blue,
  .highlight-box-green,
  .highlight-box-yellow,
  .highlight-box-red { padding: 1rem; margin: 1.5rem 0; }
  .highlight-box h4,
  .highlight-box-blue h4,
  .highlight-box-green h4,
  .highlight-box-yellow h4,
  .highlight-box-red h4 { font-size: 1rem; }
  .quote-block { padding: 1rem 1.15rem; margin: 1.5rem 0; }
  .source-links { padding: 1.15rem; }
  .article-header img,
  .article-header .inline-image {
    max-height: 220px !important;
    margin-top: .9rem !important;
  }
  .article-content img,
  .inline-image {
    max-height: 260px;
    object-fit: cover;
    object-position: center;
  }
  .tags { gap: .5rem; margin-top: 2rem; padding-top: 1.5rem; }
  .tag { padding: .4rem .85rem; font-size: .8rem; }
}

/* Video embeds - stable native player */
.video-container {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}
.video-container video,
.inline-video,
article video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
  border-radius: var(--radius-md);
  object-fit: contain;
}
.video-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
