/* TaxWealth Portal home dashboard (v3.26.2). Scoped to .twh-*; loads after theme-sharp.css.
   Removing the <link> leaves the rest of the portal untouched. */
.twh {
  --h-ink: #101828; --h-muted: #667085; --h-line: rgba(16, 35, 63, .08);
  --h-card: #fff; --h-soft: #f4f6fa; --h-navy: #1e3a8a; --h-bar: #c4cdea;
  --h-green: #15803d; --h-amber: #b45309; --h-red: #b42318;
  max-width: 1320px; margin: 0 auto; color: var(--h-ink);
}
.twh button { font-family: inherit; }

/* Header */
.tw-hello-wrap { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tw-hello-wrap .tw-hello { line-height: 1.2; }
.twh-date { margin-top: 3px; font-size: 13px; color: #667085; display: flex; align-items: center; gap: 10px; }
.twh-live { display: inline-flex; align-items: center; gap: 5px; color: #667085; }
.twh-live i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }

/* Cards */
.twh-card { background: var(--h-card); border: 1px solid var(--h-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 35, 63, .04); padding: 18px 18px 16px; min-width: 0; }
.twh-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.twh-card-head h2 { font-size: 15px; margin: 0; color: var(--h-ink); letter-spacing: -.01em; }
.twh-card-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--h-muted); }
.twh-badge { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #eef1f8; color: #3b4a6b; }
.twh-badge.warn { background: #fdf2dc; color: #92400e; }
.twh-empty { color: var(--h-muted); font-size: 13px; padding: 10px 2px; }
.twh-link { background: none; border: 0; padding: 0; color: #2563eb; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.twh-link:hover { text-decoration: underline; }

/* Alerts */
.twh-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.twh-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; }
.twh-alert.amber { background: #fff7e6; border: 1px solid #f6dfae; color: #7a4a06; }
.twh-alert.red { background: #fdecec; border: 1px solid #f3b4b4; color: #8a1c1c; }
.twh-alert-ico svg { width: 16px; height: 16px; display: block; }
.twh-alert-txt { flex: 1; }

/* KPI row */
.twh-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.twh-kpi { display: flex; flex-direction: column; align-items: stretch; text-align: left; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.twh-kpi:hover { box-shadow: 0 8px 24px -12px rgba(16, 35, 63, .3); transform: translateY(-1px); }
.twh-kpi-k { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #344054; }
.twh-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; }
.twh-ico svg { width: 16px; height: 16px; }
.twh-ico.green { background: #e7f6ec; color: #15803d; }
.twh-ico.blue { background: #e8f0ff; color: #1d4ed8; }
.twh-ico.amber { background: #fdf1de; color: #b45309; }
.twh-ico.violet { background: #eef0fb; color: #3b4fb8; }
.twh-kpi-v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 14px 0 6px; line-height: 1.05; color: var(--h-ink); font-variant-numeric: tabular-nums; }
.twh-kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.twh-kpi-sub { font-size: 12.5px; color: var(--h-muted); }
.twh-spark { width: 72px; height: 26px; flex: 0 0 72px; }
.twh-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.twh-spark path { fill: none; stroke: var(--h-navy); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* Rows */
.twh-row { display: grid; gap: 14px; margin-bottom: 14px; }
.twh-row-a { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
.twh-row-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Equal-height cards in a row: chart and ring fill the spare height */
.twh-row-a > .twh-card { display: flex; flex-direction: column; }
.twh-row-a > .twh-card > .twh-chart { flex: 1; }
.twh-chart { display: flex; flex-direction: column; }
.twh-chart .twh-chart-plot { flex: 1; min-height: 180px; height: auto; }

/* Needs attention bar */
.twh-attnbar[hidden], .twh-alerts[hidden] { display: none; }
.twh-attnbar { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 14px; padding: 11px 16px; border-radius: 12px; background: #fff7e6; border: 1px solid #f6dfae; color: #7a4a06; font-size: 13.5px; cursor: pointer; }
.twh-attnbar:hover { background: #fff2d6; }
.twh-attnbar-ico svg { width: 17px; height: 17px; display: block; }
.twh-attnbar-txt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; }
.twh-attnbar-txt strong { color: #5c3605; font-weight: 700; }
.twh-attnbar-n { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #fde7bd; color: #92400e; }
.twh-attnbar-first { color: #8a5a17; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.twh-attnbar-first::before { content: "\00b7"; margin-right: 10px; color: #c9a466; }
.twh-attnbar-go { font-weight: 700; color: #92400e; }

/* Needs attention modal */
.twh-modal { width: min(640px, calc(100vw - 32px)); }
.twh-attn-modal { display: flex; flex-direction: column; gap: 6px; max-height: min(60vh, 520px); overflow: auto; }
.twh-attn-item { display: flex; align-items: flex-start; gap: 12px; border-radius: 10px; padding: 10px 8px 10px 12px; background: #f6f7fa; }
.twh-attn-item.info { background: #fff; border: 1px solid rgba(16, 35, 63, .08); }
.twh-attn-ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; background: #eef1f8; color: #3b4a6b; }
.twh-attn-item.warn .twh-attn-ico { background: #fdf1de; color: #b45309; }
.twh-attn-ico svg { width: 15px; height: 15px; }
.twh-attn-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-family: inherit; }
.twh-attn-txt .t { font-size: 14px; font-weight: 600; color: #101828; }
.twh-attn-txt:hover .t { color: #2563eb; }
.twh-attn-txt .s { font-size: 12.5px; color: #667085; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.twh-attn-clear { flex: 0 0 28px; height: 28px; border: 0; background: none; border-radius: 8px; color: #98a2b3; font-size: 20px; line-height: 1; cursor: pointer; }
.twh-attn-clear:hover { background: #eef0f5; color: #344054; }
.twh-attn-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(16, 35, 63, .08); position: sticky; bottom: 0; background: #fff; }
.twh-attn-foot span { flex: 1; font-size: 12px; color: #667085; }

/* Chart */
.twh-chart-plot { display: flex; gap: 10px; height: 180px; }
.twh-chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--h-muted); text-align: right; min-width: 22px; padding-bottom: 1px; }
.twh-chart-bars { position: relative; flex: 1; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid #e3e7ef; }
.twh-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.twh-grid i { display: block; border-top: 1px solid #eef0f5; }
.twh-grid i:last-child { border-top: 0; }
.twh-bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; background: none; border: 0; padding: 0; cursor: pointer; }
.twh-bar span { display: block; width: 100%; background: var(--h-bar); border-radius: 4px 4px 0 0; transition: background .15s ease; }
.twh-bar:hover span { background: #9fb0de; }
.twh-bar.peak span { background: var(--h-navy); }
.twh-chart-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--h-muted); margin: 8px 0 0 32px; }

/* Pipeline */
.twh-pipe { display: flex; flex-direction: column; gap: 6px; }
.twh-pipe-row { display: block; width: 100%; background: none; border: 0; padding: 6px 0; text-align: left; cursor: pointer; }
.twh-pipe-top { display: flex; justify-content: space-between; font-size: 13px; color: #344054; margin-bottom: 6px; }
.twh-pipe-top strong { color: var(--h-ink); }
.twh-pipe-track { display: block; height: 6px; border-radius: 999px; background: #eef0f5; overflow: hidden; }
.twh-pipe-track span { display: block; height: 100%; border-radius: 999px; background: var(--h-navy); }
.twh-pipe-track span.won { background: var(--h-green); }
.twh-pipe-track span.dead { background: #b8bfcc; }
.twh-pipe-row:hover .twh-pipe-top span { color: #2563eb; }

/* This week */
.twh-week { margin-top: 4px; }
.twh-week-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 0 10px; border-bottom: 1px solid var(--h-line); }
.twh-week-head strong { font-size: 14px; margin-right: 10px; }
.twh-week-head span { font-size: 12.5px; color: var(--h-muted); }
.twh-week-head .twh-link:last-child { justify-self: end; }
.twh-week-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--h-line); padding: 13px 0; text-align: left; cursor: pointer; font-size: 14px; color: var(--h-ink); }
.twh-week-row:hover { background: linear-gradient(90deg, rgba(37, 99, 235, .04), transparent); }
.twh-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.twh-tag.up { color: var(--h-green); }
.twh-tag.down { color: var(--h-red); }
.twh-tag.flat { color: var(--h-muted); }
.twh-tag.do { color: #2563eb; }
.twh-week-go { font-size: 13px; font-weight: 600; color: #344054; }

/* Featured strategy / insight: equal-height cards, CTAs pinned to the same baseline */
.twh-row-b > .twh-card { display: flex; flex-direction: column; }
.twh-featbody { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.twh-feat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.twh-feat-txt { min-width: 0; }
.twh-feat .t { font-size: 15px; font-weight: 700; color: var(--h-ink); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twh-feat .d { font-size: 13.5px; color: #475467; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.twh-feat-cta { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.twh-insight { flex-direction: row; gap: 18px; align-items: stretch; }
.twh-insight .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.twh-insight img { width: 150px; height: 100px; object-fit: cover; border-radius: 10px; flex: 0 0 150px; background: #eef1f8; align-self: flex-start; }
.twh-dots { display: inline-flex; gap: 6px; }
.twh-dot { width: 6px; height: 6px; border-radius: 50%; background: #d5dae6; cursor: pointer; }
.twh-dot.on { background: var(--h-navy); width: 16px; border-radius: 999px; }

/* Responsive */
@media (max-width: 1180px) {
  .twh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twh-row-a { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .twh-kpis, .twh-row-b { grid-template-columns: minmax(0, 1fr); }
  .twh-week-head { grid-template-columns: 1fr auto; }
  .twh-week-head .twh-link:nth-of-type(1) { display: none; }
  .twh-insight img { width: 96px; height: 64px; flex-basis: 96px; }
  .twh-attnbar-first { display: none; }
}
