.insight-panel {
  color: var(--ink, #18352b);
  background: var(--surface, #fff);
  border: 1px solid var(--line, #dce6df);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 12px 40px rgb(28 61 46 / 6%);
}
.insight-panel--compact { padding: clamp(18px, 2.5vw, 28px); }
.insight-eyebrow {
  display: block;
  color: var(--muted, #62756a);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .075em;
  line-height: 1.35;
  text-transform: uppercase;
}
.insight-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .85fr);
  gap: 14px;
}
.insight-hero > div, .insight-incoming, .insight-before-income {
  min-width: 0;
  border: 1px solid var(--line, #dce6df);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface-soft, #f7faf7);
}
.insight-hero > div:first-child {
  color: #f1f7f2;
  background: #173f30;
  border-color: #173f30;
}
.insight-hero > div:first-child .insight-eyebrow,
.insight-hero > div:first-child .insight-period { color: #c5d8cb; }
.insight-safe {
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(2.25rem, 5vw, 3.7rem);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.insight-minimum > strong, .insight-before-income > strong {
  display: block;
  margin: 9px 0 3px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-variant-numeric: tabular-nums;
}
.insight-minimum > span:last-child, .insight-period,
.insight-incoming > span:last-child { color: var(--muted, #62756a); font-size: .9rem; line-height: 1.45; }
.insight-next-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.insight-incoming > strong { display: block; margin: 7px 0 2px; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.insight-incoming--empty > strong { font-size: 1rem; }
.insight-before-income { display: flex; flex-direction: column; justify-content: center; color: var(--muted, #62756a); font-size: .88rem; }
.insight-before-income strong { color: var(--ink, #18352b); }
.insight-compact-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 0; color: var(--muted, #62756a); font-size: .9rem; }
.insight-compact-footer strong { color: var(--ink, #18352b); font-variant-numeric: tabular-nums; }
.insight-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line, #dce6df);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--surface, #fff);
  color: var(--ink, #18352b);
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.insight-button:hover { transform: translateY(-1px); border-color: #86a997; }
.insight-button:focus-visible, .insight-event:focus-visible { outline: 3px solid #80b59a; outline-offset: 3px; }
.insight-button--primary { border-color: #173f30; background: #173f30; color: #fff; }
.insight-muted { color: var(--muted, #62756a); font-size: .9rem; }
.insight-compact-footer + .insight-event, .insight-compact-footer + .insight-muted { margin-top: 14px; }
.insight-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.insight-section__head h2 { margin: 5px 0 0; font-size: clamp(1.35rem, 2.4vw, 1.8rem); letter-spacing: -.03em; }
.insight-section { margin-top: 34px; }
.insight-section__head { margin-bottom: 14px; }
.insight-section__head p { max-width: 620px; margin: 6px 0 0; color: var(--muted, #62756a); font-size: .9rem; }
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; }
.insight-goal {
  min-width: 0;
  border: 1px solid var(--line, #dce6df);
  border-radius: 18px;
  padding: 17px;
  background: var(--surface-soft, #f7faf7);
}
.insight-goal--attention { border-color: #d9a36b; background: #fffaf2; }
.insight-goal__top, .insight-goal__amount, .insight-goal__progress,
.insight-month__head, .insight-month__saving { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.insight-goal__due, .insight-goal__amount span, .insight-goal__progress span { color: var(--muted, #62756a); font-size: .82rem; }
.insight-goal h3 { margin: 13px 0 14px; font-size: 1.1rem; }
.insight-goal__amount { padding-bottom: 12px; border-bottom: 1px solid var(--line, #dce6df); }
.insight-goal__amount strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.insight-goal p { min-height: 2.7em; margin: 12px 0; font-size: .9rem; line-height: 1.45; }
.insight-goal__progress strong { font-size: .92rem; font-variant-numeric: tabular-nums; }
.insight-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.insight-month { border: 1px solid var(--line, #dce6df); border-radius: 18px; padding: 17px; }
.insight-month__head h3 { margin: 0; text-transform: capitalize; }
.insight-month__head > span { color: var(--muted, #62756a); font-size: .78rem; }
.insight-month__totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 18px; }
.insight-month__totals span { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.insight-month__totals small { color: var(--muted, #62756a); font-size: .75rem; }
.insight-month__totals strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.insight-month__transfers { margin: 13px 0 0; color: var(--muted, #62756a); font-size: .81rem; }
.insight-month__savings { display: grid; gap: 8px; margin-top: 13px; border-top: 1px solid var(--line, #dce6df); padding-top: 12px; }
.insight-month__saving { font-size: .84rem; }
.insight-month__saving span { color: var(--muted, #62756a); }
.insight-month__saving strong { font-variant-numeric: tabular-nums; }
.insight-events { display: grid; border-top: 1px solid var(--line, #dce6df); }
.insight-event {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line, #dce6df);
  padding: 13px 2px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.insight-event:hover .insight-event__copy strong { color: #1b6947; }
.insight-event__copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.insight-event__copy strong { overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.insight-event__copy small { color: var(--muted, #62756a); font-size: .78rem; }
.insight-event__amount { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.insight-empty { border: 1px dashed var(--line, #dce6df); border-radius: 18px; padding: 22px; }
.insight-empty h3 { margin: 0 0 6px; }
.insight-empty p { color: var(--muted, #62756a); }
@media (max-width: 620px) {
  .insight-panel { border-radius: 18px; }
  .insight-hero { grid-template-columns: 1fr; }
  .insight-next-row { grid-template-columns: 1fr; }
  .insight-compact-footer { align-items: flex-start; flex-direction: column; }
  .insight-section__head { align-items: flex-start; flex-direction: column; }
  .insight-month__totals { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .insight-button { transition: none; }
}

.insight-supporting { display: grid; gap: 12px; }
.insight-compact-goals {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line, #dce6df);
  border-radius: 16px;
  padding: 13px 16px;
  background: var(--surface-soft, #f7faf7);
}
.insight-compact-goals > div { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
.insight-compact-goals > div > span { overflow: hidden; color: var(--muted, #62756a); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.insight-compact-goals > div > strong { font-size: .84rem; line-height: 1.4; }
.insight-compact-goals > .insight-button { flex: 0 0 auto; }
.insight-event { font: inherit; }
@media (max-width: 620px) {
  .insight-compact-goals { align-items: stretch; flex-direction: column; gap: 10px; }
  .insight-compact-goals > .insight-button { align-self: flex-start; }
}

.insight-full-summary {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 12px;
  margin: 18px 0 24px;
}
.insight-full-summary > article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line, #dce6df);
  border-radius: 18px;
  padding: 17px;
  background: var(--surface-soft, #f7faf7);
}
.insight-full-summary > article > strong {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}
.insight-full-summary > article > small { color: var(--muted, #62756a); font-size: .82rem; line-height: 1.4; }
.insight-full-summary > .insight-full-summary__safe {
  color: #f1f7f2;
  background: #173f30;
  border-color: #173f30;
}
.insight-full-summary__safe .insight-eyebrow, .insight-full-summary__safe small { color: #c5d8cb; }
.insight-full-summary .insight-event { border-top: 1px solid var(--line, #dce6df); }
@media (max-width: 700px) {
  .insight-full-summary { grid-template-columns: 1fr; }
}

.insight-full-period {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
}
@media (max-width: 620px) {
  .insight-full-period { align-items: flex-start; flex-direction: column; }
}

.insight-chart-slot { margin: 18px 0 30px; }
