/* Finleet Media - Core Stylesheet */
/* Ported from finleet_astro global.css - zero build required */

/* ═══════════════════════════════════════════════════════════════
   CSS Variables (Brand Colors)
   ═══════════════════════════════════════════════════════════════ */
:root {
  --champagne: #D4AF37;
  --amber: #FF8C00;
  --purple: #162036;
  --pearl: #F8F8FF;
  --cedar: #034638;
  --bronze: #CD7F32;
  --graphite: #41424C;
  --silver: #C0C0C0;
  --royal-blue: #4169E1;
  --success: #00C851;
  --danger: #FF4444;
  --warning: #FF8800;
  --info: #33B5E5;
}

/* ═══════════════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--graphite);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 18px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { font-family: 'Georgia', 'Times New Roman', serif; line-height: 1.15; letter-spacing: -0.02em; color: #1a1a1a; }

/* ═══════════════════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════════════════ */
.container-news { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container-news { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container-news { padding: 0 2rem; } }

.grid { display: grid; gap: 2rem; }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }
.col-span-8 { grid-column: span 8; }
.col-span-4 { grid-column: span 4; }
@media (max-width: 1023px) {
  .grid-cols-12 { grid-template-columns: 1fr; }
  .col-span-8, .col-span-4 { grid-column: span 1; }
}

.grid-4col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
@media (max-width: 768px) { .grid-4col { grid-template-columns: repeat(2, 1fr); } }

/* ═══════════════════════════════════════════════════════════════
   Top Banner (Market Times)
   ═══════════════════════════════════════════════════════════════ */
.top-banner {
  background: #000;
  color: #fff;
  padding: 0.25rem 0;
  font-size: 0.75rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.top-banner .banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-banner .markets {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #9ca3af;
}
.market-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.25rem;
}
.market-dot.open { background: #4ade80; animation: marketPulse 2s ease-in-out infinite; }
.market-dot.pre-post { background: #facc15; }
.market-dot.closed { background: #4b5563; }
.market-city { font-weight: 600; font-size: 0.75rem; }
.market-city.open { color: #4ade80; }
.market-city.pre-post { color: #facc15; }
.market-city.closed { color: #9ca3af; }
.market-time { margin-left: 0.25rem; font-family: monospace; }

@media (max-width: 1023px) { .top-banner .markets { display: none; } }

/* ═══════════════════════════════════════════════════════════════
   Main Header
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  border-bottom: 2px solid #000;
  background: #fff;
  position: relative;
  z-index: 50;
}
.header-logo {
  padding: 1rem 0;
  text-align: center;
  border-bottom: 1px solid #d1d5db;
}
.header-logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin: 0;
}
.header-logo .fin { background: linear-gradient(to right, #000, var(--royal-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-logo .leet { background: linear-gradient(to right, #000, var(--royal-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-logo .tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (min-width: 640px) { .header-logo h1 { font-size: 3.5rem; } }

/* Navigation */
.site-nav { padding: 0.75rem 0; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.site-nav a { transition: opacity 0.2s; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a.active {
  background: var(--champagne);
  color: var(--purple);
  padding: 0.25rem 1rem;
  border-radius: 0.25rem;
}
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.btn-tips {
  background: var(--champagne);
  color: var(--purple);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: none;
  cursor: pointer;
}
.btn-tips:hover { background: #B8941F; }
.btn-terminal {
  background: #000;
  color: #fff;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: none;
  cursor: pointer;
}
.btn-terminal:hover { background: #1f2937; }

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
@media (max-width: 1023px) {
  .site-nav ul.desktop-nav { display: none; }
  .hamburger { display: block; }
  .mobile-nav { padding: 1rem 0; border-top: 1px solid #e5e7eb; }
  .mobile-nav a { display: block; padding: 0.5rem 0; font-size: 0.875rem; font-weight: 700; }
}

/* ═══════════════════════════════════════════════════════════════
   Article Styles
   ═══════════════════════════════════════════════════════════════ */
.article-headline {
  font-size: 1.875rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .article-headline { font-size: 2.5rem; } }
@media (min-width: 768px) { .article-headline { font-size: 3rem; } }
@media (min-width: 1024px) { .article-headline { font-size: 3.5rem; } }

.article-subhead {
  font-size: 1.25rem;
  color: #4b5563;
  line-height: 1.45;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .article-subhead { font-size: 1.5rem; } }
@media (min-width: 1024px) { .article-subhead { font-size: 1.65rem; } }

.article-body { font-size: 1.35rem; line-height: 1.8; }
.article-body p { margin-bottom: 1.25rem !important; margin-top: 0 !important; }
.article-body h2 { font-size: 1.65rem; font-weight: 900; margin: 1.75rem 0 0.5rem !important; padding-bottom: 0.5rem; border-bottom: 1px solid #e5e7eb; letter-spacing: -0.01em; }
.article-body h3 { font-size: 1.35rem; font-weight: 700; margin: 1.5rem 0 0.5rem !important; }
/* Override Tailwind CDN — must use high specificity to beat generated styles */
body .article-body p,
body .article-body.prose p,
body .article-body.prose-lg p,
body .article-body p.mb-4,
body .article-body p.mb-6,
body .article-body p.text-lg,
body .article-body p.text-xl { margin-bottom: 1rem !important; margin-top: 0 !important; }
body .article-body h2,
body .article-body.prose h2,
body .article-body h2.mt-10,
body .article-body h2.mb-6 { margin-top: 1.5rem !important; margin-bottom: 0.4rem !important; }
body .article-body h3,
body .article-body.prose h3 { margin-top: 1.25rem !important; margin-bottom: 0.4rem !important; }
body .article-body > :first-child { margin-top: 0 !important; }
/* Tighten header-to-body gap */
body article header.mb-8,
body article header[class*="mb-8"] { margin-bottom: 1.5rem !important; }
body article header.pb-6,
body article header[class*="pb-6"] { padding-bottom: 1rem !important; }
body .article-headline.mb-3,
body .article-headline[class*="mb-3"] { margin-bottom: 0.5rem !important; }
body .article-subhead.mb-4,
body .article-subhead[class*="mb-4"] { margin-bottom: 0.75rem !important; }
.article-body p.text-lg { font-size: 1.35rem !important; }
.article-body p.text-xl { font-size: 1.45rem !important; }

/* Widen article layout */
article.max-w-4xl { max-width: 72rem !important; }
.article-body blockquote {
  border-left: 4px solid #1a1a1a;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.6;
  color: #374151;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.875rem; }
.article-body th { background: #f3f4f6; padding: 0.75rem; text-align: left; font-weight: 700; border-bottom: 2px solid #000; }
.article-body td { padding: 0.75rem; border-bottom: 1px solid #e5e7eb; }
.article-body tr:hover { background: #f9fafb; }

.article-byline {
  font-size: 0.875rem;
  color: #4b5563;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Series / Category Badge */
.badge {
  display: inline-block;
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.badge-champagne { background: var(--champagne); color: var(--purple); }
.badge-danger { background: var(--danger); color: #fff; }
.badge-outline { background: transparent; border: 1px solid #d1d5db; color: #4b5563; }

/* ═══════════════════════════════════════════════════════════════
   Section Headers
   ═══════════════════════════════════════════════════════════════ */
.section-header {
  border-top: 4px solid #000;
  padding-top: 0.75rem;
  margin-bottom: 2rem;
}
.section-title {
  font-size: 0.8125rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   Article Cards (Feed)
   ═══════════════════════════════════════════════════════════════ */
.article-card {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.article-card:last-child { border-bottom: none; }
.article-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.3; }
.article-card h3 a:hover { opacity: 0.7; }
.article-card .summary { font-size: 1rem; color: #4b5563; margin-bottom: 0.5rem; line-height: 1.6; }
.article-card .meta {
  font-size: 0.75rem;
  color: #9ca3af;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Two-column feed */
.feed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .feed-grid { grid-template-columns: 1fr; } }
.feed-column h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
  margin-bottom: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--purple);
  color: var(--pearl);
  padding: 3rem 0;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.site-footer h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.5rem; font-size: 0.875rem; }
.site-footer a:hover { color: var(--champagne); transition: color 0.2s; }
.footer-logo { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.footer-logo .fin { color: var(--champagne); }
.footer-logo .leet { color: #fff; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(192,192,192,0.2);
  text-align: center;
  font-size: 0.875rem;
}
.footer-bottom .disclaimer { font-size: 0.75rem; color: rgba(192,192,192,0.6); margin-top: 0.5rem; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a { color: #fff; transition: color 0.2s; }
.social-links a:hover { color: var(--champagne); }
.social-links svg { width: 1.25rem; height: 1.25rem; }

/* ═══════════════════════════════════════════════════════════════
   Journalist Signatures
   ═══════════════════════════════════════════════════════════════ */
.journalist-sig {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}
.journalist-sig .name { font-weight: 700; font-size: 1rem; }
.journalist-sig .series { font-style: italic; color: #4b5563; font-size: 0.875rem; }
.journalist-sig .org { font-size: 0.875rem; color: #9ca3af; }

.editor-sig {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ═══════════════════════════════════════════════════════════════
   Methodology / Data Source Box
   ═══════════════════════════════════════════════════════════════ */
.methodology-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #4b5563;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.methodology-box h4 { font-weight: 700; margin-bottom: 0.5rem; color: var(--graphite); }

/* ═══════════════════════════════════════════════════════════════
   Key Metrics Grid (for article pages)
   ═══════════════════════════════════════════════════════════════ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 640px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }
.metric-box {
  background: #f3f4f6;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
}
.metric-box .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--graphite);
}
.metric-box .label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dark variant (for entity detail boxes) */
.metric-box.dark {
  background: #111827;
  color: #fff;
}
.metric-box.dark .value { color: #fff; }
.metric-box.dark .label { color: #9ca3af; }

/* ═══════════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════════ */
@keyframes marketPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* ═══════════════════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: monospace; }
.font-sans { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.hidden { display: none; }
