/* Jan Pulse · design tokens inspired by contemporary Dribbble dashboards: soft bento cards, big numerals, gradient accents. */
:root {
  --bg: #F1F2F9; --card: #FFFFFF; --ink: #14152B; --ink2: #4A4C6A; --muted: #8587A6; --line: #E8E9F4;
  --pri: #5B5BF0; --pri2: #8A63F5; --pri-soft: #EDEDFF;
  --pos: #14C48B; --neg: #FF5470; --warn: #FFA928; --sky: #3BA7FF;
  --shadow: 0 1px 2px rgba(20, 21, 43, .04), 0 18px 40px -18px rgba(40, 40, 120, .18);
  --r: 28px;
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[data-theme='dark'] {
  --bg: #0B0C18; --card: #14152A; --ink: #F3F4FF; --ink2: #BDBFDD; --muted: #7C7FA3; --line: #25274A;
  --pri-soft: #23255C; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7);
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
b { font-weight: 700; }
small { color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); } .sm { font-size: 12px; } .r { text-align: right; }
.ic { flex: none; }

/* layout */
.app { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; padding: 20px 28px 48px 20px; max-width: 1560px; margin: 0 auto; }
.rail { position: sticky; top: 20px; height: calc(100vh - 40px); background: var(--card); border-radius: 34px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; padding: 18px 0; gap: 14px; }
.logo { width: 50px; height: 50px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #5B5BF0, #A36CF5); box-shadow: 0 10px 24px -8px rgba(91, 91, 240, .7); }
.rail nav { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; flex: 1; }
.nav { width: 66px; height: 62px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); transition: all .2s; }
.nav span { font-size: 10.5px; font-weight: 600; }
.nav:hover { color: var(--ink); background: var(--bg); }
.nav.on { color: #fff; background: linear-gradient(135deg, #5B5BF0, #8A63F5); box-shadow: 0 12px 24px -10px rgba(91, 91, 240, .8); }
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 6px 4px 16px; }
.tb-l h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.tb-l p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tb-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ribbon { display: flex; align-items: center; gap: 8px; padding: 9px 16px; margin-bottom: 20px; border-radius: 16px; background: color-mix(in srgb, var(--warn) 14%, var(--card)); color: var(--ink2); font-size: 12.5px; }
.ribbon a { color: var(--pri); font-weight: 700; text-decoration: none; }
.pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 0 var(--warn); animation: pulse 2s infinite; flex: none; }
.pdot.live { background: var(--pos); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; align-items: start; }
.span3 { grid-column: span 3; } .span4 { grid-column: span 4; } .span5 { grid-column: span 5; } .span7 { grid-column: span 7; } .span8 { grid-column: span 8; } .span12 { grid-column: span 12; }
.stackcol { display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow); animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; min-width: 0; }
.bento > :nth-child(2) { animation-delay: .05s; } .bento > :nth-child(3) { animation-delay: .1s; } .bento > :nth-child(4) { animation-delay: .15s; } .bento > :nth-child(5) { animation-delay: .2s; } .bento > :nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ch { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ch h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.ch p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card h5, .blk h5, .brief h5 { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.card > h5:first-child { margin-top: 0; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* controls */
.seg { display: inline-flex; background: var(--card); border-radius: 15px; padding: 4px; box-shadow: var(--shadow); }
.seg button { padding: 7px 14px; border-radius: 11px; font-weight: 700; font-size: 12.5px; color: var(--muted); transition: all .2s; }
.seg button.on { background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; box-shadow: 0 8px 16px -8px rgba(91, 91, 240, .8); }
.sel, .filters select, .search { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; font-weight: 600; font-size: 13px; outline: none; box-shadow: var(--shadow); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select, .search { padding: 7px 12px; box-shadow: none; background: var(--bg); border-color: transparent; font-size: 12.5px; }
.search { min-width: 200px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 14px; background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 12px 22px -12px rgba(91, 91, 240, .9); transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: var(--bg); color: var(--ink); box-shadow: none; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--pri); font-weight: 700; font-size: 12.5px; }
.link:hover { text-decoration: underline; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; background: var(--pri-soft); color: var(--pri); font-weight: 700; font-size: 11.5px; }
.chip.ghost { background: var(--bg); color: var(--ink2); font-weight: 600; }
.chip.on { background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.avatar { width: 40px; height: 40px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(135deg, #FFB86B, #FF7A59); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; border-radius: 20px; font-size: 18px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 12px; } .avatar.xl { width: 76px; height: 76px; border-radius: 28px; }
.avatar.ai { background: linear-gradient(135deg, #5B5BF0, #A36CF5); }
.avatar.opp { background: linear-gradient(135deg, #5CC0FF, #3B7BF7); }
.avatar.me { background: linear-gradient(135deg, #14C48B, #2BD9C4); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tag.pos { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.tag.neg { color: var(--neg); background: color-mix(in srgb, var(--neg) 14%, transparent); }
.tag.neu { color: var(--muted); background: var(--bg); }
.tag.warn { color: #D98400; background: color-mix(in srgb, var(--warn) 18%, transparent); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-weight: 800; font-size: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.delta { display: inline-flex; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.delta.up { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.delta.down { color: var(--neg); background: color-mix(in srgb, var(--neg) 14%, transparent); }
.chb { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 5px; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-size: 10.5px; font-weight: 800; flex: none; }
.party { padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; background: var(--bg); color: var(--ink2); }
.party.BJP { background: #FFF0E0; color: #E8680E; } .party.INC { background: #E4F2FF; color: #2A78D6; }
[data-theme='dark'] .party.BJP { background: #3F2A15; } [data-theme='dark'] .party.INC { background: #14304F; }

/* hero */
.hero { grid-column: span 7; position: relative; overflow: hidden; color: #fff; padding: 28px; background: linear-gradient(135deg, #4D4DEB 0%, #7A5BF2 55%, #B565F2 100%); min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; }
.hero .blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; pointer-events: none; }
.blob.b1 { width: 260px; height: 260px; background: #FF7AD0; right: -60px; top: -80px; } .blob.b2 { width: 220px; height: 220px; background: #3BA7FF; left: 30%; bottom: -120px; }
.hero > * { position: relative; }
.hero-top { display: flex; gap: 16px; align-items: center; }
.hero .avatar.lg { background: rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.hero h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.hero-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 18px 0; }
.big { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.big .cu { font-size: 78px; line-height: .95; font-weight: 800; letter-spacing: -.045em; }
.big small { color: rgba(255, 255, 255, .8); font-size: 13.5px; }
.hero .delta { background: rgba(255, 255, 255, .22); color: #fff; margin-top: 6px; }
.hero-spark { flex: 1; max-width: 280px; }
.hero-bot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); border-radius: 22px; padding: 14px 18px; }
.hero-bot span { display: block; font-size: 11.5px; opacity: .75; } .hero-bot b { font-size: 20px; font-weight: 800; }

.kpi-grid { grid-column: span 5; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kpi { padding: 20px 22px; display: flex; flex-direction: column; justify-content: space-between; min-height: 155px; }
.kl { font-size: 12px; color: var(--muted); font-weight: 700; }
.kv { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; } .kv b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.kp { color: var(--ink2); font-size: 12px; font-weight: 600; }
.kpi.warn { background: linear-gradient(160deg, color-mix(in srgb, var(--warn) 22%, var(--card)), var(--card)); }
.ks, .ispark { height: 36px; } .gauge { max-width: 140px; margin-top: -10px; }
.span3.kpi { min-height: 112px; }
.compact .prow { grid-template-columns: auto minmax(0, 1fr); } .compact .pstats { grid-column: 2; flex-wrap: wrap; gap: 10px; }

/* charts */
.chart { display: block; overflow: visible; } .gl { stroke: var(--line); stroke-dasharray: 3 5; } .gt { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.hov { fill: transparent; } .hov:hover { fill: color-mix(in srgb, var(--pri) 10%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12px; color: var(--ink2); }
.legend i, .dl i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; } .legend em { font-style: normal; color: var(--muted); }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; } .donut { position: relative; flex: none; } .donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-c b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; } .donut-c span { font-size: 11px; color: var(--muted); }
.dl { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 9px; } .dl div { display: flex; align-items: center; font-size: 13px; } .dl span { flex: 1; color: var(--ink2); }
.stackbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--line); } .stackbar.thin { height: 9px; } .stackbar span { display: block; min-width: 3px; transition: width .6s; }
.hbars { display: flex; flex-direction: column; gap: 15px; } .hb.click { cursor: pointer; }
.hb-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; } .hb-r { color: var(--muted); font-weight: 700; white-space: nowrap; }
.hb-track { height: 8px; border-radius: 99px; background: var(--line); margin-top: 7px; overflow: hidden; } .hb-track i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.hb-sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.tilemap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, 76px); gap: 10px; padding: 6px; border-radius: 22px; background-image: radial-gradient(var(--line) 1.4px, transparent 1.4px); background-size: 18px 18px; }
.tile { text-align: left; border-radius: 22px; padding: 11px 14px; display: flex; flex-direction: column; justify-content: space-between; color: var(--fg); background: color-mix(in srgb, var(--tone) calc(var(--i) * 88%), var(--card)); transition: transform .2s, box-shadow .2s; border: 2px solid transparent; position: relative; }
.tile:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 26px -14px var(--tone); } .tile.sel { border-color: var(--ink); }
.t-name { font-weight: 800; font-size: 13px; } .t-hi { font-size: 11px; opacity: .7; } .t-val { position: absolute; right: 12px; bottom: 9px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.tip { position: fixed; z-index: 200; pointer-events: none; background: #14152B; color: #fff; padding: 8px 12px; border-radius: 12px; font-size: 12px; max-width: 260px; opacity: 0; transition: opacity .12s; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); line-height: 1.5; }
.tip.on { opacity: 1; } .tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* posts, alerts, tables */
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 10px; border-radius: 18px; cursor: pointer; transition: background .15s; }
.prow:hover { background: var(--bg); } .prow + .prow { border-top: 1px solid var(--line); }
.pmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; } .pmeta span { color: var(--muted); }
.pbody p { font-size: 13.5px; font-weight: 600; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pstats { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; } .pstats span { display: inline-flex; align-items: center; gap: 4px; }
.tr { font-style: normal; font-weight: 800; color: var(--pri); background: var(--pri-soft); border-radius: 12px; padding: 5px 9px; }
.rank { display: flex; align-items: center; gap: 4px; } .rank .prow { flex: 1; } .rn { width: 26px; text-align: center; font-weight: 800; color: var(--muted); }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; } .sdot.pos { background: var(--pos); } .sdot.neg { background: var(--neg); } .sdot.neu { background: var(--muted); }
.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 18px; background: var(--bg); transition: transform .15s; } .alert:hover { transform: translateX(3px); }
.alert p { font-size: 12px; color: var(--muted); margin-top: 2px; } .alert em { font-style: normal; font-weight: 800; font-size: 13px; }
.ad { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; }
.alert.high .ad { background: color-mix(in srgb, var(--neg) 16%, transparent); color: var(--neg); } .alert.high em { color: var(--neg); }
.alert.med .ad { background: color-mix(in srgb, var(--warn) 20%, transparent); color: #D98400; } .alert.med em { color: #D98400; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; font-weight: 800; } .tbl th.r { text-align: right; }
.tbl td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: middle; } .tbl td small { display: block; margin-top: 2px; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td, .tbl tr.hl td { background: var(--bg); }
.tbl tr.click td:first-child, .tbl tr.hl td:first-child { border-radius: 14px 0 0 14px; } .tbl tr.click td:last-child, .tbl tr.hl td:last-child { border-radius: 0 14px 14px 0; }

/* ask */
.askwrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.chatcard { padding: 0; height: calc(100vh - 175px); min-height: 560px; display: flex; flex-direction: column; overflow: hidden; }
.welcome { flex: 1; overflow: auto; padding: 34px 30px 10px; text-align: center; } .welcome h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 6px; } .welcome > p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.welcome .avatar.xl { margin: 0 auto; box-shadow: 0 20px 40px -14px rgba(91, 91, 240, .7); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; text-align: left; }
.pcard { background: var(--bg); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 6px; text-align: left; transition: all .2s; border: 1px solid transparent; }
.pcard:hover { transform: translateY(-3px); background: var(--card); border-color: var(--pri); box-shadow: 0 16px 30px -18px var(--pri); }
.pi { width: 36px; height: 36px; border-radius: 13px; display: grid; place-items: center; background: var(--pri-soft); color: var(--pri); } .pcard p { color: var(--muted); font-size: 12.5px; }
.msgs { position: relative; flex: 1; overflow: auto; padding: 26px 28px 60px; display: flex; flex-direction: column; gap: 20px; scroll-behavior: smooth; }
.msg { display: flex; gap: 12px; align-items: flex-start; animation: rise .4s both; } .msg.user { justify-content: flex-end; }
.msg.user .bub { background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; padding: 12px 18px; border-radius: 22px 22px 6px 22px; max-width: 70%; font-weight: 600; }
.msg.ai .bub { background: var(--bg); padding: 18px 20px; border-radius: 6px 24px 24px 24px; min-width: 0; flex: 1; max-width: 100%; }
.bub.thinking { display: flex; gap: 5px; align-items: center; flex: none !important; padding: 16px 20px !important; } .thinking span { width: 8px; height: 8px; border-radius: 50%; background: var(--pri); animation: bounce 1s infinite; } .thinking span:nth-child(2) { animation-delay: .15s; } .thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-6px); opacity: .5; } }
.interp { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; } .ichip { font-size: 11px; padding: 3px 10px; border-radius: 99px; background: var(--card); color: var(--ink2); font-weight: 600; } .ichip em { font-style: normal; color: var(--muted); margin-right: 5px; }
.lead { font-size: 15px; line-height: 1.6; } .lead b { color: var(--ink); }
.blk { background: var(--card); border-radius: 20px; padding: 6px 18px 16px; margin-top: 14px; } .blk h5 { margin-top: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.tile-s { background: var(--card); border-radius: 18px; padding: 12px 14px; } .card .tile-s { background: var(--bg); } .tile-s span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; } .tile-s b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; } .tile-s em { display: block; font-size: 11px; font-style: normal; font-weight: 700; } .tile-s em.up { color: var(--pos); } .tile-s em.down { color: var(--neg); }
.trow { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 40px; gap: 14px; align-items: center; padding: 8px 4px; font-size: 13px; font-weight: 600; border-radius: 12px; } .trow[data-ask] { cursor: pointer; } .trow[data-ask]:hover { background: var(--bg); } .trow b { text-align: right; } .trow small { display: block; font-size: 11px; }
.srcs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; } .srcs > span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.src { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--card); font-size: 12px; font-weight: 600; } .src em { font-style: normal; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .src:hover { box-shadow: 0 0 0 2px var(--pri); }
.src .chb { min-width: 24px; height: 24px; border-radius: 99px; }
.ans-foot { margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.composer { display: flex; gap: 10px; margin: 0 20px 20px; padding: 8px 8px 8px 20px; background: var(--bg); border-radius: 99px; align-items: center; border: 1px solid transparent; transition: border-color .2s; } .composer:focus-within { border-color: var(--pri); }
.composer input { flex: 1; background: none; border: 0; outline: none; font-size: 14px; min-width: 0; }
.send { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 20px -8px rgba(91, 91, 240, .9); }
.side { display: flex; flex-direction: column; gap: 20px; }
.sugs { display: flex; flex-direction: column; gap: 8px; } .sugs button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; border-radius: 14px; background: var(--bg); font-weight: 600; font-size: 12.5px; color: var(--ink2); transition: all .15s; } .sugs button:hover { color: var(--pri); background: var(--pri-soft); }
.how { margin: 0 0 12px; padding-left: 18px; color: var(--ink2); line-height: 1.8; }

/* districts, opposition, leaders */
.detail .ch h3 small { font-size: 15px; margin-left: 4px; }
.issues-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.issue header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; } .issue h4 { font-size: 16px; font-weight: 800; margin-top: 8px; letter-spacing: -.01em; }
.claim { color: var(--muted); font-size: 12.5px; margin: 10px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.imeta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; margin: 8px 0 12px; } .imeta b { color: var(--ink); }
.resp { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 14px; } .rbar { flex: 1; height: 7px; background: var(--line); border-radius: 99px; overflow: hidden; } .rbar i { display: block; height: 100%; background: var(--sky); border-radius: 99px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; } .lrow + .lrow { border-top: 1px solid var(--line); } .lrow > div:nth-child(2) { flex: 1; } .lrow p { font-size: 12px; color: var(--muted); } .lm { text-align: right; } .lm b { display: block; font-size: 18px; } .lm span { font-size: 11px; color: var(--muted); }
.leaders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.leader header { display: flex; gap: 14px; align-items: center; } .leader header > div:nth-child(2) { flex: 1; min-width: 0; } .leader h4 { font-size: 16px; font-weight: 800; } .leader header p { font-size: 12px; color: var(--muted); }
.leader .tiles { grid-template-columns: repeat(3, 1fr); } .leader .ispark { margin: 14px 0 10px; } .leader .link { margin-top: 14px; }

/* brief */
.briefwrap { max-width: 980px; margin: 0 auto; } .brief { padding: 34px 38px; }
.brief-h { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); } .brief-h h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0; } .brief-h p { color: var(--muted); } .brief-h .eyebrow { color: var(--pri); }
.brief-act { display: flex; gap: 10px; align-items: flex-start; }
.bgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; } .wide { margin-top: 8px; }
.orow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; } .orow + .orow { border-top: 1px solid var(--line); } .orow p { color: var(--muted); font-size: 12px; }
.acts { margin: 0; padding-left: 20px; line-height: 1.9; } .acts li::marker { color: var(--pri); font-weight: 800; }

/* data */
.dz { margin-top: 14px; padding: 18px; border-radius: 22px; border: 1.5px dashed var(--line); display: grid; gap: 6px; justify-items: start; color: var(--ink2); } .dz p { color: var(--muted); font-size: 12px; } .dz .ic { color: var(--pri); }
.row-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; } .msg-import { margin-top: 10px; color: var(--pos); font-weight: 700; font-size: 12.5px; }
.prm { margin-bottom: 14px; } .prm h6 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 7px; } .prm .chip { background: var(--bg); color: var(--ink2); font-weight: 600; } .prm .chip.on { background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; }
.rules { margin: 0; padding-left: 20px; line-height: 2; color: var(--ink2); }
.chip.pin { text-decoration: none; cursor: pointer; transition: all .15s; } .chip.pin:hover { background: var(--pri-soft); color: var(--pri); }
.gmap { width: 100%; height: 380px; border: 0; border-radius: 22px; background: var(--bg); display: block; }
.pinlink { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; } .pinlink .ic { color: var(--pri); opacity: .7; } .pinlink:hover { color: var(--pri); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 150; display: none; place-items: center; background: rgba(10, 10, 30, .5); backdrop-filter: blur(8px); padding: 20px; } .modal.open { display: grid; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.mcard { position: relative; width: min(780px, 94vw); max-height: 88vh; overflow: auto; background: var(--card); border-radius: 30px; padding: 30px 32px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .5); animation: rise .35s both; }
.mclose { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 14px; background: var(--bg); display: grid; place-items: center; }
.mhead { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; } .mcard h3 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin-right: 40px; } .mtext { color: var(--ink2); margin: 10px 0 20px; font-size: 14.5px; line-height: 1.65; }
.kvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; } .kvgrid div { background: var(--bg); border-radius: 16px; padding: 10px 14px; } .kvgrid span { display: block; font-size: 11px; color: var(--muted); font-weight: 700; } .kvgrid b { font-size: 13px; word-break: break-word; }

/* responsive */
@media (max-width: 1180px) {
  .hero, .kpi-grid, .span3, .span4, .span5, .span7, .span8 { grid-column: span 12; }
  .span3 { grid-column: span 6; }
  .askwrap { grid-template-columns: 1fr; } .chatcard { height: 72vh; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; padding: 12px 14px 96px; }
  .rail { position: fixed; z-index: 90; bottom: 10px; left: 10px; right: 10px; top: auto; height: 70px; flex-direction: row; justify-content: space-around; padding: 4px 8px; border-radius: 26px; }
  .rail nav { flex-direction: row; margin: 0; gap: 0; } .logo, .rail-foot { display: none; } .nav { width: 44px; height: 56px; } .nav span { display: none; }
  .big .cu { font-size: 56px; } .hero-bot { grid-template-columns: 1fr 1fr; } .issues-grid, .bgrid { grid-template-columns: 1fr; } .kpi-grid { grid-template-columns: 1fr 1fr; } .tb-l h1 { font-size: 24px; }
  .pstats span { display: none; } .tilemap { grid-template-rows: repeat(5, 66px); }
}
@media print { .rail, .topbar, .ribbon, .brief-act, .tip { display: none !important; } body, .card { background: #fff !important; box-shadow: none !important; } .app { display: block; padding: 0; } .card { animation: none; } .prow { break-inside: avoid; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
