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

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

/* ---------- Cards ---------- */
.npe-card { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.npe-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; }
.npe-head-meta { font-size: 12px; font-weight: 500; color: #98a2b3; text-transform: none; letter-spacing: 0; }
.npe-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.npe-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.npe-grid > .npe-card { margin-bottom: 0; }

/* ---------- Main valuation card ---------- */
.npe-main { background: linear-gradient(145deg, #ffffff 0%, #f9f5ff 100%); display: flex; flex-direction: column; }
.npe-main-body { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 18px; }
.npe-main-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.npe-value-wrap { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.npe-value { font-size: 64px; line-height: 1; font-weight: 800; color: #1d253c; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.npe-delta { font-size: 13px; font-weight: 600; color: #98a2b3; }
.npe-delta.up { color: #067647; }
.npe-delta.down { color: #d92d20; }
.npe-copy { margin: 0; color: #667085; font-size: 14.5px; line-height: 1.55; max-width: 620px; }
.npe-zone-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.npe-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.npe-zone-chip.attractive { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.npe-zone-chip.fair { background: #f7fee7; color: #4d7c0f; border-color: #d9f99d; }
.npe-zone-chip.expensive { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.npe-zone-chip.very-expensive { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.npe-zone-chip.unknown { background: #f9fafb; color: #667085; border-color: #e4e7ec; }

.npe-meter-track { position: relative; height: 12px; border-radius: 999px; overflow: visible; display: grid; grid-template-columns: 16fr 4fr 4fr 6fr; }
.npe-meter-band { display: block; height: 100%; opacity: .85; }
.npe-meter-band:first-child { border-radius: 999px 0 0 999px; }
.npe-meter-band:nth-last-child(2) { border-radius: 0 999px 999px 0; }
.npe-meter-marker { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #1d253c; transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(16, 24, 40, .25); }
.npe-meter-labels { display: grid; grid-template-columns: 16fr 4fr 4fr 6fr; margin-top: 8px; font-size: 10.5px; color: #98a2b3; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; gap: 6px; }
.npe-meter-labels b { color: #667085; font-weight: 600; }
.npe-meter-labels span:last-child { text-align: right; }

.npe-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; border-top: 1px solid #eaecf0; padding-top: 16px; }
.npe-stats > div { display: flex; flex-direction: column; gap: 2px; }
.npe-stats span { font-size: 11.5px; color: #98a2b3; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.npe-stats strong { font-size: 20px; color: #1d253c; font-weight: 700; font-variant-numeric: tabular-nums; }
.npe-stats strong small { font-size: 12px; color: #98a2b3; font-weight: 600; }
.npe-stats em { font-style: normal; font-size: 12px; color: #667085; }

/* ---------- Tiles ---------- */
.npe-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.npe-tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 0; }
.npe-tile span { font-size: 11.5px; color: #98a2b3; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.npe-tile strong { font-size: 24px; color: #1d253c; font-weight: 700; font-variant-numeric: tabular-nums; }
.npe-tile small { font-size: 12.5px; color: #667085; font-weight: 500; }
.npe-tile small.up { color: #067647; }
.npe-tile small.down { color: #d92d20; }

/* ---------- Chart ---------- */
.npe-ranges { display: inline-flex; gap: 4px; background: #f2f4f7; border-radius: 8px; padding: 3px; flex-wrap: wrap; }
.npe-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; }
.npe-range-btn:hover { color: #344054; }
.npe-range-btn.active { background: #6941c6; color: #fff; }
.npe-chart-wrap { padding: 18px 18px 12px; }
.npe-chart-wrap canvas { width: 100% !important; height: 320px !important; }
.npe-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 18px 12px; font-size: 12px; color: #667085; }
.npe-legend span { display: inline-flex; align-items: center; gap: 6px; }
.npe-legend b { color: #98a2b3; font-weight: 600; }
.npe-chart-foot { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 18px 16px; border-top: 1px solid #eaecf0; font-size: 13px; color: #667085; }
.npe-chart-foot b { color: #1d253c; font-weight: 600; margin-right: 4px; }
.npe-note { font-size: 12.5px; color: #98a2b3; }
.npe-chart-foot .npe-note { flex-basis: 100%; }

/* ---------- Prose ---------- */
.npe-prose { padding: 24px 0 8px; max-width: 820px; }
.npe-prose h2 { color: #1d253c; font-size: 1.7rem; letter-spacing: -.03em; margin: 0 0 14px; scroll-margin-top: 90px; }
.npe-prose h3 { color: #1d253c; font-size: 1.1rem; margin: 22px 0 8px; }
.npe-prose p, .npe-prose li { color: #475467; font-size: 15.5px; line-height: 1.65; }
.npe-prose p { margin: 0 0 12px; }
.npe-prose ul { margin: 0 0 12px; padding-left: 22px; }
.npe-prose .npe-note { margin-top: 8px; display: block; }
.npe-formula { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 16px 18px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.npe-formula span { font-size: .7rem; font-weight: 600; color: #6941c6; text-transform: uppercase; letter-spacing: .05em; }
.npe-formula code { font-size: 15px; color: #1d253c; font-weight: 600; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; white-space: normal; }
.npe-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 20px; }
.npe-guide .npe-card { padding: 16px; margin: 0; border-top: 3px solid #e4e7ec; display: flex; flex-direction: column; gap: 6px; }
.npe-guide .g-lump { border-top-color: #22c55e; }
.npe-guide .g-sip { border-top-color: #6941c6; }
.npe-guide .g-hold { border-top-color: #f97316; }
.npe-guide span { font-size: 13px; font-weight: 700; color: #1d253c; }
.npe-guide p { font-size: 13.5px; margin: 0; }

/* ---------- Tables ---------- */
.npe-table-wrap { overflow-x: auto; }
.npe-prose .npe-table-wrap { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; }
.npe-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.npe-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; }
.npe-table td { padding: 11px 14px; border-bottom: 1px solid #f2f4f7; color: #1d253c; white-space: nowrap; }
.npe-table tr:last-child td { border-bottom: none; }
.npe-table td small { color: #98a2b3; font-size: 11px; font-weight: 600; }
.npe-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.npe-table .up { color: #067647; }
.npe-table .down { color: #d92d20; }
.npe-table tr.is-current td { background: #f4f3ff; }
.npe-table-more { padding: 10px 14px; border-top: 1px solid #f2f4f7; }
.npe-link-btn { border: none; background: none; color: #6941c6; font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 6px 0; font-family: inherit; }
.npe-band-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.npe-band-chip small { color: #98a2b3; font-weight: 500; }

/* ---------- Sibling indices ---------- */
.npe-siblings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.npe-sibling { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-right: 1px solid #f2f4f7; border-bottom: 1px solid #f2f4f7; text-decoration: none; color: #1d253c; transition: background .15s ease; }
.npe-sibling:nth-child(3n) { border-right: none; }
a.npe-sibling:hover { background: #f9f5ff; color: #1d253c; text-decoration: none; }
.npe-sibling span { font-size: 13px; font-weight: 600; color: #475467; }
.npe-sibling strong { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.npe-sibling small { font-size: 12px; color: #98a2b3; font-weight: 500; }
.npe-sibling small.below { color: #067647; }
.npe-sibling small.above { color: #c2410c; }

/* ---------- FAQ ---------- */
.npe-faq details { border-bottom: 1px solid #f2f4f7; padding: 0 18px; }
.npe-faq details:last-child { border-bottom: none; }
.npe-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; }
.npe-faq summary::-webkit-details-marker { display: none; }
.npe-faq summary::after { content: "+"; color: #6941c6; font-size: 20px; font-weight: 500; }
.npe-faq details[open] summary::after { content: "−"; }
.npe-faq details p { margin: 0 0 16px; color: #475467; font-size: 14.5px; line-height: 1.6; }

/* ---------- Related + CTA ---------- */
.npe-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 24px 0 16px; }
.npe-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; }
.npe-related a:hover { border-color: #6941c6; text-decoration: none; }
.npe-related span { font-size: 11.5px; font-weight: 600; color: #98a2b3; text-transform: uppercase; letter-spacing: .03em; }
.npe-related b { font-size: 14px; color: #1d253c; font-weight: 600; }
.npe-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; }
.npe-cta h2 { color: #fff; font-size: 1.5rem; letter-spacing: -.03em; margin: 0 0 8px; }
.npe-cta p { color: #c9c9d6; margin: 0; font-size: 14.5px; max-width: 560px; }
.npe-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.npe-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; }
.npe-btn.primary { background: #6941c6; color: #fff; }
.npe-btn.primary:hover { background: #53389e; color: #fff; text-decoration: none; }
.npe-btn.ghost { background: transparent; color: #fff; border-color: #5a5a74; }
.npe-btn.ghost:hover { border-color: #fff; color: #fff; text-decoration: none; }
.npe-empty { padding: 48px 24px; text-align: center; color: #98a2b3; font-size: 14px; }

@media (max-width: 1024px) {
  .npe-grid { grid-template-columns: 1fr; }
  .npe-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .npe-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .npe-landing { padding-top: 26px; }
  .npe-page { padding: 0 16px 36px; }
  .npe-hero { align-items: flex-start; flex-direction: column; }
  .npe-hero-read { width: 100%; }
  .npe-value { font-size: 48px; }
  .npe-meter-labels { font-size: 9px; }
  .npe-guide, .npe-siblings, .npe-related { grid-template-columns: 1fr; }
  .npe-sibling { border-right: none; }
  .npe-chart-wrap canvas { height: 240px !important; }
  .npe-card-head { align-items: flex-start; }
}
