/* FII / DII activity page: shares the market-tools visual language with Fear & Greed. */
.fd-landing { background: #f7f8fc; color: #1d253c; min-height: 100vh; padding: 42px 0 80px; }
.fd-page { font-family: 'Inter','Segoe UI',Arial,sans-serif; max-width: 1180px; margin: 0 auto; padding: 0 28px 48px; }

/* ---------- Hero ---------- */
.fd-hero { align-items: end; border-bottom: 3px solid #1d253c; display: flex; gap: 2rem; justify-content: space-between; margin-bottom: 24px; padding-bottom: 28px; }
.fd-eyebrow { color: #6941c6; font-size: .72rem; font-weight: 600; letter-spacing: .07em; margin: 0 0 .5rem; text-transform: uppercase; }
.fd-eyebrow.light { color: #d6bbfb; }
.fd-hero h1 { color: #1d253c; font-size: clamp(2.1rem, 5vw, 3.8rem); letter-spacing: -.05em; line-height: .98; margin: 0; }
.fd-hero > div:first-child > p:last-child { color: #667085; font-size: 1.05rem; line-height: 1.55; margin: 1rem 0 0; max-width: 640px; }
.fd-hero-read { background: #f4f3ff; border: 1px solid #d6bbfb; border-radius: 8px; min-width: 210px; padding: .8rem 1rem; }
.fd-hero-read span, .fd-hero-read small { color: #6941c6; display: block; font-size: .67rem; text-transform: uppercase; }
.fd-hero-read strong { color: #1d253c; display: block; font-size: 1.2rem; margin: .15rem 0; }

/* ---------- Cards ---------- */
.fd-card { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.fd-card-head { padding: 13px 18px; border-bottom: 1px solid #e4e7ec; color: #6941c6; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fd-head-meta { font-size: 12px; font-weight: 500; color: #98a2b3; text-transform: none; letter-spacing: 0; }
.fd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; margin-bottom: 16px; }
.fd-grid > .fd-card { margin-bottom: 0; }
.fd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: none; letter-spacing: 0; border: 1px solid transparent; }
.fd-chip.buy { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.fd-chip.sell { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.fd-chip.neutral { background: #f4f3ff; color: #6941c6; border-color: #d6bbfb; }
.up { color: #067647; }
.down { color: #d92d20; }

/* ---------- Flow cards ---------- */
.fd-flow { border-top: 4px solid #e4e7ec; }
.fd-flow.is-buy { border-top-color: #039855; }
.fd-flow.is-sell { border-top-color: #d92d20; }
.fd-flow-body { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.fd-flow-value { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #1d253c; }
.fd-flow-value.up { color: #067647; }
.fd-flow-value.down { color: #d92d20; }
.fd-flow-gross { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid #eaecf0; padding-top: 12px; }
.fd-flow-gross span { display: block; font-size: 11px; color: #98a2b3; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.fd-flow-gross strong { font-size: 14px; color: #1d253c; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fd-flow-note { margin: 0; font-size: 13px; color: #667085; }

/* ---------- Tiles ---------- */
.fd-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fd-tile { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; margin-bottom: 0; }
.fd-tile span { font-size: 11px; color: #98a2b3; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.fd-tile strong { font-size: 20px; color: #1d253c; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fd-tile small { font-size: 12px; color: #667085; font-weight: 500; }

/* ---------- Chart ---------- */
.fd-ranges { display: inline-flex; gap: 4px; background: #f2f4f7; border-radius: 8px; padding: 3px; flex-wrap: wrap; }
.fd-range-btn { border: none; background: transparent; color: #667085; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: all .15s ease; font-family: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.fd-range-btn:hover { color: #344054; text-decoration: none; }
.fd-range-btn.active { background: #6941c6; color: #fff; }
.fd-chart-wrap { padding: 18px 18px 12px; }
.fd-chart-wrap canvas { width: 100% !important; height: 320px !important; }
.fd-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 18px 12px; font-size: 12px; color: #667085; align-items: center; }
.fd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fd-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.fd-note { font-size: 12.5px; color: #98a2b3; }
.fd-chart-foot { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 18px 16px; border-top: 1px solid #eaecf0; font-size: 13px; color: #667085; }
.fd-chart-foot b { color: #1d253c; font-weight: 600; margin-right: 4px; }
.fd-chart-foot em { font-style: normal; font-weight: 600; }

/* ---------- Insights ---------- */
.fd-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fd-insight { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; align-items: flex-start; }
.fd-insight strong { font-size: 15px; color: #1d253c; font-weight: 600; line-height: 1.35; }
.fd-insight p { margin: 0; font-size: 13px; color: #667085; line-height: 1.5; }

/* ---------- Tables ---------- */
.fd-month-form { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; }
.fd-month-form label { font-size: 12px; color: #667085; font-weight: 600; margin: 0; }
.fd-month-form select { min-height: 34px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; color: #1d253c; background: #fff; }
.fd-table-wrap { overflow-x: auto; }
.fd-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.fd-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: #667085; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid #e4e7ec; white-space: nowrap; background: #fcfcfd; }
.fd-table td { padding: 11px 14px; border-bottom: 1px solid #f2f4f7; color: #1d253c; white-space: nowrap; }
.fd-table tbody tr:last-child td { border-bottom: none; }
.fd-table td a { color: #6941c6; font-weight: 600; text-decoration: none; }
.fd-table td a:hover { text-decoration: underline; }
.fd-table td small { color: #98a2b3; font-size: 11px; font-weight: 600; }
.fd-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fd-table tfoot td { background: #f9fafb; font-weight: 700; border-top: 1px solid #e4e7ec; }
.fd-table .fd-empty { text-align: center; color: #98a2b3; padding: 32px; }
.fd-table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid #eaecf0; }
.fd-pager { display: flex; gap: 6px; }
.fd-pager .fd-range-btn { background: #fff; border: 1px solid #e4e7ec; color: #475467; }
.fd-pager .fd-range-btn:hover { border-color: #6941c6; color: #6941c6; }
.fd-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.fd-split .fd-card { margin-bottom: 0; }

/* ---------- Prose ---------- */
.fd-prose { padding: 24px 0 8px; max-width: 820px; }
.fd-prose h2 { color: #1d253c; font-size: 1.7rem; letter-spacing: -.03em; margin: 0 0 14px; scroll-margin-top: 90px; }
.fd-prose h3 { color: #1d253c; font-size: 1.1rem; margin: 22px 0 8px; }
.fd-prose p, .fd-prose li { color: #475467; font-size: 15.5px; line-height: 1.65; }
.fd-prose p { margin: 0 0 12px; }
.fd-prose ul { margin: 0 0 12px; padding-left: 22px; }
.fd-prose a { color: #6941c6; font-weight: 600; }
.fd-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fd-who .fd-card { padding: 16px 18px; margin: 0; border-top: 3px solid #e4e7ec; }
.fd-who .w-fii { border-top-color: #d92d20; }
.fd-who .w-dii { border-top-color: #039855; }
.fd-who h3 { margin: 0 0 6px; font-size: 1rem; }
.fd-who p { margin: 0; font-size: 14px; }

/* ---------- FAQ ---------- */
.fd-faq details { border-bottom: 1px solid #f2f4f7; padding: 0 18px; }
.fd-faq details:last-child { border-bottom: none; }
.fd-faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-size: 15.5px; font-weight: 600; color: #1d253c; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.fd-faq summary::-webkit-details-marker { display: none; }
.fd-faq summary::after { content: "+"; color: #6941c6; font-size: 20px; font-weight: 500; }
.fd-faq details[open] summary::after { content: "−"; }
.fd-faq details p { margin: 0 0 16px; color: #475467; font-size: 14.5px; line-height: 1.6; }

/* ---------- Related + CTA ---------- */
.fd-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 24px 0 16px; }
.fd-related a { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s ease; }
.fd-related a:hover { border-color: #6941c6; text-decoration: none; }
.fd-related span { font-size: 11.5px; font-weight: 600; color: #98a2b3; text-transform: uppercase; letter-spacing: .03em; }
.fd-related b { font-size: 14px; color: #1d253c; font-weight: 600; }
.fd-cta { background: #1d253c; border-radius: 12px; color: #fff; padding: 28px 30px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.fd-cta h2 { color: #fff; font-size: 1.5rem; letter-spacing: -.03em; margin: 0 0 8px; }
.fd-cta p { color: #c9c9d6; margin: 0; font-size: 14.5px; max-width: 560px; }
.fd-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.fd-btn.primary { background: #6941c6; color: #fff; }
.fd-btn.primary:hover { background: #53389e; color: #fff; text-decoration: none; }
.fd-btn.ghost { background: transparent; color: #fff; border-color: #5a5a74; }
.fd-btn.ghost:hover { border-color: #fff; color: #fff; text-decoration: none; }
.fd-empty { padding: 48px 24px; text-align: center; color: #98a2b3; font-size: 14px; }

@media (max-width: 1024px) {
  .fd-grid { grid-template-columns: 1fr 1fr; }
  .fd-grid .fd-tiles { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fd-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fd-landing { padding-top: 26px; }
  .fd-page { padding: 0 16px 36px; }
  .fd-hero { align-items: flex-start; flex-direction: column; }
  .fd-hero-read { width: 100%; }
  .fd-grid, .fd-grid .fd-tiles, .fd-insights, .fd-who, .fd-related { grid-template-columns: 1fr; }
  .fd-flow-value { font-size: 32px; }
  .fd-chart-wrap canvas { height: 240px !important; }
  .fd-card-head { align-items: flex-start; }
}
