/*
Theme Name: STA Editorial
Theme URI: https://www.stocktargetadvisor.com/blog/
Author: Stock Target Advisor
Description: A fast, accessible editorial theme built for Stock Target Advisor.
Version: 1.2.7
Text Domain: sta-editorial
*/

:root {
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #ffffff;
  --wash: #f5f7fa;
  --navy: #071a2f;
  --navy-soft: #0d2948;
  --blue: #1463ff;
  --blue-dark: #0b49c1;
  --green: #16a36a;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(16, 24, 40, .08);
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; z-index: 1000; top: 12px; left: 12px; width: auto; height: auto;
  padding: 10px 16px; margin: 0; clip: auto; background: #fff; color: var(--ink); border-radius: 6px;
}

.announcement { background: #06172b; color: #dbe9ff; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.08); }
.announcement .container { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.announcement a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.site-header { position: sticky; z-index: 50; top: 0; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-row { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { position: relative; display: inline-flex; align-items: center; gap: 11px; color: var(--ink); flex-shrink: 0; }
.brand::after { content: ""; position: absolute; left: 23.25%; top: 50%; width: 38px; height: 38px; pointer-events: none; border: 2px solid rgba(20,99,255,0); border-radius: 50%; transform: translate(-50%,-50%) scale(.65); }
.brand:hover::after { animation: sta-target-pulse .9s ease-out; }
@keyframes sta-target-pulse { 0% { opacity: .9; border-color: rgba(20,99,255,.8); transform: translate(-50%,-50%) scale(.55); } 100% { opacity: 0; border-color: rgba(20,99,255,0); transform: translate(-50%,-50%) scale(1.45); } }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; color: #fff;
  background: linear-gradient(145deg, var(--blue), #0c3f9c); border-radius: 9px; font-weight: 900; letter-spacing: -.04em;
}
.brand-logo { width: 198px; max-height: 41px; object-fit: contain; object-position: left center; transition: transform .25s ease, filter .25s ease; }
.brand:hover .brand-logo { transform: translateY(-1px); filter: drop-shadow(0 4px 8px rgba(20,99,255,.18)); }
.brand-logo--footer { filter: brightness(0) invert(1); opacity: .96; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-tagline { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 26px; padding: 0; margin: 0; list-style: none; }
.primary-nav a { color: #344054; font-size: 14px; font-weight: 650; }
.primary-nav a:hover { color: var(--blue); }
.header-search { position: relative; }
.search-toggle, .menu-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  color: var(--ink); background: var(--wash); border: 1px solid transparent; border-radius: 9px; cursor: pointer;
}
.menu-toggle { display: none; }
.search-panel {
  position: absolute; top: calc(100% + 12px); right: 0; width: min(360px, calc(100vw - 32px));
  padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.search-panel[hidden] { display: none; }
.search-form { display: flex; gap: 8px; }
.search-field { min-width: 0; flex: 1; padding: 11px 13px; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; }
.search-submit, .button {
  display: inline-flex; align-items: center; justify-content: center; padding: 11px 17px;
  color: #fff; background: var(--blue); border: 0; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer;
}
.search-submit:hover, .button:hover { color: #fff; background: var(--blue-dark); }

.market-hero {
  min-height: 520px; display: flex; align-items: center; padding: 68px 0 58px; color: #fff;
  background: linear-gradient(90deg, rgba(3,12,26,.98) 0%, rgba(3,12,26,.9) 32%, rgba(3,12,26,.28) 64%, rgba(3,12,26,.1) 100%),
    url("assets/images/sta-market-hero-v2.png") center right / cover no-repeat;
}
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.market-hero .eyebrow { color: #8db6ff; }
.hero-copy-block { max-width: 650px; padding: 34px 0; }
.hero-title { max-width: 780px; margin: 0; font-size: clamp(32px, 4.15vw, 54px); font-weight: 620; line-height: 1.1; letter-spacing: -.04em; }
.hero-title > span { display: block; color: inherit; }
.market-hero .google-auto-placed, .market-hero .ap_container, .market-hero ins.adsbygoogle, .market-hero iframe[id^="google_ads_iframe"] { display: none !important; width: 0 !important; height: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
.hero-copy { max-width: 660px; margin: 20px 0 0; color: #cbd5e1; font-size: 18px; }

.main-content { padding: 52px 0 80px; }
.blog-search-strip { padding: 26px 0; color: #fff; background: #0c1738; border-bottom: 1px solid rgba(255,255,255,.1); }
.blog-search-inner { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(320px, 1.25fr); gap: 40px; align-items: center; }
.blog-search-inner .eyebrow { margin-bottom: 4px; }
.blog-search-inner h2 { margin: 0; color: #fff; font-size: 21px; letter-spacing: -.025em; }
.blog-search-inner .search-form { width: 100%; }
.home .content-grid { grid-template-columns: 1fr; }
.home .posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home .content-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.home .content-sidebar .sidebar-box + .sidebar-box { margin-top: 0; }
.ad-above-feed, .ad-below-feed { clear: both; margin-left: auto; margin-right: auto; }
.ad-container { width: min(calc(100% - 40px), 970px); min-height: 110px; margin: 30px auto; padding: 10px; overflow: hidden; text-align: center; background: #fafafa; border: 1px solid var(--line); border-radius: 10px; }
.ad-label { display: block; margin-bottom: 5px; color: #98a2b3; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.ad-container .adsbygoogle { min-height: 90px; }
.footer-ad { margin-top: 38px; margin-bottom: 38px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h1, .section-head h2 { margin: 0; font-size: clamp(28px, 3.5vw, 40px); line-height: 1.12; letter-spacing: -.04em; }
.section-link { font-size: 14px; font-weight: 750; }
.featured-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; margin-bottom: 52px; }
.story-card {
  overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.story-card:hover { transform: translateY(-3px); border-color: #c7d7f8; box-shadow: var(--shadow); }
.story-image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #dfe7f3, #f4f6f9); }
.story-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.story-card:hover .story-image img { transform: scale(1.025); }
.story-body { padding: 22px; }
.story-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.story-category { color: var(--blue-dark); }
.story-title { margin: 0; font-size: 21px; line-height: 1.24; letter-spacing: -.025em; }
.story-title a { color: var(--ink); }
.story-title a:hover { color: var(--blue); }
.story-excerpt { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.story-tags, .article-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.story-tags a, .article-tags a { display: inline-flex; padding: 5px 9px; color: #31537d; background: #eef4ff; border-radius: 999px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 11px; font-weight: 750; }
.story-tags a:hover, .article-tags a:hover { color: #fff; background: var(--blue); }
.story-card--lead .story-title { font-size: clamp(25px, 3vw, 34px); }
.story-card--lead .story-body { padding: 26px; }
.side-stories { display: grid; grid-template-rows: 1fr 1fr; gap: 22px; }
.side-stories .story-card { display: block; }
.side-stories .story-image { aspect-ratio: 16 / 7; height: auto; }
.side-stories .story-body { padding: 18px; }
.side-stories .story-title { font-size: 17px; }
.side-stories .story-excerpt { display: none; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; }
.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.sidebar-box { padding: 24px; background: var(--wash); border-radius: var(--radius); }
.sidebar-box + .sidebar-box { margin-top: 20px; }
.sidebar-title { margin: 0 0 15px; font-size: 16px; }
.topic-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.topic-list a { display: inline-flex; padding: 7px 10px; color: #344054; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; }
.newsletter { color: #fff; background: var(--navy); }
.newsletter p { color: #cbd5e1; font-size: 14px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 6px 10px; color: #344054; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 700; }
.page-numbers.current, .page-numbers:hover { color: #fff; background: var(--blue); border-color: var(--blue); }

.archive-header { padding: 48px 0 28px; background: var(--wash); border-bottom: 1px solid var(--line); }
.archive-header h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.05em; }
.archive-description { max-width: 700px; color: var(--muted); }
.article-shell { width: min(calc(100% - 40px), 780px); margin: 0 auto; }
.article-header { padding: 64px 0 32px; }
.article-header h1 { margin: 0; font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -.05em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.article-featured { width: min(calc(100% - 40px), 1080px); margin: 0 auto 44px; overflow: hidden; border-radius: var(--radius); }
.article-featured img { width: 100%; max-height: 610px; object-fit: cover; }
.article-content { padding-bottom: 72px; color: #27364a; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.82; }
.article-content > * { max-width: 100%; }
.article-content h2, .article-content h3, .article-content h4 { color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.22; letter-spacing: -.03em; }
.article-content h2 { margin-top: 2.2em; font-size: 31px; }
.article-content h3 { margin-top: 1.8em; font-size: 24px; }
.article-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content > p:first-of-type::first-letter { float: left; margin: .08em .12em 0 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 4.2em; font-weight: 700; line-height: .78; }
.article-content blockquote { margin: 32px 0; padding: 4px 0 4px 24px; color: #344054; border-left: 4px solid var(--blue); font-size: 21px; }
.article-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 14px; }
.article-content th, .article-content td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--wash); }
.article-footer { padding: 22px 0 50px; border-top: 1px solid var(--line); }
.comments-area { padding: 44px 0 76px; border-top: 1px solid var(--line); }
.comments-title, .comment-reply-title { margin: 0 0 24px; font-size: 28px; letter-spacing: -.035em; }
.comment-list { padding: 0; margin: 0 0 44px; list-style: none; }
.comment-list .children { margin: 20px 0 0 28px; list-style: none; }
.comment-body { padding: 22px; margin-bottom: 18px; background: var(--wash); border-radius: 12px; }
.comment-meta { margin-bottom: 12px; font-size: 13px; }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author .avatar { border-radius: 50%; }
.comment-respond { padding: 26px; background: var(--wash); border-radius: var(--radius); }
.comment-form label { display: block; margin-bottom: 5px; color: #344054; font-size: 13px; font-weight: 700; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 11px 13px; background: #fff; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; }
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form .submit { padding: 11px 18px; color: #fff; background: var(--blue); border: 0; border-radius: 8px; font: inherit; font-weight: 750; cursor: pointer; }

.site-footer { padding: 54px 0 26px; color: #a9b8ca; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; }
.site-footer .brand { color: #fff; }
.footer-copy { max-width: 500px; margin-top: 18px; font-size: 14px; }
.footer-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; padding: 0; margin: 0; list-style: none; }
.footer-nav a { color: #dbe5f0; font-size: 14px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.footer-social a {
  display: inline-grid; place-items: center; width: 38px; height: 38px; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 50%;
  font-size: 12px; font-weight: 800; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.footer-social a:hover { color: #fff; background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 26px; margin-top: 36px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

@media (max-width: 900px) {
  .primary-nav {
    display: none; position: absolute; top: 100%; right: 0; left: 0; padding: 18px 20px 24px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 6px; }
  .primary-nav a { display: block; padding: 10px 0; font-size: 16px; }
  .menu-toggle { display: inline-grid; margin-left: auto; }
  .header-search { margin-left: 0; }
  .content-grid { grid-template-columns: 1fr; }
  .home .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-search-inner { grid-template-columns: 1fr; gap: 16px; }
  .featured-grid { grid-template-columns: 1fr; }
  .side-stories { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .side-stories .story-card { display: block; }
  .side-stories .story-image { aspect-ratio: 16 / 9; }
  .content-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .sidebar-box + .sidebar-box { margin-top: 0; }
}

@media (max-width: 640px) {
  .container, .article-shell, .article-featured { width: min(calc(100% - 28px), var(--content)); }
  .announcement .container { padding: 7px 0; line-height: 1.35; }
  .header-row { min-height: 64px; gap: 10px; }
  .brand-logo { width: 174px; max-height: 36px; }
  .brand-tagline { display: none; }
  .ad-container { width: min(calc(100% - 28px), 970px); min-height: 90px; margin: 20px auto; }
  .market-hero { min-height: 440px; padding: 48px 0 44px; background-position: 62% center; }
  .hero-title { font-size: 33px; font-weight: 620; }
  .hero-copy { font-size: 16px; }
  .main-content { padding-top: 38px; }
  .side-stories, .posts-grid, .content-sidebar, .footer-grid, .home .posts-grid, .home .content-sidebar { grid-template-columns: 1fr; }
  .side-stories .story-card { display: grid; grid-template-columns: 38% 1fr; }
  .side-stories .story-image { aspect-ratio: auto; }
  .story-body { padding: 18px; }
  .article-header { padding-top: 44px; }
  .article-content { font-size: 18px; }
  .footer-bottom { flex-direction: column; }
}

