/*
Theme Name: Polytrade Journal
Theme URI: https://polytrade.market/blog/
Author: Polytrade
Description: Lightweight editorial theme for Polytrade research.
Version: 1.0.2
Requires at least: 6.0
*/

:root {
  --ink: #111827;
  --muted: #687386;
  --line: #e3e7ee;
  --paper: #f6f7fb;
  --card: #fff;
  --accent: #2e5cff;
  --accent-dark: #244bd6;
  --accent-soft: #eaf0ff;
  --navy: #111827;
  --shadow: 0 18px 60px rgba(24, 35, 58, .08);
}

html[data-theme="dark"] {
  --ink: #f2f5ff;
  --muted: #9aa8bf;
  --line: #26334b;
  --paper: #080d18;
  --card: #101827;
  --accent: #6f8cff;
  --accent-dark: #8da3ff;
  --accent-soft: #17254f;
  --navy: #060a12;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(46, 92, 255, .12), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  transition: color .2s ease, background-color .2s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(227, 231, 238, .9);
  background: rgba(246, 247, 251, .9);
  backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: -.03em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.main-nav { display: flex; align-items: center; gap: 26px; color: #4b5870; font-size: 14px; font-weight: 700; }
.main-nav a:hover { color: var(--accent-dark); }
.nav-cta {
  padding: 10px 17px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--navy);
}
.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--card);
  cursor: pointer;
  font: inherit;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-moon { display: none; }
html[data-theme="dark"] .theme-sun { display: none; }
html[data-theme="dark"] .theme-moon { display: inline; }

.blog-hero { padding: 92px 0 62px; text-align: center; }
.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid #cbd2dd;
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}
.blog-hero h1 {
  max-width: 800px;
  margin: 20px auto 18px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: .98;
  letter-spacing: -.065em;
}
.blog-hero p { max-width: 670px; margin: 0 auto; color: var(--muted); font-size: 18px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 92px;
}
.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 22px 70px rgba(24, 35, 58, .13); }
.post-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: .9fr 1.1fr; }
.post-art {
  min-height: 230px;
  display: grid;
  place-items: center;
  padding: 30px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(95, 127, 255, .32), transparent 55%),
    linear-gradient(145deg, #1c3d88, #0b1530);
}
.post-art span { font-size: clamp(34px, 5vw, 68px); font-weight: 900; letter-spacing: -.06em; opacity: .95; }
.post-art.has-cover { padding: 0; overflow: hidden; background: var(--navy); }
.post-art.has-cover img { width: 100%; height: 100%; min-height: 230px; display: block; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-art.has-cover img { transform: scale(1.025); }
.post-copy { padding: 34px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--accent-dark); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.post-meta time { color: #8a9691; }
.post-card h2 { margin: 15px 0 12px; font-size: clamp(25px, 3vw, 38px); line-height: 1.08; letter-spacing: -.045em; }
.post-card p { margin: 0; color: var(--muted); }
.read-more { display: inline-block; margin-top: 22px; color: var(--accent-dark); font-weight: 900; }

.article-hero { max-width: 920px; padding: 78px 0 34px; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--accent-dark); font-weight: 800; }
.article-hero h1 { margin: 18px 0; font-size: clamp(42px, 6vw, 68px); line-height: 1; letter-spacing: -.06em; }
.article-summary { max-width: 760px; color: var(--muted); font-size: 20px; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; color: var(--muted); font-size: 14px; }
.author-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: var(--accent-dark); font-weight: 900; }
.byline strong { display: block; color: var(--ink); }

.article-cover {
  min-height: 270px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(95, 127, 255, .38), transparent 24rem),
    linear-gradient(145deg, #1c3d88, #0b1530);
  box-shadow: var(--shadow);
}
.article-cover span { font-size: clamp(30px, 5vw, 60px); font-weight: 900; letter-spacing: -.05em; }
.article-body { width: min(760px, calc(100% - 40px)); margin: 54px auto 90px; }
.article-body > p:first-child { font-size: 22px; color: #334155; }
.article-body h2 { margin: 46px 0 14px; font-size: 31px; line-height: 1.15; letter-spacing: -.035em; }
.article-body p { margin: 0 0 19px; }
.article-body ul { padding-left: 22px; }
.article-body li { margin: 8px 0; }
.affiliate-callout, .risk-note, .article-cta {
  margin: 38px 0;
  padding: 26px;
  border-radius: 20px;
}
.affiliate-callout { border: 1px solid #ccd8ff; background: #f0f4ff; }
.affiliate-callout strong, .affiliate-callout span { display: block; }
.affiliate-callout a { display: inline-block; margin-top: 12px; color: var(--accent-dark); font-weight: 900; }
.article-faq { margin-top: 52px; }
.article-faq details { margin: 10px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.article-faq summary { cursor: pointer; font-weight: 850; }
.article-faq details p { margin: 12px 0 0; color: var(--muted); }
.risk-note { border: 1px solid #eadfc7; background: #fff9eb; }
.risk-note p { margin: 6px 0 0; color: #685e48; }
.article-cta { color: #fff; background: var(--navy); text-align: center; }
.article-cta h2 { margin: 8px 0 18px; }
.button {
  display: inline-flex;
  padding: 12px 19px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}
.disclosure { display: block; margin-top: 16px; color: #b8c6c1; font-size: 12px; }

.site-footer { padding: 46px 0; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 20px; }
.empty-state { padding: 80px 0 120px; text-align: center; }

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(95, 127, 255, .11), transparent 28rem),
    var(--paper);
}
html[data-theme="dark"] .site-header { background: rgba(8, 13, 24, .9); }
html[data-theme="dark"] .main-nav { color: #aab5ca; }
html[data-theme="dark"] .eyebrow {
  border-color: var(--line);
  background: rgba(18, 34, 29, .8);
}
html[data-theme="dark"] .post-art,
html[data-theme="dark"] .article-cover {
  background:
    radial-gradient(circle at 20% 20%, rgba(95, 127, 255, .24), transparent 24rem),
    linear-gradient(145deg, #1a3472, #060a12);
}
html[data-theme="dark"] .article-body > p:first-child { color: #cbd5e1; }
html[data-theme="dark"] .affiliate-callout { border-color: #29458f; background: #111d3d; }
html[data-theme="dark"] .article-faq details { background: var(--card); }
html[data-theme="dark"] .risk-note { border-color: #574b2d; background: #2b2516; }
html[data-theme="dark"] .risk-note p { color: #d1c49e; }
html[data-theme="dark"] .site-footer { background: #0d1423; }

@media (max-width: 760px) {
  .main-nav a:not(.nav-cta) { display: none; }
  .blog-hero { padding-top: 62px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card:first-child { grid-column: auto; display: block; }
  .post-copy { padding: 26px; }
  .article-cover { border-radius: 0; width: 100%; }
  .footer-inner { display: block; }
  .footer-links { margin-top: 22px; flex-wrap: wrap; }
}
