/*
Theme Name: Networth v2
Description: NerdWallet-inspired news-forward redesign of networth.com — blue dashboard identity from Miirko's mock, decongested. Deliverable theme for live once access lands.
Version: 0.1
Author: Paradise Media
*/

:root {
	--blue: #2563eb;
	--blue-dark: #1d4ed8;
	--navy: #0b1f4e;
	--navy-deep: #0a1a3c;
	--ink: #0f172a;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #ffffff;
	--bg-alt: #f8fafc;
	--chip-bg: #eff4ff;
	--up: #16a34a;
	--down: #dc2626;
	--radius: 14px;
	--font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
	--font-body: 'Inter', system-ui, sans-serif;
	--wrap: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- ticker ---------- */
.nw-ticker { background: var(--bg); border-bottom: 1px solid var(--line); font-size: 13px; overflow: hidden; }
.nw-ticker .wrap { display: flex; align-items: center; gap: 28px; height: 38px; white-space: nowrap; overflow: hidden; }
.nw-ticker-label { font-weight: 700; letter-spacing: .06em; font-size: 11px; color: var(--ink); flex: 0 0 auto; }
.nw-ticker-items { display: flex; gap: 28px; overflow: hidden; }
.nw-ticker-item { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.nw-ticker-item b { font-weight: 600; }
.nw-ticker-item .pct.up { color: var(--up); }
.nw-ticker-item .pct.down { color: var(--down); }

/* ---------- header ---------- */
.nw-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nw-header .wrap { display: flex; align-items: center; gap: 32px; height: 72px; }
.nw-brand { line-height: 1.1; flex: 0 0 auto; }
.nw-brand .wordmark { font-family: var(--font-display); font-weight: 800; font-size: 27px; color: var(--blue); letter-spacing: -0.02em; }
.nw-brand .tagline { font-size: 11px; color: var(--muted); }
.nw-nav { display: flex; gap: 4px; flex: 1 1 auto; }
.nw-nav a { font-size: 15px; font-weight: 500; color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.nw-nav a:hover { background: var(--chip-bg); color: var(--blue); }
.nw-nav a.active { color: var(--blue); font-weight: 600; }
.nw-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.nw-search-btn { background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--ink); }
.nw-search-btn:hover { background: var(--chip-bg); }
.nw-btn { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 10px 22px; cursor: pointer; border: 0; }
.nw-btn-primary { background: var(--blue); color: #fff; }
.nw-btn-primary:hover { background: var(--blue-dark); }
.nw-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nw-burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* search overlay */
.nw-search-pop { display: none; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.nw-search-pop.open { display: block; }
.nw-search-pop form { display: flex; gap: 12px; padding: 18px 0; }
.nw-search-pop input { flex: 1; font-size: 16px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; outline: none; font-family: var(--font-body); }
.nw-search-pop input:focus { border-color: var(--blue); }

/* ---------- section scaffolding ---------- */
.nw-section { padding: 48px 0; }
.nw-section-alt { background: var(--bg-alt); }
.nw-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.nw-section-head h2 { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.nw-viewall { font-size: 14px; font-weight: 600; color: var(--blue); }
.nw-viewall:hover { text-decoration: underline; }

/* chips + meta */
.nw-chip { display: inline-block; align-self: flex-start; width: fit-content; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); background: var(--chip-bg); border-radius: 6px; padding: 3px 9px; }
.nw-meta { font-size: 13px; color: var(--muted); }
.nw-meta a { font-weight: 500; color: var(--muted); }
.nw-meta a:hover { color: var(--blue); }

/* ---------- hero: top story + side stack ---------- */
.nw-hero { padding: 32px 0 48px; }
.nw-hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; }
.nw-topstory { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; background: var(--navy); }
.nw-topstory img.bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.nw-topstory-inner { position: relative; padding: 36px; background: linear-gradient(0deg, rgba(10,26,60,.92) 20%, rgba(10,26,60,0)); width: 100%; }
.nw-topstory .nw-chip { background: rgba(255,255,255,.14); color: #fff; margin-bottom: 14px; }
.nw-topstory h1 { font-family: var(--font-display); font-size: 34px; line-height: 1.2; font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -0.01em; }
.nw-topstory p { color: #cbd5e1; font-size: 15px; max-width: 60ch; margin-bottom: 16px; }
.nw-topstory .nw-meta { color: #94a3b8; margin-bottom: 18px; }
.nw-topstory .nw-meta a { color: #e2e8f0; }
.nw-sidestack { display: flex; flex-direction: column; }
.nw-siderow { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.nw-siderow:first-child { padding-top: 0; }
.nw-siderow:last-child { border-bottom: 0; }
.nw-siderow img { width: 110px; height: 78px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.nw-siderow h3 { font-family: var(--font-display); font-size: 15.5px; line-height: 1.35; font-weight: 700; margin: 6px 0 4px; }
.nw-siderow h3 a:hover { color: var(--blue); }

/* ---------- latest news cards ---------- */
.nw-cardrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.nw-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease; }
.nw-card:hover { box-shadow: 0 8px 24px rgba(15,23,42,.08); transform: translateY(-2px); }
.nw-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.nw-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nw-card h3 { font-family: var(--font-display); font-size: 16.5px; line-height: 1.35; font-weight: 700; }
.nw-card h3 a:hover { color: var(--blue); }
.nw-card .nw-meta { margin-top: auto; }

/* ---------- net worth profiles ---------- */
.nw-worth-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.nw-worth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; gap: 16px; align-items: center; transition: box-shadow .15s ease; }
.nw-worth-card:hover { box-shadow: 0 8px 24px rgba(15,23,42,.08); }
.nw-worth-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.nw-worth-initial { width: 72px; height: 72px; border-radius: 50%; flex: 0 0 auto; background: var(--chip-bg); color: var(--blue); font-family: var(--font-display); font-weight: 800; font-size: 28px; display: flex; align-items: center; justify-content: center; }
.nw-worth-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1.3; }
.nw-worth-card .sub { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.nw-worth-card .go { font-size: 13.5px; font-weight: 600; color: var(--blue); }

/* ---------- newsletter band ---------- */
.nw-news-cta { background: var(--navy); border-radius: var(--radius); color: #fff; padding: 44px 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.nw-news-cta h2 { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; }
.nw-news-cta p { color: #cbd5e1; font-size: 15px; }
.nw-news-cta form { display: flex; gap: 10px; }
.nw-news-cta input { flex: 1; padding: 13px 18px; border-radius: 999px; border: 0; font-size: 15px; font-family: var(--font-body); outline: none; }
.nw-news-cta .fineprint { font-size: 12px; color: #94a3b8; margin-top: 10px; }

/* ---------- more-from grid ---------- */
.nw-more-grid { display: grid; grid-template-columns: 260px 1fr; gap: 36px; }
.nw-cat-list li a { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink); }
.nw-cat-list li a:hover { background: var(--chip-bg); color: var(--blue); }
.nw-cat-list li a span.count { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.nw-more-posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 32px; }
.nw-more-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.nw-more-item img { width: 92px; height: 64px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.nw-more-item h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.35; margin: 2px 0 4px; }
.nw-more-item h3 a:hover { color: var(--blue); }

/* ---------- trust row ---------- */
.nw-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.nw-trust-item { display: flex; gap: 14px; align-items: flex-start; }
.nw-trust-item .ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--chip-bg); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }
.nw-trust-item h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.nw-trust-item p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- footer ---------- */
.nw-footer { background: var(--navy-deep); color: #cbd5e1; margin-top: 56px; }
.nw-footer .wrap { padding-top: 52px; padding-bottom: 32px; }
.nw-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.12); }
.nw-footer .wordmark { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: #fff; letter-spacing: -0.02em; }
.nw-footer .tagline { font-size: 13px; color: #94a3b8; margin-top: 4px; }
.nw-footer h4 { font-family: var(--font-display); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.nw-footer li { margin-bottom: 9px; }
.nw-footer li a { font-size: 14px; color: #cbd5e1; }
.nw-footer li a:hover { color: #fff; }
.nw-footer-bottom { padding-top: 24px; font-size: 13px; color: #94a3b8; }

/* ---------- article ---------- */
.nw-article { max-width: 760px; margin: 44px auto 0; padding: 0 24px; }
.nw-article .nw-chip { margin-bottom: 14px; }
.nw-article h1 { font-family: var(--font-display); font-size: 38px; line-height: 1.18; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 16px; }
.nw-byline { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.nw-byline img { width: 40px; height: 40px; border-radius: 50%; }
.nw-byline .who { font-size: 14px; font-weight: 600; }
.nw-byline .who a:hover { color: var(--blue); }
.nw-byline .when { font-size: 13px; color: var(--muted); }
.nw-article-hero img { border-radius: var(--radius); margin-bottom: 30px; }
.nw-prose { font-size: 17.5px; line-height: 1.75; color: #1e293b; }
.nw-prose p { margin-bottom: 1.2em; }
.nw-prose h2 { font-family: var(--font-display); font-size: 27px; font-weight: 800; margin: 1.6em 0 .6em; letter-spacing: -0.01em; }
.nw-prose h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin: 1.4em 0 .5em; }
.nw-prose a { color: var(--blue); text-decoration: underline; text-decoration-color: #bfdbfe; text-underline-offset: 2px; }
.nw-prose img { border-radius: 10px; margin: 1.4em 0; }
.nw-prose ul, .nw-prose ol { margin: 0 0 1.2em 1.4em; }
.nw-prose ul { list-style: disc; }
.nw-prose ol { list-style: decimal; }
.nw-prose li { margin-bottom: .4em; }
.nw-prose blockquote { border-left: 3px solid var(--blue); padding-left: 18px; color: var(--muted); margin: 1.4em 0; }
.nw-prose table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: 15px; }
.nw-prose th, .nw-prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.nw-prose th { background: var(--bg-alt); font-weight: 600; }
.nw-related { max-width: 760px; margin: 48px auto 0; padding: 0 24px; }
.nw-related h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 18px; }

/* ---------- archive ---------- */
.nw-archive { padding: 40px 0; }
.nw-archive-title { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.nw-archive-sub { color: var(--muted); font-size: 15px; margin-bottom: 30px; }
.nw-archive .nw-cardrow { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
.nw-pagi { display: flex; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.nw-pagi a, .nw-pagi span { padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 500; }
.nw-pagi span.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.nw-pagi a:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
	.nw-nav { display: none; }
	.nw-nav.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px 18px; }
	.nw-burger { display: block; margin-left: auto; }
	.nw-header .wrap { gap: 16px; }
	.nw-actions .nw-btn { display: none; }
	.nw-hero-grid, .nw-news-cta, .nw-more-grid { grid-template-columns: 1fr; }
	.nw-cardrow, .nw-worth-row { grid-template-columns: repeat(2, 1fr); }
	.nw-trust { grid-template-columns: repeat(2, 1fr); }
	.nw-footer-grid { grid-template-columns: 1fr 1fr; }
	.nw-topstory { min-height: 380px; }
	.nw-topstory h1 { font-size: 27px; }
	.nw-archive .nw-cardrow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.nw-cardrow, .nw-worth-row, .nw-trust, .nw-more-posts, .nw-archive .nw-cardrow { grid-template-columns: 1fr; }
	.nw-article h1 { font-size: 29px; }
	.nw-news-cta { padding: 32px 24px; }
	.nw-news-cta form { flex-direction: column; }
	.nw-ticker .wrap { padding-right: 0; }
	.nw-section { padding: 36px 0; }
}
