/* ============================================================
   MyStocks News — shared theme & components
   Mirrors src/app/globals.css token system (light + institutional navy dark)
   ============================================================ */
:root {
  --bg: #F5F7FB;
  --card: #ffffff;
  --ink: #162660;
  --ink-2: #0F1A45;
  --muted: #5c667a;
  --muted-2: #8b95a7;
  --line: #e6eaf2;
  --primary: #3F51B5;
  --primary-2: #4154B3;
  --blue: #057eff;
  --teal: #009688;
  --teal-soft: #E0F5F2;
  --gold: #c69332;
  --green: #0d8a4e;
  --red: #d92d20;
  --shadow-sm: 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow: 0 8px 32px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 24px 70px rgba(16, 24, 40, 0.14);
  --radius: 16px;
  --radius-lg: 24px;
}
[data-theme="dark"] {
  --bg: #0F1A45;
  --card: #162660;
  --ink: #F0F4FF;
  --ink-2: #ffffff;
  --muted: #7B8FBF;
  --muted-2: #5f72a8;
  --line: #2D3F80;
  --primary: #7986CB;
  --primary-2: #7986CB;
  --blue: #57a5ff;
  --teal: #1ad6c0;
  --teal-soft: rgba(0,150,136,0.16);
  --gold: #e0b65a;
  --green: #34d399;
  --red: #f87171;
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.30);
  --shadow: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 70px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.55;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { letter-spacing: -0.025em; line-height: 1.12; margin: 0; }
.wrap { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }

/* ---------- Buttons / pills / eyebrows ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; border: 0; font: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--ink), var(--primary));
  box-shadow: 0 10px 24px rgba(63,81,181,0.26);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 30px rgba(63,81,181,0.34); }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  width: fit-content; background: var(--teal-soft); color: var(--teal);
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em;
}
.ai-spark { width: 13px; height: 13px; flex: 0 0 auto; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.pill.cat { background: var(--bg); color: var(--primary); border: 1px solid var(--line); }
.pill.ai-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--teal-soft); color: var(--teal); }
.sentiment { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.sentiment.pos { color: var(--green); } .sentiment.neg { color: var(--red); } .sentiment.neu { color: var(--gold); }

/* ---------- Section head ---------- */
.section-head { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.section-head h2 { font-size: 21px; }
.section-head .rule { flex: 1; height: 1px; background: var(--line); }
.section-head a.more { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.nav { height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(22,38,96,0.12); overflow: hidden;
}
.brand-mark img { width: 26px; height: 26px; object-fit: contain; display: block; }
.brand-name { font-size: 19px; letter-spacing: -0.03em; }
.brand-name span { color: var(--teal); }
.brand-tag {
  margin-left: 2px; padding: 3px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal);
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { padding: 8px 13px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .18s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--bg); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; min-width: 220px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted);
}
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); width: 100%; }
.search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; transition: all .18s ease;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 22px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line);
  background: var(--card); font-size: 13.5px; font-weight: 700; color: var(--muted); transition: all .18s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Hero ---------- */
main { padding: 30px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; margin-bottom: 40px; }
.feature-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 460px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(135deg, #1c2e71, #0F1A45); box-shadow: var(--shadow-lg); isolation: isolate;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(1200px 480px at 80% -10%, rgba(0,150,136,0.30), transparent 60%),
              radial-gradient(900px 420px at 0% 110%, rgba(63,81,181,0.42), transparent 55%);
}
.feature-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
                    linear-gradient(180deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: linear-gradient(to top, black, transparent 70%);
}
.feature-body { padding: 34px; color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.chip.market { background: rgba(255,255,255,0.14); color: #fff; }
.chip.ai { background: rgba(0,150,136,0.22); color: #5eead4; border: 1px solid rgba(0,150,136,0.4); }
.feature-body h1 { margin: 16px 0 0; font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; color: #fff; max-width: 90%; }
.feature-body p { margin: 14px 0 0; color: rgba(240,244,255,0.8); font-size: 16px; max-width: 88%; }
.feature-meta { margin-top: 22px; display: flex; align-items: center; gap: 14px; font-size: 13px; color: rgba(240,244,255,0.7); font-weight: 600; }
.feature-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
.delta-up { color: #34d399; font-weight: 800; }
.a-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.side-stack { display: grid; gap: 18px; grid-template-rows: repeat(3, 1fr); }
.mini {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mini:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini .thumb { width: 88px; height: 88px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 13px; letter-spacing: .04em; }
.mini h3 { font-size: 15px; font-weight: 700; margin-top: 2px; }
.mini .m-meta { margin-top: 7px; font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; }

/* ---------- Layout: feed + sidebar ---------- */
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.feed { display: grid; gap: 18px; }
.article {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.article:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.article .thumb { border-radius: 12px; min-height: 150px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .05em; position: relative; overflow: hidden; }
.article .thumb .ex-badge { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 8px; background: rgba(0,0,0,0.32); backdrop-filter: blur(6px); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; }
.article-body { display: flex; flex-direction: column; }
.article-body h3 { margin: 11px 0 0; font-size: 19px; font-weight: 700; }
.article-body p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.ai-summary {
  margin: 12px 0 0; padding: 11px 13px; border-radius: 11px; background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent); font-size: 13px; color: var(--ink);
  display: flex; gap: 9px; align-items: flex-start;
}
.ai-summary .ai-spark { color: var(--teal); margin-top: 2px; }
.ai-summary b { color: var(--teal); font-weight: 800; }
.a-foot { margin-top: auto; padding-top: 13px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.a-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ---------- Sidebar panels ---------- */
aside { position: sticky; top: 92px; display: grid; gap: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.panel-head h3 { font-size: 15px; font-weight: 800; }
.panel-head svg { width: 17px; height: 17px; color: var(--primary); }
.ai-digest { background: linear-gradient(150deg, #162660, #0F1A45); color: #fff; position: relative; overflow: hidden; border: 0; }
.ai-digest::after { content: ""; position: absolute; inset: 0; opacity: .6; background: radial-gradient(420px 200px at 110% -20%, rgba(0,150,136,0.4), transparent 60%); pointer-events: none; }
.ai-digest .panel-head h3 { color: #fff; } .ai-digest .panel-head svg { color: #5eead4; }
.ai-digest p { margin: 0 0 14px; font-size: 13.5px; color: rgba(240,244,255,0.84); position: relative; }
.digest-item { position: relative; display: flex; gap: 11px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,0.10); font-size: 13.5px; }
.digest-item:first-of-type { border-top: 0; }
.digest-num { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; background: rgba(0,150,136,0.24); color: #5eead4; font-size: 12px; font-weight: 800; }
.digest-item span { color: rgba(240,244,255,0.9); }
.movers, .trend { margin: 0; padding: 0; }
.movers li { list-style: none; display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.movers li:first-child { border-top: 0; }
.mv-sym { width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.mv-name { font-size: 14px; font-weight: 700; } .mv-ex { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mv-right { margin-left: auto; text-align: right; }
.mv-price { font-size: 14px; font-weight: 800; } .mv-chg { font-size: 12px; font-weight: 800; }
.mv-chg.up { color: var(--green); } .mv-chg.down { color: var(--red); }
.trend li { list-style: none; display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.trend li:first-child { border-top: 0; }
.trend .rank { font-size: 20px; font-weight: 900; color: var(--line); width: 26px; }
.trend .t-title { font-size: 13.5px; font-weight: 700; } .trend .t-meta { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.subscribe { text-align: center; }
.subscribe .ico { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--teal)); color: #fff; }
.subscribe h3 { font-size: 17px; font-weight: 800; } .subscribe p { font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.sub-form { display: flex; flex-direction: column; gap: 9px; }
.sub-form input { height: 44px; border: 1px solid var(--line); border-radius: 11px; padding: 0 14px; font: inherit; font-size: 14px; background: var(--bg); color: var(--ink); outline: none; }
.sub-form input:focus { border-color: var(--primary); }
.sub-form button { height: 44px; justify-content: center; }
.sub-note { margin-top: 10px; font-size: 12px; color: var(--muted); min-height: 16px; }
.sub-note.ok { color: var(--green); font-weight: 700; }

/* ---------- Stats band ---------- */
.stats-band {
  margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--card); padding: 24px 22px; }
.stat strong { display: block; font-size: clamp(26px, 3vw, 34px); font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }

/* ---------- Exchange strip ---------- */
.ex-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ex-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.ex-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ex-top { display: flex; align-items: center; gap: 10px; }
.ex-badge2 { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }
.ex-name { font-size: 14px; font-weight: 800; } .ex-loc { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ex-val { margin-top: 16px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.ex-chg { margin-top: 4px; font-size: 13px; font-weight: 800; }
.ex-chg.up { color: var(--green); } .ex-chg.down { color: var(--red); }
.spark { margin-top: 12px; width: 100%; height: 38px; }

/* ---------- Category section grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-news { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; display: flex; flex-direction: column; }
.card-news:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-news .cover { height: 150px; display: grid; place-items: center; color: #fff; font-weight: 900; letter-spacing: .05em; position: relative; }
.card-news .cover .ex-badge { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 8px; background: rgba(0,0,0,0.32); backdrop-filter: blur(6px); font-size: 10.5px; font-weight: 800; }
.card-news .cb { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-news h3 { font-size: 16px; font-weight: 700; margin-top: 10px; }
.card-news p { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.card-news .a-foot { font-size: 12px; }

/* ---------- AI banner ---------- */
.ai-banner {
  margin: 46px 0 0; border-radius: var(--radius-lg); padding: 42px;
  background: linear-gradient(135deg, #1c2e71, #0F1A45); box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden; color: #fff; display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; align-items: center;
}
.ai-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 90% 0%, rgba(0,150,136,0.34), transparent 60%); }
.ai-banner > * { position: relative; }
.ai-banner h2 { font-size: clamp(24px, 3vw, 34px); color: #fff; margin-top: 14px; }
.ai-banner p { color: rgba(240,244,255,0.82); font-size: 15.5px; margin: 14px 0 0; max-width: 95%; }
.ai-feats { display: grid; gap: 12px; }
.ai-feat { display: flex; gap: 13px; align-items: flex-start; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); border-radius: 14px; padding: 15px; }
.ai-feat .fi { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: rgba(0,150,136,0.22); color: #5eead4; }
.ai-feat .fi svg { width: 19px; height: 19px; }
.ai-feat h4 { font-size: 14.5px; color: #fff; } .ai-feat p { font-size: 12.5px; margin-top: 4px; color: rgba(240,244,255,0.72); }

/* ---------- Newsletter wide CTA ---------- */
.cta-wide {
  margin: 46px 0 0; border-radius: var(--radius-lg); padding: 40px; text-align: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cta-wide h2 { font-size: clamp(22px, 3vw, 30px); }
.cta-wide p { color: var(--muted); margin: 12px auto 22px; max-width: 540px; }
.cta-form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.cta-form input { flex: 1; height: 48px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; font: inherit; font-size: 15px; background: var(--bg); color: var(--ink); outline: none; }
.cta-form input:focus { border-color: var(--primary); }
.cta-form .btn { height: 48px; }

/* ---------- Footer ---------- */
footer.site { margin-top: 60px; border-top: 1px solid var(--line); background: var(--card); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding: 46px 0 30px; }
.foot-brand p { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; max-width: 280px; }
.foot-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.foot-col a { display: block; margin-top: 11px; font-size: 14px; color: var(--ink); font-weight: 600; }
.foot-col a:hover { color: var(--primary); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 600; flex-wrap: wrap; }
.foot-bottom .socials { display: flex; gap: 8px; }
.disclaimer { font-size: 11.5px; color: var(--muted-2); padding: 0 0 26px; max-width: 760px; line-height: 1.6; }

/* ============================================================
   Article reading page
   ============================================================ */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { opacity: .5; }
.read-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.read-main { max-width: 760px; }
.read-main h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; margin: 14px 0 0; }
.read-meta { display: flex; align-items: center; gap: 14px; margin-top: 20px; font-size: 13.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.byline { display: flex; align-items: center; gap: 10px; }
.byline .ava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; background: linear-gradient(135deg, var(--primary), var(--teal)); }
.read-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
.hero-img { margin: 24px 0; height: clamp(240px, 38vw, 420px); border-radius: var(--radius-lg); position: relative; overflow: hidden; display: grid; place-items: end start; box-shadow: var(--shadow); }
.hero-img .cap { padding: 16px 20px; color: #fff; font-size: 12.5px; font-weight: 600; background: linear-gradient(to top, rgba(0,0,0,0.5), transparent); width: 100%; }
.prose { font-size: 16.5px; line-height: 1.75; color: var(--ink); }
.prose p { margin: 0 0 20px; }
.prose h2 { font-size: 24px; margin: 34px 0 14px; }
.prose h3 { font-size: 19px; margin: 26px 0 10px; }
.prose ul { margin: 0 0 20px; padding-left: 22px; } .prose li { margin: 8px 0; }
.prose blockquote { margin: 24px 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--teal); font-size: 18px; font-style: italic; color: var(--ink); }
.prose a.link { color: var(--primary); font-weight: 700; border-bottom: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.ai-keypoints {
  margin: 8px 0 28px; padding: 22px; border-radius: var(--radius); background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent);
}
.ai-keypoints .kp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.ai-keypoints .kp-head h3 { font-size: 15px; color: var(--teal); }
.ai-keypoints .kp-head svg { width: 17px; height: 17px; color: var(--teal); }
.ai-keypoints ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.ai-keypoints li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.ai-keypoints li svg { width: 17px; height: 17px; color: var(--teal); flex: 0 0 auto; margin-top: 3px; }
.share-row { display: flex; gap: 8px; align-items: center; margin: 30px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-row span { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.read-side { position: sticky; top: 92px; display: grid; gap: 20px; }
.disclosure { font-size: 12px; color: var(--muted-2); line-height: 1.6; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* AI sentiment gauge */
.gauge { text-align: center; }
.gauge .meter { width: 100%; height: 9px; border-radius: 999px; background: linear-gradient(90deg, var(--red), var(--gold), var(--green)); position: relative; margin: 16px 0 8px; }
.gauge .needle { position: absolute; top: -5px; width: 4px; height: 19px; background: var(--ink); border-radius: 4px; transform: translateX(-50%); box-shadow: 0 0 0 3px var(--card); }
.gauge .labels { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); }
.gauge .score { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 14px; }
.gauge .verdict { font-size: 13px; font-weight: 800; margin-top: 2px; }

/* ============================================================
   Markets page
   ============================================================ */
.idx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.heat { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.heat .cell { border-radius: 10px; padding: 14px 12px; color: #fff; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; }
.heat .cell .s { font-size: 13px; font-weight: 800; } .heat .cell .c { font-size: 12px; font-weight: 700; opacity: .95; }
.mkt-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mkt-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mkt-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mkt-table tr:last-child td { border-bottom: 0; }
.mkt-table tbody tr:hover { background: var(--bg); }
.mkt-table .sym { font-weight: 800; } .mkt-table .nm { color: var(--muted); font-size: 12.5px; }
.mkt-table .up { color: var(--green); font-weight: 800; } .mkt-table .down { color: var(--red); font-weight: 800; }
.mkt-table .right { text-align: right; }

/* ============================================================
   AI Insights page — chat demo + sentiment
   ============================================================ */
.ai-hero {
  border-radius: var(--radius-lg); padding: 48px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1c2e71, #0F1A45); box-shadow: var(--shadow-lg); margin-bottom: 40px;
}
.ai-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 380px at 85% -10%, rgba(0,150,136,0.36), transparent 60%); }
.ai-hero > * { position: relative; }
.ai-hero h1 { font-size: clamp(30px, 4.4vw, 52px); color: #fff; margin-top: 16px; max-width: 760px; }
.ai-hero p { color: rgba(240,244,255,0.84); font-size: 17px; margin: 16px 0 0; max-width: 620px; }
.chat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; min-height: 460px;
}
.chat-top { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.chat-top .ai-ava { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--teal)); }
.chat-top .ai-ava svg { width: 18px; height: 18px; }
.chat-top .t b { font-size: 14px; } .chat-top .t small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.chat-top .live { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.chat-top .live .d { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chat-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; overflow-y: auto; }
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg .b { padding: 12px 15px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg.user .b { background: linear-gradient(135deg, var(--ink), var(--primary)); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai .b { background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.msg .av { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.msg.ai .av { background: linear-gradient(135deg, var(--primary), var(--teal)); }
.msg.user .av { background: var(--muted); }
.chat-input { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; height: 46px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; font: inherit; font-size: 14px; background: var(--bg); color: var(--ink); outline: none; }
.chat-input input:focus { border-color: var(--primary); }
.chat-input button { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.suggest button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .16s ease; }
.suggest button:hover { border-color: var(--primary); color: var(--primary); }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.feat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.feat-card .fi { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); margin-bottom: 14px; }
.feat-card .fi svg { width: 22px; height: 22px; }
.feat-card h3 { font-size: 17px; } .feat-card p { color: var(--muted); font-size: 14px; margin: 9px 0 0; }

/* page hero (generic) */
.page-hero { padding: 14px 0 30px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; margin-top: 14px; }
.page-hero p { color: var(--muted); font-size: 17px; margin: 14px 0 0; max-width: 620px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  aside, .read-side { position: static; }
  aside { grid-template-columns: 1fr 1fr; display: grid; }
  .ai-banner { grid-template-columns: 1fr; }
  .read-layout { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .idx-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .search { display: none; }
  .menu-toggle { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 380px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .ex-strip { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  aside { grid-template-columns: 1fr; }
  .heat { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .article { grid-template-columns: 1fr; }
  .article .thumb { min-height: 170px; }
  .foot-grid { grid-template-columns: 1fr; }
  .feature-body { padding: 24px; }
  .ai-banner, .ai-hero { padding: 28px; }
  .brand-tag { display: none; }
  .stats-band, .ex-strip, .cat-grid { grid-template-columns: 1fr; }
  .idx-grid { grid-template-columns: 1fr; }
  .cta-form { flex-direction: column; }
  .cta-form .btn { width: 100%; justify-content: center; }
  .heat { grid-template-columns: repeat(2, 1fr); }
  .mkt-table .hide-sm { display: none; }
}
