/* ===================================
   TradingMixer Blog Styles
   Extends the brand tokens in /styles.css
   =================================== */

body {
  background: #ffffff;
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--text-primary);
}

.header-nav .nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
}

.header-nav .nav-cta:hover {
  background: var(--primary-hover);
  color: #fff;
}

@media (max-width: 720px) {
  .header-nav a:not(.nav-cta) {
    display: none;
  }
}

/* ---------- Article layout ---------- */

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.article-meta {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.article-meta .tag {
  background: #EFF6FF;
  color: var(--primary-hover);
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 600;
}

.article h1 {
  font-size: 2.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .article h1 {
    font-size: 2.75rem;
  }
}

.article .standfirst {
  font-size: 20px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 36px;
}

.article h2 {
  font-size: 1.6rem;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.article h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
}

.article p {
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.75;
  color: #1f2937;
}

.article ul,
.article ol {
  margin: 0 0 18px 22px;
  font-size: 17px;
  line-height: 1.75;
  color: #1f2937;
}

.article li {
  margin-bottom: 10px;
}

.article a {
  color: var(--primary-hover);
}

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

/* ---------- Code ---------- */

.article pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 22px;
  font-size: 13.5px;
  line-height: 1.65;
}

.article code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.article p code,
.article li code,
.article td code {
  background: #F3F4F6;
  color: #b91c1c;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.article pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ---------- Callouts ---------- */

.callout {
  border-left: 4px solid var(--primary);
  background: #EFF6FF;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 22px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout.warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
}

.callout.danger {
  border-left-color: var(--danger);
  background: #FEF2F2;
}

/* ---------- Tables ---------- */

.article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}

.article th,
.article td {
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.article th {
  background: var(--background);
  font-weight: 700;
}

/* ---------- In-article CTA ---------- */

.article-cta {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  margin: 44px 0 0;
  background: var(--background);
}

.article-cta h3 {
  margin-top: 0;
}

.article-cta .cta-button {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 13px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 8px;
}

.article-cta .cta-button:hover {
  background: var(--primary-hover);
}

.article-cta .cta-note {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 12px 0 0;
}

/* ---------- Blog index ---------- */

.blog-hero {
  padding: 64px 20px 24px;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.blog-hero p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto;
}

.post-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.post-card {
  display: block;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 26px;
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.post-card p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.post-card .post-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */

footer {
  background: #111827;
  color: #9CA3AF;
  padding: 48px 0 32px;
  font-size: 14px;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 28px;
}

footer .footer-links a {
  color: #D1D5DB;
  text-decoration: none;
}

footer .footer-links a:hover {
  color: #fff;
}

footer .disclaimers p {
  max-width: 900px;
  margin: 0 auto 14px;
  font-size: 12.5px;
  line-height: 1.65;
  text-align: center;
}

footer .copyright {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #1F2937;
  font-size: 13px;
}
