/* Stock Meerkat — shared styles */
:root {
  --bg: #f7f9fb;
  --bg-alt: #ffffff;
  --bg-dark: #0f1a24;
  --text: #1a2332;
  --text-muted: #5a6a7a;
  --border: #e2e8f0;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-light: #fef3c7;
  --danger: #dc2626;
  --success: #059669;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15,26,36,.08), 0 4px 12px rgba(15,26,36,.04);
  --shadow-lg: 0 8px 30px rgba(15,26,36,.12);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1120px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--teal); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--bg-dark); margin-top: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .6em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.3em 0 .5em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .4em; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header / Nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.15rem; color: var(--bg-dark);
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--teal-dark); }
.logo-img {
  height: 40px;
  width: auto;
  display: block;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  display: grid; place-items: center; color: #fff; font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(13,148,136,.35);
}
.nav-links {
  display: flex; align-items: center; gap: .15rem; list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  display: block; padding: .45rem .75rem; border-radius: 8px;
  color: var(--text); font-size: .95rem; font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--teal-light); color: var(--teal-dark); text-decoration: none;
}
.nav-cta {
  background: var(--teal) !important; color: #fff !important;
  padding: .5rem 1rem !important;
}
.nav-cta:hover { background: var(--teal-dark) !important; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: .4rem .65rem; cursor: pointer; font-size: 1.2rem;
}

/* Ticker tape */
.ticker-wrap {
  background: var(--bg-dark); color: #e2e8f0; overflow: hidden;
  border-bottom: 2px solid var(--amber);
  position: relative;
}
.ticker-label {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 2;
  background: var(--amber); color: var(--bg-dark);
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  padding: 0 .75rem; display: flex; align-items: center;
  text-transform: uppercase; white-space: nowrap;
}
.ticker-track {
  display: flex; gap: 2.5rem; padding: .55rem 0 .55rem 9.5rem;
  width: max-content; animation: ticker-scroll 55s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .82rem; white-space: nowrap;
}
.ticker-item .sym { font-weight: 700; color: #fff; }
.ticker-item .px { color: #94a3b8; }
.ticker-item .chg.up { color: #34d399; }
.ticker-item .chg.dn { color: #f87171; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.sample-note {
  font-size: .8rem; color: var(--text-muted); background: var(--amber-light);
  border: 1px solid #fcd34d; border-radius: 8px; padding: .55rem .9rem;
  margin: 1rem 0;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(13,148,136,.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(245,158,11,.1), transparent),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center;
}
.hero-badge {
  display: inline-block; background: var(--teal-light); color: var(--teal-dark);
  font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px;
  margin-bottom: 1rem; letter-spacing: .02em;
}
.hero p.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-card {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-lg);
}
.hero-card h3 { margin-top: 0; font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.stat { text-align: center; padding: .85rem; background: var(--bg); border-radius: 8px; }
.stat strong { display: block; font-size: 1.5rem; color: var(--teal-dark); }
.stat span { font-size: .8rem; color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.25rem; border-radius: 9px; font-weight: 600; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--teal-dark); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal-light); color: var(--teal-dark); }
.btn-amber { background: var(--amber); color: var(--bg-dark); }
.btn-amber:hover { background: var(--amber-dark); color: #fff; }

/* Sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { margin-bottom: 1.75rem; }
.section-head p { color: var(--text-muted); max-width: 40em; margin-bottom: 0; }
.eyebrow {
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--teal); margin-bottom: .4rem;
}

/* Cards / grids */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem;
}
.card {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--amber-dark); background: var(--amber-light);
  padding: .2rem .5rem; border-radius: 5px; margin-bottom: .65rem; width: fit-content;
}
.card .tag.guide { color: var(--teal-dark); background: var(--teal-light); }
.card h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card p { color: var(--text-muted); font-size: .95rem; flex: 1; margin-bottom: .9rem; }
.card .meta { font-size: .8rem; color: var(--text-muted); margin-top: auto; }
.market-card .flag { font-size: 1.6rem; margin-bottom: .4rem; }

/* Ad slots */
.ad-slot {
  min-height: 90px; margin: 1.5rem 0; background: #f1f5f9;
  border: 1px dashed #94a3b8; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; font-size: .8rem; text-align: center; padding: 1rem;
}
.ad-slot.sidebar { min-height: 250px; }
.ad-slot.leaderboard { min-height: 90px; max-width: 100%; }
.ad-slot.in-article { min-height: 100px; }

/* Article layout */
.article-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 2.5rem; align-items: start;
  padding: 2.5rem 0 3.5rem;
}
.article-body { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 2.25rem; box-shadow: var(--shadow); }
.article-meta {
  display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; font-size: .875rem;
  color: var(--text-muted); margin-bottom: 1.5rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.article-body h2:first-of-type { margin-top: 0; }
.article-body blockquote {
  margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--teal);
  background: var(--teal-light); border-radius: 0 8px 8px 0; color: var(--text);
}
.article-body table {
  width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem; font-size: .92rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--border); padding: .6rem .75rem; text-align: left;
}
.article-body th { background: var(--bg); font-weight: 600; }
.callout {
  background: var(--amber-light); border: 1px solid #fcd34d; border-radius: 8px;
  padding: 1rem 1.15rem; margin: 1.5rem 0; font-size: .95rem;
}
.callout.teal { background: var(--teal-light); border-color: #5eead4; }
.callout strong { display: block; margin-bottom: .35rem; }
.disclaimer-box {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
  padding: 1rem 1.15rem; margin: 2rem 0 0; font-size: .88rem; color: #7f1d1d;
}
.sidebar-sticky { position: sticky; top: calc(var(--nav-h) + 1rem); }
.toc {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.15rem; margin-bottom: 1.25rem;
}
.toc h4 { margin: 0 0 .75rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.toc ol { margin: 0; padding-left: 1.1em; font-size: .9rem; }
.toc a { color: var(--text); }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { margin-bottom: .65rem; padding-bottom: .65rem; border-bottom: 1px solid var(--border); }
.related-list li:last-child { border: 0; margin: 0; padding: 0; }
.related-list a { font-weight: 600; font-size: .92rem; }

/* Page header (inner pages) */
.page-hero {
  padding: 2.25rem 0 1.5rem;
  background: linear-gradient(180deg, rgba(13,148,136,.08), transparent);
  border-bottom: 1px solid var(--border);
}
.breadcrumb { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 .35rem; }

/* Tables / ticker board */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt); }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--bg-dark); color: #e2e8f0; font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: var(--teal-light); }
.data-table .up { color: var(--success); font-weight: 600; }
.data-table .dn { color: var(--danger); font-weight: 600; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; align-items: center;
}
.filter-bar input, .filter-bar select {
  padding: .6rem .85rem; border: 1px solid var(--border); border-radius: 8px;
  font-size: .95rem; background: var(--bg-alt); color: var(--text); min-width: 180px;
}
.filter-bar input:focus, .filter-bar select:focus {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}

/* How it works / steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }
.step {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem; position: relative;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; margin-bottom: .75rem;
}

/* Newsletter / CTA */
.cta-band {
  background: linear-gradient(135deg, var(--bg-dark), #1a3a4a);
  color: #e2e8f0; padding: 3rem 0; margin-top: 1rem;
}
.cta-band h2 { color: #fff; margin-bottom: .5rem; }
.cta-band p { color: #94a3b8; max-width: 36em; }
.newsletter-form {
  display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; max-width: 480px;
}
.newsletter-form input {
  flex: 1; min-width: 200px; padding: .7rem 1rem; border-radius: 8px;
  border: 1px solid #334155; background: #1e293b; color: #fff; font-size: .95rem;
}
.newsletter-form input::placeholder { color: #64748b; }

/* Forms */
.form-card {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; max-width: 560px; box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; background: var(--bg); color: var(--text);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-hint { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }

/* Legal pages */
.legal-content { max-width: 720px; padding: 2.5rem 0 3.5rem; }
.legal-content h2 { font-size: 1.35rem; }
.legal-content h3 { font-size: 1.1rem; }

/* Footer */
.site-footer {
  background: var(--bg-dark); color: #94a3b8; padding: 3rem 0 1.5rem; margin-top: auto;
  font-size: .9rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; margin-bottom: 2.5rem;
}
.footer-brand .logo { color: #fff; margin-bottom: .75rem; }
.footer-brand p { margin: 0; line-height: 1.55; }
.footer-col h4 {
  color: #e2e8f0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
  margin: 0 0 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: #94a3b8; text-decoration: none; }
.footer-col a:hover { color: #5eead4; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
}
.footer-bottom a { color: #64748b; }

/* FAQ */
.faq details {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: .65rem; padding: .85rem 1.1rem;
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq details[open] summary { margin-bottom: .65rem; color: var(--teal-dark); }
.faq details p:last-child { margin-bottom: 0; }

/* Utilities */
.mt-0 { margin-top: 0; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.badge-sample {
  display: inline-block; background: var(--amber); color: var(--bg-dark);
  font-size: .65rem; font-weight: 800; padding: .15rem .4rem; border-radius: 4px;
  vertical-align: middle; margin-left: .35rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .article-layout, .two-col, .footer-grid {
    grid-template-columns: 1fr;
  }
  .article-layout .sidebar-sticky { position: static; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; background: #fff; border-bottom: 1px solid var(--border);
    padding: 1rem; gap: .25rem; align-items: stretch; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .article-body { padding: 1.35rem 1.15rem; }
  .ticker-label { font-size: .6rem; padding: 0 .5rem; }
  .ticker-track { padding-left: 7rem; }
}
