/* MoneyPlan v28.3 — approved Calm Growth core screens */

.mp-eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mp-eyebrow.dark { color: var(--mp-purple-700); }

.mp-goal-hero,
.mp-goal-detail-hero,
.mp-assets-hero {
  margin-top: var(--mp-space-4);
  padding: 20px;
  overflow: hidden;
  border-radius: var(--mp-radius-hero);
  background: linear-gradient(145deg, #7658f4 0%, #5136c7 78%);
  color: #fff;
  box-shadow: var(--mp-shadow-hero);
}

.mp-hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.mp-hero-title {
  font-size: clamp(22px, 6.2vw, 28px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.mp-hero-caption {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  line-height: 1.5;
}

.mp-hero-link {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.mp-progress-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  font-size: 12px;
}

.mp-progress-heading b {
  font-size: clamp(36px, 11vw, 44px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.mp-progress-track {
  height: 11px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.mp-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mp-lemon-400);
  transition: width 0.35s ease;
}

.mp-goal-hero.is-empty .mp-progress-heading,
.mp-goal-hero.is-empty .mp-progress-track,
.mp-goal-hero.is-empty .mp-hero-metrics { display: none; }
.mp-goal-hero.is-empty .mp-hero-title-row { margin-bottom: 4px; }

.mp-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mp-hero-metrics > div + div { border-left: 1px solid rgba(255, 255, 255, 0.2); padding-left: 14px; }
.mp-hero-metrics span { display: block; color: rgba(255, 255, 255, 0.68); font-size: 10px; }
.mp-hero-metrics b { display: block; margin-top: 4px; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }

.mp-section-block,
.mp-goal-plan,
.mp-linked-assets,
.mp-asset-group {
  margin-top: 22px;
}

.mp-section-heading { align-items: flex-end; }
.mp-section-heading h2 { margin-top: 3px; font-size: 20px; line-height: 1.25; letter-spacing: -0.035em; }
.mp-period-label { color: var(--mp-text-secondary); font-size: 11px; font-weight: 700; }

.mp-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mp-summary-card {
  min-width: 0;
  padding: 16px 14px;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-card);
  background: var(--mp-surface);
}

.mp-summary-card span,
.mp-month-primary span,
.mp-month-secondary span,
.mp-goal-plan-grid span,
.mp-linked-assets-grid span,
.mp-assets-totals span {
  display: block;
  color: var(--mp-text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.mp-summary-card b {
  display: block;
  margin-top: 8px;
  font-size: clamp(18px, 5.3vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.mp-summary-card small { display: block; margin-top: 7px; color: var(--mp-text-secondary); font-size: 10px; line-height: 1.4; }

.mp-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d5e21f;
  border-radius: var(--mp-radius-card);
  background: var(--mp-lemon-400);
  color: var(--mp-text);
}

.mp-action-copy { min-width: 0; }
.mp-action-copy span { display: block; font-size: 10px; font-weight: 800; }
.mp-action-copy b { display: block; margin-top: 4px; font-size: 14px; line-height: 1.42; overflow-wrap: anywhere; }
.mp-action-card button { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; border: 1px solid rgba(32, 27, 45, 0.2); background: rgba(255, 255, 255, 0.7); color: var(--mp-text); font-size: 11px; font-weight: 900; }

.mp-networth-section { padding: 18px 0; border-top: 1px solid var(--mp-border); border-bottom: 1px solid var(--mp-border); }
.mp-networth-amount { margin: 10px 0 5px; font-size: clamp(32px, 9vw, 40px); font-weight: 900; line-height: 1.1; letter-spacing: -0.055em; overflow-wrap: anywhere; }
.mp-longterm-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--mp-border); font-size: 12px; }
.mp-longterm-row b { color: var(--mp-purple-700); }

.mp-disclosure { margin-top: 16px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-card); background: var(--mp-surface); }
.mp-disclosure > summary { min-height: 50px; padding: 15px 44px 15px 16px; cursor: pointer; list-style: none; position: relative; color: var(--mp-text); font-size: 13px; font-weight: 800; }
.mp-disclosure > summary::-webkit-details-marker { display: none; }
.mp-disclosure > summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--mp-purple-700); font-size: 22px; font-weight: 500; }
.mp-disclosure[open] > summary::after { content: "−"; }
.mp-chart-panel { padding: 0 14px 16px; }
.mp-chart-panel .notice { margin: 10px 0; }
.mp-chart-tabs { display: flex; width: 100%; margin: 12px 0; }
.mp-chart-tabs button { flex: 1; }
.mp-chart-panel canvas { width: 100%; height: auto; }

.mp-goal-detail-hero { padding-bottom: 22px; }
.mp-hero-switch { display: flex; justify-content: flex-end; margin-top: 12px; color: rgba(255,255,255,.78); font-size: 11px; }
.mp-goal-overview { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 14px; }
.gaugewrap { display: flex; flex-direction: column; align-items: center; }
.mp-gauge { position: relative; width: 180px; height: 180px; }
.mp-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mp-gauge-center strong { font-size: 32px; line-height: 1; letter-spacing: -0.05em; }
.mp-gauge-center span { margin-top: 7px; color: rgba(255,255,255,.7); font-size: 11px; }
.mp-goal-facts { display: grid; gap: 10px; }
.mp-goal-facts > div { padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.18); }
.mp-goal-facts > div:last-child { border-bottom: 0; }
.mp-goal-facts span { display: block; color: rgba(255,255,255,.66); font-size: 10px; }
.mp-goal-facts b { display: block; margin-top: 4px; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.mp-empty-goal { margin-top: 12px; padding: 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; background: rgba(255,255,255,.1); }
.mp-empty-goal b,.mp-empty-goal span { display: block; }
.mp-empty-goal span { margin-top: 4px; color: rgba(255,255,255,.76); font-size: 11px; line-height: 1.45; }

.mp-goal-plan-grid,
.mp-linked-assets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--mp-border);
  border-bottom: 1px solid var(--mp-border);
}
.mp-goal-plan-grid > div,
.mp-linked-assets-grid > div { min-width: 0; padding: 16px 12px; }
.mp-goal-plan-grid > div + div,
.mp-linked-assets-grid > div + div { border-left: 1px solid var(--mp-border); }
.mp-goal-plan-grid b,
.mp-linked-assets-grid b { display: block; margin-top: 8px; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.mp-linked-assets .btn2 { min-height: 44px; padding: 7px 11px; font-size: 11px; }
.mp-risk-note { margin-bottom: 12px; padding: 11px 12px; border-radius: 12px; background: var(--mp-warning-bg); color: #714a00; font-size: 11px; line-height: 1.45; }
.mp-advanced-goal > .card { margin: 0 14px 14px; padding: 14px; box-shadow: none; }

.mp-month-shell { margin-top: var(--mp-space-4); }
.mp-month-shell > .monthnav { margin-bottom: 2px; }
.mp-month-summary { margin-top: 14px; border-radius: var(--mp-radius-hero); overflow: hidden; background: var(--mp-surface); box-shadow: var(--mp-shadow-card); }
.mp-month-primary { padding: 20px; background: var(--mp-purple-700); color: #fff; }
.mp-month-primary span,.mp-month-primary small { color: rgba(255,255,255,.72); }
.mp-month-primary b { display: block; margin-top: 7px; font-size: clamp(32px, 9vw, 40px); line-height: 1.05; letter-spacing: -0.055em; overflow-wrap: anywhere; }
.mp-month-primary small { display: block; margin-top: 7px; font-size: 11px; line-height: 1.45; }
.mp-month-secondary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.mp-month-secondary > div { padding: 15px 16px; }
.mp-month-secondary > div + div { border-left: 1px solid var(--mp-border); }
.mp-month-secondary b { display: block; margin-top: 6px; font-size: 18px; overflow-wrap: anywhere; }
.mp-month-helper { display: flex; justify-content: space-between; gap: 10px; margin: 12px 2px 16px; color: var(--mp-text-secondary); font-size: 10px; line-height: 1.4; }
.mp-month-helper > span:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: 0 0 auto; }
.mp-month-helper b { color: var(--mp-success); }
.mp-month-helper button { min-height: 44px; padding: 6px 9px; border: 1px solid var(--mp-border); background: var(--mp-surface); color: var(--mp-purple-700); font-size: 10px; font-weight: 800; }
.mp-month-group { margin-top: 14px; }
.mp-month-group-title { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; color: var(--mp-text); font-size: 15px; font-weight: 900; }
.mp-month-group-title small { color: var(--mp-text-secondary); font-size: 10px; font-weight: 600; }
.mp-month-group .cat-acc { margin-top: 7px; border-radius: 14px; box-shadow: none; }
.mp-month-group .cat-head .nm { font-weight: 800; }

.mp-assets-hero > span { display: block; margin-top: 16px; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 700; }
.mp-assets-hero > b { display: block; margin-top: 5px; font-size: clamp(34px, 10vw, 40px); line-height: 1.08; letter-spacing: -0.055em; overflow-wrap: anywhere; }
.mp-assets-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 19px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.mp-assets-totals > div + div { border-left: 1px solid rgba(255,255,255,.2); padding-left: 12px; }
.mp-assets-totals span { color: rgba(255,255,255,.65); }
.mp-assets-totals b { display: block; margin-top: 4px; font-size: 16px; overflow-wrap: anywhere; }
.mp-assets-update { margin-top: 14px; color: rgba(255,255,255,.65); font-size: 10px; }
.mp-assets-update span { color: #fff; }
.mp-asset-group {
  overflow: hidden;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-card);
  background: var(--mp-surface);
}
.mp-asset-group + .mp-asset-group { margin-top: 10px; }
.mp-asset-group-summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,auto) 24px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.mp-asset-group-summary::-webkit-details-marker { display: none; }
.mp-asset-group-summary::after {
  content: "›";
  color: var(--mp-text-secondary);
  font-size: 24px;
  line-height: 1;
  text-align: center;
  transform: rotate(90deg);
  transition: transform .2s ease;
}
.mp-asset-group[open] .mp-asset-group-summary::after { transform: rotate(-90deg); }
.mp-asset-group-summary > span { min-width: 0; font-size: 18px; font-weight: 900; letter-spacing: -.035em; }
.mp-asset-group-summary > b { max-width: 180px; color: var(--mp-purple-700); font-size: 13px; line-height: 1.35; text-align: right; overflow-wrap: anywhere; }
.mp-debt-group .mp-asset-group-summary > b { color: var(--mp-danger); }
.mp-asset-list { padding: 0 16px 8px; border-top: 1px solid var(--mp-border); }
.mp-debt-note { margin: 0 16px 16px; padding-top: 2px; font-size: 10px; line-height: 1.5; }
.mp-asset-group .acct { border: 0; border-bottom: 1px solid var(--mp-border); border-radius: 0; padding: 18px 2px; }
.mp-asset-group .acct:last-child { border-bottom: 0; }
.mp-asset-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.mp-asset-group .acct .top { gap: 12px; align-items: flex-start; }
.mp-asset-group .acct .nm { line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.mp-asset-group .acct .nums { margin-top: 12px; gap: 14px; line-height: 1.4; }
.mp-asset-group .acct .nums b { text-align: right; overflow-wrap: anywhere; }
.mp-asset-group .acct .del { min-width: 44px; min-height: 44px; padding: 7px; color: var(--mp-text-secondary); font-size: 10px; }
.mp-link-state { display: inline-flex; align-items: center; min-height: 24px; margin-top: 8px; padding: 4px 8px; border-radius: 999px; background: var(--mp-bg); color: var(--mp-text-secondary); font-size: 9px; font-weight: 700; }
.mp-link-state[data-linked="true"] { background: var(--mp-success-bg); color: #0e6948; }
.mp-empty-state { padding: 18px 14px; border: 1px dashed var(--mp-border); border-radius: 14px; background: var(--mp-purple-50); }
.mp-empty-state b,.mp-empty-state span { display: block; }
.mp-empty-state b { font-size: 13px; }
.mp-empty-state span { margin-top: 5px; color: var(--mp-text-secondary); font-size: 10px; line-height: 1.45; }
.mp-add-account > .card { margin: 0 14px 14px; padding: 14px; box-shadow: none; }

@media (max-width: 520px) {
  .mp-goal-overview { grid-template-columns: 1fr; }
  .mp-goal-facts { grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .mp-goal-facts > div { padding: 10px 8px 0; border-bottom: 0; text-align: center; }
  .mp-goal-facts > div + div { border-left: 1px solid rgba(255,255,255,.18); }
  .mp-asset-group-summary { padding: 15px 14px; }
  .mp-asset-group-summary > b { max-width: 138px; }
  .mp-asset-list { padding-inline: 16px; }
  .mp-asset-group .acct .top { display: block; }
  .mp-asset-actions {
    justify-content: flex-start;
    gap: 7px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--mp-border);
  }
  .mp-asset-group .acct .del {
    padding-inline: 12px;
    border: 1px solid var(--mp-border);
    border-radius: 10px;
    background: var(--mp-purple-50);
    color: var(--mp-text-secondary);
  }
}

@media (max-width: 359px) {
  .mp-goal-hero,.mp-goal-detail-hero,.mp-assets-hero { padding: 17px 15px; }
  .mp-hero-title-row { gap: 8px; }
  .mp-hero-link { padding-inline: 9px; }
  .mp-summary-grid { gap: 7px; }
  .mp-summary-card { padding: 14px 11px; }
  .mp-action-card { align-items: flex-start; flex-direction: column; }
  .mp-action-card button { width: 100%; }
  .mp-goal-plan-grid,.mp-linked-assets-grid { grid-template-columns: 1fr; }
  .mp-goal-plan-grid > div,.mp-linked-assets-grid > div { padding: 12px 4px; }
  .mp-goal-plan-grid > div + div,.mp-linked-assets-grid > div + div { border-left: 0; border-top: 1px solid var(--mp-border); }
  .mp-month-helper { flex-direction: column; }
  .mp-month-helper > span:last-child { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .mp-progress-fill { transition: none; }
}
