/* PayrollEx — Blog Styles */

/* ── Article Layout ── */
.article-hero {
  padding: 120px 0 56px;
  border-bottom: 1px solid var(--border-subtle);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.article-series {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
a.article-series:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-meta-sep { color: var(--border); }
.article-date {
  font-size: 13px;
  color: var(--text-tertiary);
}
.article-readtime {
  font-size: 13px;
  color: var(--text-tertiary);
}
.article-hero h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 20px;
  max-width: 900px;
}
.article-hero .lead {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.article-country-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: 4px;
}
.country-tag img {
  width: 14px;
  height: 10px;
  object-fit: cover;
  border-radius: 1px;
}

/* ── Article Body ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
  padding: 64px 0 100px;
}
.article-body {
  min-width: 0;
}
.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 48px 0 16px;
  color: var(--text);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.article-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
  color: var(--text);
}
.article-body p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 20px;
}
.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin-bottom: 20px;
}
.article-body li {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}
.article-body strong { color: var(--text); font-weight: 600; }
.article-body a:not(.btn-accent):not(.btn-primary):not(.btn-secondary) { color: var(--accent); text-decoration: none; }
.article-body a:not(.btn-accent):not(.btn-primary):not(.btn-secondary):hover { text-decoration: underline; }
.article-body em { color: var(--text-secondary); font-style: italic; }

/* ── Code blocks ── */
.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.article-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent);
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
}

/* ── Data tables ── */
.article-body .data-table-wrap {
  overflow-x: auto;
  margin-bottom: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.article-body th {
  background: var(--surface2);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.5;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: var(--row-hover); }

/* ── Callout blocks ── */
.callout {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.callout p { font-size: 15px; margin-bottom: 0; }
.callout-green { border-left-color: var(--green); }
.callout-blue { border-left-color: var(--blue); }

/* ── Article Sidebar ── */
.article-sidebar {
  position: sticky;
  top: 88px;
}
.sidebar-section {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a {
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  line-height: 1.4;
}
.toc-list a:hover { color: var(--text); }
.toc-list a.active { color: var(--accent); }

/* ── Share buttons ── */
.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface2);
  border: 1px solid var(--border-subtle);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.share-btn:hover { border-color: var(--border); color: var(--text); }

/* ── Article CTA ── */
.article-cta {
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 48px 0 0;
}
.article-cta h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.article-cta p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ── Prev/Next nav ── */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}
.article-nav-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: border-color 0.2s;
  display: block;
}
.article-nav-item:hover { border-color: var(--border); }
.article-nav-dir {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.article-nav-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}
.article-nav-item:hover .article-nav-title { color: var(--text); }
.article-nav-next { text-align: right; }

/* ── Blog index cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.blog-card:hover { border-color: var(--border); }
.blog-card-coming {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.blog-card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}
.blog-card-date {
  font-size: 12px;
  color: var(--text-tertiary);
}
.blog-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text);
}
.blog-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.blog-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.blog-tag {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--surface2);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: 3px;
}
.blog-card-read {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.coming-soon-chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--surface2);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 4px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 48px 0 64px;
  }
  .article-sidebar { position: static; display: none; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-next { text-align: left; }
}
@media (max-width: 640px) {
  .article-hero { padding: 96px 0 40px; }
  .article-hero h1 { font-size: 28px; }
  .blog-grid { grid-template-columns: 1fr; }
}
