/* 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; }

/* ───── Jan Darpan additions ───── */
.rail { overflow-y: auto; scrollbar-width: none; gap: 10px; padding: 14px 0; } .rail::-webkit-scrollbar { display: none; }
.rail nav { gap: 2px; margin-top: 4px; }
.nav { width: 66px; height: 54px; border-radius: 18px; gap: 3px; }
.logo { flex: none; background: linear-gradient(135deg, #14B8A6, #5B5BF0 60%, #A36CF5); }
.tb-r .seg { box-shadow: var(--shadow); } .sel.role { font-weight: 700; color: var(--pri); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 5px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; }
.tabs button { padding: 9px 16px; border-radius: 13px; font-weight: 700; font-size: 13px; color: var(--muted); transition: all .2s; }
.tabs button:hover { color: var(--ink); } .tabs button.on { background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; box-shadow: 0 8px 16px -8px rgba(91, 91, 240, .8); }
.ilink { color: var(--ink); font-weight: 700; text-align: left; border-bottom: 1px dashed color-mix(in srgb, var(--pri) 55%, transparent); line-height: 1.3; } .ilink:hover { color: var(--pri); }
.hb-l .ilink { font-size: 13px; }
.orow > div { min-width: 0; } .orow b { display: block; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 12px; text-align: center; color: var(--muted); } .empty-state .ic { color: var(--pri); opacity: .6; margin-bottom: 6px; } .empty-state b { color: var(--ink); } .empty-state p { max-width: 460px; font-size: 12.5px; }
code { background: var(--bg); padding: 2px 7px; border-radius: 8px; font-size: 12px; }
.icon-btn { width: 30px; height: 30px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--muted); } .icon-btn:hover { background: var(--bg); color: var(--neg); }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 11px; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink2); cursor: pointer; } .chk input { accent-color: var(--pri); width: 16px; height: 16px; }

/* history line and correlation cards */
.hist { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--pri-soft); margin: 8px 0; font-size: 12.5px; line-height: 1.45; }
.hist .hi { color: var(--pri); flex: none; } .hist .ht { flex: 1; } .hist .ht b { color: var(--pri); margin-right: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.hist.none { background: var(--bg); color: var(--muted); } .hist.none .hi { color: var(--muted); }
.meter { display: inline-flex; align-items: center; gap: 3px; flex: none; } .meter i { width: 5px; height: 11px; border-radius: 3px; background: var(--line); } .meter em { font-style: normal; font-size: 10.5px; color: var(--muted); margin-left: 4px; text-transform: capitalize; }
.meter.m1 i:nth-child(1), .meter.m2 i:nth-child(-n+2), .meter.m3 i { background: var(--pri); } .meter.m0 i { background: var(--line); }
.verd { display: inline-flex; gap: 2px; flex: none; } .verd button { width: 26px; height: 26px; border-radius: 9px; color: var(--muted); display: grid; place-items: center; } .verd button:hover { background: var(--card); color: var(--ink); } .verd button.on { background: color-mix(in srgb, var(--pos) 18%, transparent); color: var(--pos); } .verd button.on.neg { background: color-mix(in srgb, var(--neg) 18%, transparent); color: var(--neg); }
.corr { background: var(--bg); border-radius: 20px; padding: 14px 16px; margin: 10px 0; border-left: 4px solid var(--pri); }
.corr.t-systemic { border-color: var(--neg); } .corr.t-chain { border-color: var(--warn); } .corr.t-common-factor { border-color: var(--sky); } .corr.t-analogue { border-color: var(--pri2); } .corr.t-coordinated { border-color: #E04F9A; }
.corr header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .ctype { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.corr p { font-size: 13.5px; line-height: 1.55; } .corr footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; } .cmeta { font-size: 11.5px; color: var(--muted); }
.corr .srcs { margin-top: 8px; } .card .corr .srcs > span { display: none; }
.note p { font-size: 12.5px; } .warncard { background: linear-gradient(160deg, color-mix(in srgb, var(--warn) 16%, var(--card)), var(--card)); }
.sigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } .sigs h5 { margin-top: 0; }
.quick .qrow { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; } .quick p { font-size: 13px; color: var(--ink2); margin-top: 2px; } .eyebrow.dark { color: var(--pri); }
.kpi.mini { min-height: 96px; } .kpi.mini .kv b { font-size: 28px; }

/* heat grid and timeline */
.heat { display: grid; gap: 4px; overflow-x: auto; } .hrow { display: grid; grid-template-columns: 210px repeat(var(--cols), minmax(18px, 1fr)); gap: 4px; align-items: center; } .hrow .hl { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow i { height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--c) calc(var(--k) * 85%), var(--line)); } .hrow.hh em { font-style: normal; font-size: 10.5px; color: var(--muted); text-align: center; }
.tl { position: relative; height: 22px; background: var(--bg); border-radius: 8px; overflow: hidden; } .tl i { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: color-mix(in srgb, var(--warn) calc(var(--h) * 100%), var(--line)); min-width: 3px; }
.net text.gt { font-size: 10.5px; }

/* items */
.resf { padding: 12px 0; border-top: 1px solid var(--line); } .resf:first-of-type { border-top: 0; } .resf p { font-size: 13px; margin: 6px 0; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; } .kcol { background: var(--bg); border-radius: 20px; padding: 6px 12px 12px; min-height: 160px; } .kcol h5 { display: flex; justify-content: space-between; } .kcol h5 em { font-style: normal; color: var(--pri); }
.kcard { display: block; width: 100%; text-align: left; background: var(--card); border-radius: 15px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); transition: transform .15s; } .kcard:hover { transform: translateY(-2px); } .kcard b { font-size: 13px; display: block; } .kcard small { display: block; margin: 3px 0 6px; }
blockquote.stq { margin: 0 0 12px; padding: 12px 16px; border-radius: 16px; background: var(--bg); border-left: 3px solid var(--sky); } blockquote.stq p { font-size: 14.5px; line-height: 1.55; } blockquote.stq cite { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 6px; } blockquote.stq cite a { color: var(--pri); }
.shift { margin-bottom: 14px; } .shift .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; } .shift blockquote { margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--bg); font-size: 14px; } .shift cite { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 6px; }
.inline-form { display: flex; gap: 10px; margin-bottom: 12px; } .inline-form input { flex: 1; background: var(--bg); border: 1px solid transparent; border-radius: 14px; padding: 10px 14px; outline: none; } .inline-form input:focus { border-color: var(--pri); }
.amp { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); } .amp:first-of-type { border-top: 0; } .amp .prow { flex: 1; border: 0 !important; }
.pack .tiles { margin-top: 0; }

/* library */
.link-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 14px 6px; border-top: 1px solid var(--line); align-items: flex-start; } .link-row:first-of-type { border-top: 0; } .link-row.off { opacity: .55; }
.ltitle { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.4; } .ltitle:hover { color: var(--pri); }
.lmeta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); margin-top: 4px; } .lmeta .ic { vertical-align: -2px; } .lnote { font-size: 12.5px; color: var(--ink2); margin-top: 6px; } .ltags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.lact { display: flex; align-items: center; gap: 6px; }
.libf { margin-bottom: 10px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; } .preset { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border-radius: 16px; padding: 10px 12px; } .preset > div { display: flex; gap: 10px; align-items: center; min-width: 0; } .preset b { font-size: 13px; display: block; } .preset small { display: block; overflow: hidden; text-overflow: ellipsis; }
.rvrow { padding: 14px 0; border-top: 1px solid var(--line); } .rvrow:first-of-type { border-top: 0; } .rvh a { font-weight: 700; color: var(--ink); text-decoration: none; } .rvh small { display: block; margin: 3px 0 8px; } .rvc { display: flex; gap: 8px; flex-wrap: wrap; } .rvc select { background: var(--bg); border: 0; border-radius: 12px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; }

/* modal forms + issue modal */
.mcard.form { width: min(720px, 94vw); } .fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 14px; } .fld { display: flex; flex-direction: column; gap: 5px; } .fld.full { grid-column: 1 / -1; }
.fld label { font-size: 12px; font-weight: 700; color: var(--ink2); } .fld small { font-size: 11.5px; }
.fld input:not([type=checkbox]), .fld select, .fld textarea, input[type=date][data-asof] { background: var(--bg); border: 1px solid transparent; border-radius: 13px; padding: 10px 13px; outline: none; font-size: 13.5px; width: 100%; } .fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--pri); } .fld textarea { resize: vertical; }
input[type=date][data-asof] { width: auto; }
.fact { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; } .ferr { grid-column: 1 / -1; color: var(--neg); font-weight: 700; font-size: 13px; }
.mcard.issuem { width: min(960px, 96vw); } .mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: #14152B; color: #fff; padding: 11px 20px; border-radius: 99px; font-weight: 600; font-size: 13px; opacity: 0; transition: all .25s; z-index: 300; pointer-events: none; box-shadow: 0 14px 30px rgba(0,0,0,.35); } .toast.on { opacity: 1; transform: translate(-50%, 0); }
.issues-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } .span12.issues-grid { grid-column: span 12; }
.ribbon span:last-child { flex: 1; }

@media (max-width: 1180px) { .sigs, .mgrid { grid-template-columns: 1fr; } .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hrow { grid-template-columns: 140px repeat(var(--cols), minmax(14px, 1fr)); } }
@media (max-width: 760px) { .fgrid, .shift .two { grid-template-columns: 1fr; } .kanban { grid-template-columns: 1fr; } .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; } .tabs button { white-space: nowrap; } .rail { overflow-x: auto; } .link-row { grid-template-columns: auto 1fr; } .lact { grid-column: 1 / -1; } }
@media print { .tabs, .toast { display: none !important; } }

.span2 { grid-column: span 2; } .span6 { grid-column: span 6; } .span9 { grid-column: span 9; }
@media (max-width: 1180px) { .span6, .span9, .span2 { grid-column: span 12; } }

.cols { display: flex; align-items: flex-end; gap: 5px; height: calc(var(--h) + 22px); }
.cols .cb { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.cols .cb i { display: block; width: 100%; max-width: 28px; border-radius: 8px 8px 3px 3px; background: var(--col); opacity: var(--o); transition: height .5s; }
.cols .cb em { font-style: normal; font-size: 10.5px; color: var(--muted); height: 14px; white-space: nowrap; }
.party.GGP { background: #E3F5E6; color: #2E8B3E; } [data-theme='dark'] .party.GGP { background: #143321; }
.mla-tbl td.role { max-width: 190px; font-size: 12px; } .mla-tbl { min-width: 880px; } .card .mla-tbl-wrap { overflow-x: auto; }
.mcard .kvgrid { margin: 14px 0; }
.cbar { flex: 1; height: 8px; border-radius: 99px; background: var(--bg); min-width: 80px; margin: 0 10px; overflow: hidden; } .cbar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--pri), var(--pri2)); border-radius: 99px; }

/* Clippings */
.pbadge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-weight: 800; font-size: 10.5px; letter-spacing: .02em; flex: none; }
.dayrail { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: thin; } .dayrail .chip { flex: none; cursor: pointer; background: var(--bg); color: var(--ink2); } .dayrail .chip.on { color: #fff; background: linear-gradient(135deg, #5B5BF0, #8A63F5); } .dayrail .chip b { opacity: .7; font-weight: 700; }
.filters.cf { margin-top: 10px; align-items: center; } .filters.cf .chip { cursor: pointer; background: var(--bg); color: var(--ink2); } .filters.cf .chip.on { color: #fff; background: linear-gradient(135deg, #5B5BF0, #8A63F5); } .filters.cf .chip b { opacity: .7; }
.clipgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.clipcard { position: relative; background: var(--card); border-radius: 22px; padding: 18px 20px 16px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: transform .18s, box-shadow .18s; border-left: 4px solid transparent; outline: none; }
.clipcard:hover, .clipcard:focus-visible { transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(60, 60, 120, .35); }
.clipcard.crit { border-left-color: var(--neg); } .clipcard.sup { border-left-color: var(--pos); }
.clipcard .cmeta { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); font-weight: 600; } .cmeta .grow { flex: 1; }
.clipcard h4 { font-size: 15.5px; line-height: 1.45; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clipcard .chips { gap: 6px; }
.clipimg { background: var(--bg); border-radius: 14px; overflow: hidden; display: grid; place-items: center; color: var(--muted); } .clipimg img { width: 100%; display: block; }
.clipimg.thumb { height: 150px; align-items: start; } .clipimg.thumb img { object-fit: cover; object-position: top; height: 150px; }
.more { text-align: center; margin-top: 18px; }
.side { display: flex; flex-direction: column; gap: 20px; }
.orow.click { cursor: pointer; } .orow.click:hover b { color: var(--pri); }
.divbar { display: flex; height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; min-width: 110px; } .divbar i { display: block; height: 100%; } .divbar i.pos { background: var(--pos); } .divbar i.neg { background: var(--neg); margin-left: auto; }
.pn { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; font-size: 11px; } .pn .pbadge { width: 22px; height: 22px; font-size: 9px; border-radius: 7px; }
.mcard.clipm { width: min(1100px, 96vw); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.clipm .cimgcol { position: sticky; top: 0; } .clipfull { display: block; background: var(--bg); border-radius: 18px; overflow: auto; max-height: 76vh; cursor: zoom-in; } .clipfull img { width: 100%; display: block; } .clipfull.big img { width: 190%; max-width: none; } .clipfull.big { cursor: zoom-out; }
.clipfull .ph { display: grid; place-items: center; min-height: 260px; color: var(--muted); }
.clipnoimg { background: var(--bg); border-radius: 18px; padding: 34px 26px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; color: var(--ink2); } .clipnoimg p { font-size: 13px; color: var(--muted); max-width: 320px; }
.clipm .cinfo h3 { margin: 10px 0 12px; font-size: 21px; line-height: 1.4; } .clipm .mhead { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.clipm .kvgrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } .cnav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 1180px) { .clipgrid { grid-template-columns: 1fr; } .mcard.clipm { grid-template-columns: 1fr; } .clipm .cimgcol { position: static; } }
.donut-wrap .dl .off { opacity: .55; } .donut-wrap .dl .off b { font-weight: 600; font-size: 11px; }

.qboxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.qbox { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px 16px 14px; border-radius: 18px; background: var(--bg); transition: transform .18s, box-shadow .18s; } .qbox svg { color: var(--pri); margin-bottom: 6px; } .qbox b { font-size: 14px; } .qbox span { font-size: 12px; color: var(--muted); font-weight: 600; }
.qbox:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(60, 60, 120, .4); }
@media (max-width: 700px) { .qboxes { grid-template-columns: 1fr; } }
/* Clippings: date tiles and file reader */
.daygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 4px; }
.daytile { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; align-items: baseline; text-align: left; padding: 10px 12px 12px; border-radius: 16px; background: var(--bg); color: var(--ink2); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.daytile:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(60, 60, 120, .5); }
.daytile .dw { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); grid-column: 1 / -1; }
.daytile .dd { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--ink); } .daytile .dm { font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; }
.daytile em { grid-column: 1 / -1; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--pri); margin-top: 4px; }
.daytile i { position: absolute; left: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #5B5BF0, #8A63F5); border-radius: 0 4px 0 0; opacity: .55; }
.daytile.on { background: linear-gradient(135deg, #5B5BF0, #8A63F5); color: #fff; } .daytile.on .dw, .daytile.on .dm, .daytile.on .dd, .daytile.on em { color: #fff; } .daytile.on i { background: rgba(255, 255, 255, .7); opacity: 1; }
.daytile.all { background: var(--pri-soft); } .daytile.all.on { background: linear-gradient(135deg, #5B5BF0, #8A63F5); }
.filters.cf .chip .cnt { opacity: .75; font-weight: 600; font-size: 11px; margin-left: 2px; }
.mcard.reader { width: min(1280px, 97vw); height: min(92vh, 940px); max-height: none; display: flex; flex-direction: column; padding: 22px 26px 20px; overflow: hidden; }
.rdh { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-right: 46px; flex-wrap: wrap; } .rdh h3 { font-size: 18px; } .rdh p { font-size: 12.5px; margin-top: 2px; }
.rdnav { display: flex; align-items: center; gap: 8px; } .rdnav input { width: 64px; text-align: center; background: var(--bg); border: 0; border-radius: 12px; padding: 8px 6px; font-weight: 700; outline: none; } .rdnav button:disabled { opacity: .4; cursor: default; }
.rdbody { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; margin-top: 14px; flex: 1; min-height: 0; }
.rdlist { overflow: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 6px; scrollbar-width: thin; }
.rdrow { display: flex; gap: 9px; align-items: flex-start; text-align: left; padding: 8px 10px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; color: var(--ink2); } .rdrow:hover { background: var(--bg); } .rdrow.on { background: var(--pri-soft); color: var(--pri); }
.rdrow span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rdpage { overflow: auto; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rdpage .clipfull { max-height: none; flex: none; } .rdpage .clipfull .ph { min-height: 360px; }
.rdcap { background: var(--bg); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; } .rdcap .chips { align-items: center; }
@media (max-width: 900px) { .rdbody { grid-template-columns: 1fr; } .rdlist { max-height: 160px; flex-direction: row; } }

/* Pulse: equal-height rows and action boxes */
.bento > .card.eq { align-self: stretch; }
.actcard { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 24px 26px; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.actcard:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(60, 60, 120, .35); }
.actcard .pi { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--pri-soft); color: var(--pri); margin-bottom: 10px; }
.actcard h3 { font-size: 17px; } .actcard p { font-size: 13px; color: var(--muted); font-weight: 600; } .actcard .go { margin-top: 12px; font-size: 12.5px; font-weight: 800; color: var(--pri); display: inline-flex; align-items: center; gap: 4px; }

/* Clippings: month groups and library connect */
.monthbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mtile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 18px; border-radius: 16px; background: var(--bg); color: var(--ink2); text-align: left; min-width: 150px; transition: transform .15s; } .mtile:hover { transform: translateY(-1px); }
.mtile b { font-size: 15px; color: var(--ink); } .mtile span { font-size: 12px; font-weight: 700; color: var(--muted); }
.mtile.on { background: linear-gradient(135deg, #5B5BF0, #8A63F5); } .mtile.on b, .mtile.on span { color: #fff; }
.mhead { margin: 14px 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.mcard.form .fld input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); outline: none; }
.mcard.form ol.how { margin: 12px 0 16px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; } .mcard.form ol.how a { color: var(--pri); font-weight: 700; }

/* Pulse: Social desk */
.sdesks { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.sdesk { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--bg); text-align: left; transition: transform .15s, box-shadow .15s; }
.sdesk:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -16px rgba(60, 60, 120, .4); }
.sdesk .pi { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--pri-soft); color: var(--pri); flex: none; }
.sdesk .tx { display: flex; flex-direction: column; gap: 2px; flex: 1; } .sdesk b { font-size: 14.5px; } .sdesk em { font-style: normal; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sdesk .go { color: var(--pri); }

.kp.netw { font-size: 12.5px; margin-top: 6px; } .kp.netw b { color: var(--ink); } .kp.netw .link { margin-left: 6px; }
