/* Siegel Financial v523 — focused insight pages, one Update hub, and a 1-year Net Worth forecast. */

.insight-update-cta,
.update-finish-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--gold) 11%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--paper-2) 86%, var(--accent-soft)), var(--paper));
  box-shadow: 0 16px 36px -31px rgba(4, 18, 33, .5);
}

.insight-update-cta::before,
.update-finish-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--accent));
  content: "";
}

.insight-update-cta > div,
.update-finish-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.insight-update-cta > div > span,
.update-finish-card > div > span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.insight-update-cta > div > b,
.update-finish-card > div > b {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.insight-update-cta > div > small,
.update-finish-card > div > small {
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.45;
}

.update-page {
  --update-line: color-mix(in srgb, var(--accent) 17%, var(--line));
}

.update-jumpbar {
  position: sticky;
  z-index: 12;
  top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
  padding: 7px;
  border: 1px solid var(--update-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 89%, transparent);
  box-shadow: 0 16px 38px -31px rgba(4, 18, 33, .72);
  backdrop-filter: blur(16px);
}

.update-jumpbar button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 9px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--ink-2);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.update-jumpbar button:hover,
.update-jumpbar button:focus-visible {
  border-color: var(--update-line);
  background: color-mix(in srgb, var(--paper-2) 86%, var(--accent-soft));
  transform: translateY(-1px);
}

.update-jumpbar button > span {
  grid-row: 1 / 3;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  align-self: center;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
  border-radius: 9px;
  color: color-mix(in srgb, var(--gold) 76%, var(--ink));
  background: color-mix(in srgb, var(--gold) 8%, var(--paper));
  font-size: 9px;
  font-weight: 850;
}

.update-jumpbar button > b {
  align-self: end;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-jumpbar button > small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-section {
  margin-top: 18px;
  padding: clamp(17px, 2.5vw, 25px);
  border: 1px solid var(--update-line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--paper-2) 92%, var(--accent-soft)), var(--paper) 38%);
  scroll-margin-top: 88px;
}

.update-section:focus { outline: none; }

.update-section:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 3px;
}

.update-section-head {
  margin-top: 0;
  padding: 0 0 17px;
  border-bottom: 1px solid var(--update-line);
}

.update-section-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.update-balance-grid,
.update-budget-workspace { margin-top: 18px; }

.update-history-card { margin-top: 18px; }

.update-page .nw-category-updated { margin-bottom: 10px; }

.update-finish-card { margin-top: 22px; }

/* Net Worth chart forecast: actual history remains solid gold; the estimate is dashed teal. */
.networth-page .history-forecast-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  align-items: center;
  margin: 4px 0 2px;
  padding: 0 2px;
  color: rgba(229, 237, 243, .72);
  font-size: 9.5px;
  font-weight: 720;
  letter-spacing: .025em;
}

.networth-page .history-forecast-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.networth-page .history-forecast-legend i {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
}

.networth-page .history-forecast-legend .actual i {
  background: linear-gradient(90deg, #F0D27B, #E6BE5A);
  box-shadow: 0 0 8px rgba(230, 190, 90, .25);
}

.networth-page .history-forecast-legend .forecast i {
  height: 0;
  border-top: 2px dashed #79D2C7;
}

.networth-page .history-forecast-legend small {
  margin-left: auto;
  color: rgba(216, 229, 238, .48);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.networth-page .history-projection-band {
  fill: none;
  stroke: rgba(91, 196, 183, .13);
  stroke-width: 13;
  stroke-linecap: round;
}

.networth-page .history-projection-line {
  fill: none;
  stroke: #79D2C7;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-dasharray: .075 .05;
  filter: drop-shadow(0 0 5px rgba(80, 206, 190, .3));
  animation: history-forecast-reveal .72s .78s both cubic-bezier(.2, .72, .2, 1);
}

.networth-page .history-projection-halo {
  fill: rgba(83, 207, 191, .12);
  stroke: rgba(121, 210, 199, .36);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: history-forecast-pulse 1.4s 1.15s 2 ease-out;
}

.networth-page .history-dot.projected {
  fill: #0C2C3D;
  stroke: #8BE1D6;
  stroke-width: 2.4;
}

.networth-page .history-forecast-callout rect {
  fill: rgba(7, 28, 45, .96);
  stroke: rgba(132, 224, 211, .52);
  stroke-width: 1;
  filter: drop-shadow(0 8px 11px rgba(0, 0, 0, .25));
}

.networth-page .history-forecast-callout-label {
  fill: rgba(179, 234, 227, .76);
  font-size: 6.6px;
  font-weight: 850;
  letter-spacing: .08em;
}

.networth-page .history-forecast-callout-value {
  fill: #F8F4E8;
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 760;
}

.networth-page .nw-mix-key-copy em {
  display: block;
  margin-top: 2px;
  color: color-mix(in srgb, var(--ink-3) 75%, transparent);
  font-size: 8px;
  font-style: normal;
  font-weight: 620;
  letter-spacing: .015em;
  line-height: 1.2;
}

@keyframes history-forecast-reveal {
  from { opacity: 0; stroke-dashoffset: .42; }
  to { opacity: 1; stroke-dashoffset: 0; }
}

@keyframes history-forecast-pulse {
  0% { opacity: 0; transform: scale(.72); }
  45% { opacity: 1; transform: scale(1.08); }
  100% { opacity: .4; transform: scale(1); }
}

@media (max-width: 760px) {
  .insight-update-cta,
  .update-finish-card {
    grid-template-columns: 1fr 1fr;
  }

  .insight-update-cta > div,
  .update-finish-card > div { grid-column: 1 / -1; }

  .insight-update-cta .btn,
  .update-finish-card .btn { justify-content: center; }

  .update-jumpbar { top: 7px; }

  .update-jumpbar button {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    min-height: 64px;
    padding: 8px 5px;
    text-align: center;
  }

  .update-jumpbar button > span {
    grid-row: auto;
    width: 24px;
    height: 24px;
    border-radius: 8px;
  }

  .update-jumpbar button > b {
    max-width: 100%;
    font-size: 10.5px;
    white-space: normal;
  }

  .update-jumpbar button > small { display: none; }

  .update-section { scroll-margin-top: 82px; }

  .update-section-actions { width: 100%; }

  .update-section-actions .btn,
  .update-section-actions .add-row { flex: 1 1 auto; justify-content: center; }

  .networth-page .history-forecast-legend small {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 390px) {
  .insight-update-cta,
  .update-finish-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .insight-update-cta > div,
  .update-finish-card > div { grid-column: auto; }

  .update-section { margin-inline: -2px; padding: 14px 12px; border-radius: 18px; }

  .update-jumpbar { margin-inline: -2px; }

  .networth-page .history-forecast-legend {
    gap: 6px 11px;
    font-size: 8.8px;
  }

  .networth-page .history-forecast-legend i { width: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .networth-page .history-projection-line,
  .networth-page .history-projection-halo {
    animation: none !important;
  }
}
