/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --primary: #0F172A;
  --primary-fg: #F8FAFC;
  --accent: #2563EB;
  --accent-fg: #FFFFFF;
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --border: #E5E7EB;
  --text: #0F172A;
  --text-muted: #64748B;
  --radius: 0.5rem;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}
.logo {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}
.header-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.header-nav a:hover,
.header-nav .nav-active {
  color: var(--text);
}
.nav-active {
  font-weight: 500;
}
.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: var(--radius);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
}
.search-btn:hover {
  color: var(--text);
}
@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}
/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.5), transparent);
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 0 1.5rem 3rem;
  text-align: center;
}
.hero-category {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.75rem;
  font-weight: 500;
}
.hero-title {
  max-width: 48rem;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-fg);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: rgba(248, 250, 252, 0.7);
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
@media (min-width: 768px) {
  .hero {
    height: 420px;
  }
  .hero-title {
    font-size: 2.25rem;
  }
}
@media (min-width: 1024px) {
  .hero {
    height: 480px;
  }
  .hero-title {
    font-size: 3rem;
  }
}
/* ===== Breadcrumb ===== */
.breadcrumb-bar {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a:hover {
  color: var(--text);
}
.breadcrumb-current {
  color: var(--text);
}
/* ===== Article Layout ===== */
.article-layout {
  display: flex;
  gap: 3rem;
  padding-top: 4rem;
  padding-bottom: 3rem;
}
/* TOC */
.toc {
  display: none;
  width: 14rem;
  flex-shrink: 0;
}
.toc-inner {
  position: sticky;
  top: 5rem;
}
.toc-heading {
  margin-bottom: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.toc-list {
  list-style: none;
  border-left: 1px solid var(--border);
}
.toc-list li a {
  display: block;
  padding: 0.375rem 0 0.375rem 1rem;
  border-left: 2px solid transparent;
  margin-left: -1px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}
.toc-list li a:hover {
  color: var(--text);
}
.toc-list li a.toc-active {
  color: var(--text);
  font-weight: 500;
  border-left-color: var(--accent);
}
@media (min-width: 1024px) {
  .toc {
    display: block;
  }
  .article-layout {
    gap: 4rem;
  }
}
/* Article Content */
.article-content {
  flex: 1;
  min-width: 0;
  max-width: 720px;
}
.article-content section {
  scroll-margin-top: 5rem;
}
.article-content h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}
.article-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}
.article-content section + section {
  margin-top: 3rem;
}
.intro-text {
  font-size: 1.125rem;
  line-height: 1.75;
}
/* Key Takeaways */
.key-takeaways {
  margin: 2.5rem 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.key-takeaways-heading {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}
.key-takeaways ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.key-takeaways li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.bullet-accent {
  display: block;
  width: 0.375rem;
  height: 0.375rem;
  margin-top: 0.5rem;
  border-radius: 9999px;
  background: var(--accent);
  flex-shrink: 0;
}
.bullet-neutral {
  display: block;
  width: 0.375rem;
  height: 0.375rem;
  margin-top: 0.5rem;
  border-radius: 9999px;
  background: var(--border);
  flex-shrink: 0;
}
/* Callout */
.callout {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: var(--surface);
}
.callout p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
/* Article image */
.article-image {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius);
  object-fit: cover;
}
/* Content lists */
.content-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.content-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.content-list-numbered {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.content-list-numbered li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.content-list-numbered .num {
  flex-shrink: 0;
  font-weight: 500;
  color: var(--text);
}
/* Blockquote */
blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
}
blockquote p {
  font-style: italic;
  color: rgba(15, 23, 42, 0.8);
}
blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted);
}
/* Table */
.table-wrapper {
  margin: 1.5rem 0;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead tr {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
}
td {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
tbody tr:last-child {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--surface);
}
.cell-name {
  font-weight: 500;
  color: var(--text);
}
/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.faq-item p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}
/* Social Share */
.social-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.share-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.share-btn:hover {
  background: var(--surface);
  color: var(--text);
}
/* Author Box */
.author-box {
  display: flex;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.author-avatar {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  border-radius: 9999px;
  object-fit: cover;
}
.author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.author-bio {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}
/* CTA */
.article-cta {
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.04);
  text-align: center;
}
.article-cta h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}
.article-cta > p {
  margin: 0.5rem auto 0;
  max-width: 28rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.cta-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s;
}
.cta-btn:hover {
  background: #1d4ed8;
}
/* ===== Related Articles ===== */
.related-articles {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 4rem 0;
}
.related-heading {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.related-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
.related-card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: box-shadow 0.2s;
}
.related-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.related-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.related-card:hover .related-card-img img {
  transform: scale(1.05);
}
.related-card-body {
  padding: 1.25rem;
}
.related-card-body h3 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  transition: color 0.15s;
}
.related-card:hover .related-card-body h3 {
  color: var(--accent);
}
.related-card-body p {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
}
@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--primary);
  padding: 3.5rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.footer-grid h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-fg);
}
.footer-grid ul {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.footer-grid ul a {
  font-size: 0.75rem;
  color: rgba(248, 250, 252, 0.5);
  transition: color 0.15s;
}
.footer-grid ul a:hover {
  color: rgba(248, 250, 252, 0.8);
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(248, 250, 252, 0.1);
}
.footer-logo {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-fg);
}
.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(248, 250, 252, 0.4);
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}