/* ============================================
   Market Insights — Design Tokens
   ============================================ */
:root {
  --green-600: #0F9D58;
  --green-700: #0B7A43;
  --green-100: #E7F5EC;
  --ink: #1A2420;
  --muted: #5F6B66;
  --paper: #FFFFFF;
  --mist: #F4F9F6;
  --line: #E1E8E4;
  --gold: #E8B94B;
  --up: #0F9D58;
  --down: #D64545;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--ink);
}
p { margin: 0 0 1em; }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img { height: 36px; width: auto; }
.brand-text { display: none; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--green-700);
  display: block;
  line-height: 1.1;
}
.brand-text span {
  font-size: .72rem;
  color: var(--muted);
}

.main-nav { display: none; }
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: .92rem;
  margin-left: 22px;
}
.main-nav a:hover { color: var(--green-700); text-decoration: none; }

.search-toggle, .menu-toggle {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

@media (min-width: 860px) {
  .brand-text { display: block; }
  .main-nav { display: flex; align-items: center; }
  .menu-toggle { display: none; }
}

#search-panel {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
  padding: 14px 20px;
}
#search-panel.open { display: block; }
#pagefind-search { max-width: var(--container); margin: 0 auto; }

/* ============================================
   Ticker badge (signature element)
   ============================================ */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--green-600);
  border-radius: var(--radius-sm);
  color: var(--green-700);
  background: var(--green-100);
}
.tag-badge--up::before { content: "▲"; font-size: .6rem; color: var(--up); }
.tag-badge--muted {
  border-color: var(--line);
  color: var(--muted);
  background: var(--mist);
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
  font-size: .82rem;
  color: var(--muted);
  padding: 12px 0;
  font-family: var(--font-mono);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--green-700); }
.breadcrumbs .sep { margin: 0 6px; color: var(--line); }
.breadcrumbs .current { color: var(--ink); font-weight: 600; }

/* ============================================
   Article cards / lists
   ============================================ */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.section-title h2 { margin: 0; font-size: 1.4rem; }
.section-title a { font-size: .85rem; font-weight: 600; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid--home { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--green-600); }
.card__img { aspect-ratio: 16/10; object-fit: cover; background: var(--mist); }
.card__body { padding: 16px; }
.card__meta { margin-bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--green-700); text-decoration: none; }
.card__excerpt { font-size: .9rem; color: var(--muted); margin: 0 0 10px; }
.card__byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.card__byline img {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
}

/* ============================================
   Hero (home)
   ============================================ */
.hero {
  background: linear-gradient(180deg, var(--green-100) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding: 36px 0 30px;
}
.hero h1 {
  font-size: 1.9rem;
  max-width: 640px;
}
.hero p.lead {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 560px;
}
@media (min-width: 760px) {
  .hero h1 { font-size: 2.6rem; }
}

/* ============================================
   Article single page
   ============================================ */
.article-header { padding: 8px 0 20px; }
.article-header h1 {
  font-size: 1.7rem;
  max-width: 780px;
}
@media (min-width: 760px) {
  .article-header h1 { font-size: 2.3rem; }
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.author-byline { display: flex; align-items: center; gap: 10px; }
.author-byline img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--green-100);
}
.author-byline__name { font-weight: 700; font-size: .92rem; }
.author-byline__meta { font-size: .78rem; color: var(--muted); font-family: var(--font-mono); }

.article-cover {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 20px 0;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--mist);
}
.article-body {
  max-width: 720px;
  font-size: 1.05rem;
}
.article-body h2 { font-size: 1.35rem; margin-top: 1.6em; }
.article-body h3 { font-size: 1.15rem; margin-top: 1.4em; }
.article-body img { border-radius: var(--radius-md); margin: 1.2em 0; }
.article-body blockquote {
  border-left: 3px solid var(--green-600);
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  color: var(--muted);
  font-style: italic;
}
.article-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 28px 0;
}

.disclaimer-box {
  background: var(--mist);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .86rem;
  color: var(--muted);
  margin: 24px 0;
}

/* ============================================
   Related articles
   ============================================ */
.related { margin: 48px 0; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--ink);
  color: #C9D3CE;
  margin-top: 60px;
  padding: 44px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand img { height: 34px; margin-bottom: 10px; }
.footer-brand p { font-size: .86rem; color: #9BAAA1; max-width: 260px; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7E9086;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #C9D3CE; font-size: .9rem; }
.footer-col a:hover { color: var(--green-600); text-decoration: none; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #2B3630;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: .8rem;
  color: #7E9086;
}
.footer-bottom nav a { color: #7E9086; margin-left: 14px; }
.footer-bottom nav a:first-child { margin-left: 0; }
.footer-bottom nav a:hover { color: var(--green-600); text-decoration: none; }

/* ============================================
   Legal / static pages
   ============================================ */
.prose { max-width: 760px; font-size: 1.02rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }

/* ============================================
   Utility
   ============================================ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
