:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #222222;
  --muted: #666666;
  --dim: #757575;
  --accent: #1f3a5f;
  --accent-strong: #1f3a5f;
  --good: #2e7d32;
  --bad: #e53935;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.08);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #ffffff;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app,
.auth-shell {
  background: #ffffff !important;
}

.app {
  min-height: 100vh;
  padding: 0 28px 48px;
}

.topbar {
  display: grid;
  gap: 0;
  margin-bottom: 0;
}

.topbar,
.topbar__nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 8px 28px rgba(17, 17, 17, 0.04);
}

.topbar__nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-left: -28px !important;
  margin-right: -28px !important;
  padding-top: 18px !important;
  padding-bottom: 18px !important;
  padding-left: 28px !important;
  padding-right: 28px !important;
}

.topbar__content {
  padding: 28px 28px 22px !important;
}

body[data-page="dashboard"] .dashboard-control-card,
body[data-page="dashboard"] .dashboard-section,
body[data-page="analytics"] .analytics-date-card,
body[data-page="analytics"] .analytics-content,
body[data-page="financial-profile"] .layout,
body[data-page="financial-well-being"] .layout,
body[data-page="financial-health-check"] .layout,
body[data-page="coaching"] .coaching-page,
body[data-page="profile"] .settings-layout,
body[data-page="transactions"] .layout {
  margin-left: 28px !important;
  margin-right: 28px !important;
}

.brand-lockup,
.brand-name,
.menu-link,
.menu-action {
  color: var(--text) !important;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(44px, 4.8vw, 64px);
  max-width: min(50vw, 360px);
  object-fit: contain;
}

.userbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-menu {
  position: relative;
}

.menu-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--accent) !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.menu-toggle span:first-child {
  text-transform: uppercase;
}

.menu-toggle span[aria-hidden="true"] {
  font-size: 14px;
  transform: translateY(-1px);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  min-width: 260px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.menu-link,
.menu-action {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
}

.app .brand-logo {
  margin-left: 0;
}

.brand-name {
  max-width: min(54vw, 560px);
  letter-spacing: 0 !important;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.brand-mark {
  border-color: var(--line-strong) !important;
  background: var(--bg-soft) !important;
  color: var(--accent) !important;
}

.pill,
.button {
  border-color: var(--line-strong) !important;
  background: #ffffff !important;
  color: var(--accent) !important;
}

.userbar > .pill {
  display: none !important;
}

.button:hover,
.button:focus {
  border-color: var(--accent) !important;
}

.button--primary,
.auth-switch__button.is-active {
  background: var(--accent) !important;
  color: #ffffff !important;
}

.button--primary:hover,
.button--primary:focus {
  background: #16304d !important;
}

.button--ghost {
  background: #ffffff !important;
}

.menu-panel {
  border-color: var(--line) !important;
  background: #ffffff !important;
  box-shadow: var(--shadow) !important;
}

.menu-link:hover,
.menu-link:focus,
.menu-action:hover,
.menu-action:focus {
  background: var(--bg-soft) !important;
}

.hero,
.card,
.auth-card,
.metric,
.item,
.insight-card,
.survey-scorecard,
.survey-table,
.survey-inline,
.report-item,
.report-toolbar,
.conversation-block,
.topic-group,
.table-wrap,
.goal-table-wrap,
.proof-panel,
.benefit-card,
.hero-preview,
.demo-preview,
.preview-card,
.process-step,
.trust-card,
.cta-panel,
.demo-screen,
.demo-row {
  border-color: var(--line) !important;
  background: #ffffff !important;
  box-shadow: var(--shadow) !important;
}

.metric,
.item,
.insight-card,
.survey-scorecard,
.report-item,
.preview-card,
.process-step,
.trust-card,
.demo-row {
  box-shadow: none !important;
}

.input,
.select,
.textarea,
.goal-table__editor-input,
.goal-table__editor-select,
.table__editor-input,
.checkbox-field {
  border-color: var(--line-strong) !important;
  background: #ffffff !important;
  color: var(--text) !important;
}

.input[readonly],
.textarea[readonly] {
  border-color: var(--line) !important;
  background: var(--bg-soft) !important;
  color: var(--dim) !important;
}

.input::placeholder,
.textarea::placeholder,
.table__editor-input::placeholder {
  color: #9ca3af !important;
}

.goal-table-wrap,
.table-wrap,
.survey-table,
.survey-inline {
  background: #ffffff !important;
}

.goal-table th,
.goal-table td,
.table th,
.table td {
  border-bottom-color: var(--line) !important;
}

.table tbody tr:nth-child(even):not(.table__editor-row) td {
  background: #f8f9fa !important;
}

.table th.table__amount,
.table td.table__amount {
  text-align: right !important;
}

.table th.table__discretionary,
.table td.table__discretionary,
.table th.table__action,
.table td.table__action {
  text-align: center !important;
}

.table__actions {
  justify-content: center;
}

.table__action-button,
.pagination__button {
  border-color: var(--line-strong) !important;
  background: #ffffff !important;
  color: var(--accent) !important;
}

.table__action-button:hover,
.table__action-button:focus,
.pagination__button:hover,
.pagination__button:focus {
  border-color: var(--accent) !important;
}

.pagination__button[disabled] {
  opacity: 0.45;
}

.goal-table__editor-row td,
.table__editor-row td,
.survey-table__row,
.survey-inline__row {
  background: #ffffff !important;
}

.report-section + .report-section,
.dev-profile__section,
.conversation-block + .conversation-block,
.survey-section + .survey-section,
.profile-section + .profile-section {
  border-top-color: var(--line) !important;
}

.survey-table__header {
  background: var(--bg-soft) !important;
}

.tag,
.survey-scorecard__status,
.table__checkbox.is-checked {
  border-color: rgba(31, 58, 95, 0.24) !important;
  background: rgba(31, 58, 95, 0.08) !important;
  color: var(--accent) !important;
}

.mini-button {
  border-color: rgba(229, 57, 53, 0.28) !important;
  background: rgba(229, 57, 53, 0.08) !important;
  color: #9f1f1b !important;
}

.table__editor-actions .mini-button,
.goal-table__editor-actions .mini-button {
  border-color: rgba(31, 58, 95, 0.24) !important;
  background: rgba(31, 58, 95, 0.08) !important;
  color: var(--accent) !important;
}

.status {
  color: var(--accent) !important;
}

.status--error {
  color: var(--bad) !important;
}

.status--success {
  color: var(--good) !important;
}

.divider {
  background: var(--line) !important;
}

.empty {
  border-color: var(--line-strong) !important;
  background: var(--bg-soft) !important;
}

.auth-modal {
  background: rgba(17, 17, 17, 0.38) !important;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

.select,
.goal-table__editor-select,
.plan-table__editor-select,
.coaching-filter {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding-right: 42px !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%2346566d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 16px 16px !important;
}

.analytics-month-select {
  padding-right: 42px !important;
}

@media (max-width: 720px) {
  .brand-name {
    max-width: none;
    font-size: 20px !important;
  }

  .brand-logo {
    height: 44px;
    max-width: 64vw;
  }

  .topbar__nav {
    margin-left: -18px !important;
    margin-right: -18px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .topbar__content {
    padding: 22px 18px 18px !important;
  }

  body[data-page="dashboard"] .dashboard-control-card,
  body[data-page="dashboard"] .dashboard-section,
  body[data-page="analytics"] .analytics-date-card,
  body[data-page="analytics"] .analytics-content,
  body[data-page="financial-profile"] .layout,
  body[data-page="financial-well-being"] .layout,
  body[data-page="financial-health-check"] .layout,
  body[data-page="coaching"] .coaching-page,
  body[data-page="profile"] .settings-layout,
  body[data-page="transactions"] .layout {
    margin-left: 18px !important;
    margin-right: 18px !important;
  }

  .userbar {
    width: 100%;
    justify-content: space-between;
  }

  .account-menu {
    margin-left: auto;
  }
}

/* ===== Redesigned Sign In / Create Account modal ===== */
.momentum-auth-card {
  width: min(960px, 100%);
  max-height: min(720px, 92vh);
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  padding: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ffffff;
}

.momentum-auth-left {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 36px;
  background: linear-gradient(180deg, #eaf2ff 0%, #f5f9ff 55%, #ffffff 100%);
  overflow-y: auto;
}

.momentum-auth-mark {
  display: block;
  line-height: 0;
  margin-bottom: 10px;
}

.momentum-auth-wordmark {
  margin: 0;
  color: #0b1f3a;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.momentum-auth-tagline {
  margin: 6px 0 0;
  color: #45577a;
  font-size: 13px;
  font-weight: 700;
}

.momentum-auth-hr {
  margin: 22px 0;
  border: 0;
  border-top: 2px solid rgba(31, 99, 233, 0.18);
  width: 44px;
}

.momentum-auth-heading {
  margin: 0 0 10px;
  color: #0b1f3a;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.momentum-auth-lead {
  margin: 0 0 22px;
  color: #56658a;
  font-size: 14px;
  line-height: 1.55;
}

.momentum-auth-eyebrow {
  margin: 0 0 12px;
  color: #1f63e9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.momentum-auth-feature {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.momentum-auth-feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.momentum-auth-feature-title {
  margin: 0 0 3px;
  color: #0b1f3a;
  font-size: 14px;
  font-weight: 800;
}

.momentum-auth-feature-text {
  margin: 0;
  color: #5c6b85;
  font-size: 12.5px;
  line-height: 1.5;
}

.momentum-auth-wave {
  margin-top: auto;
  padding-top: 16px;
  line-height: 0;
}

.momentum-auth-right {
  position: relative;
  padding: 36px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.momentum-auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: #45577a;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.momentum-auth-title {
  margin: 0 0 8px;
  color: #0b1f3a;
  font-size: 26px;
  font-weight: 800;
  padding-right: 36px;
}

.momentum-auth-subtitle {
  margin: 0 0 22px;
  color: #5c6b85;
  font-size: 14px;
  line-height: 1.5;
}

.momentum-auth-card .auth-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: #f1f4fa;
  border: 0;
}

.momentum-auth-card .auth-switch__button {
  flex: 1;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #45577a;
  font-weight: 700;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.momentum-auth-card .auth-switch__button.is-active {
  background: #1f63e9;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(31, 99, 233, 0.28);
}

.momentum-auth-field {
  margin-bottom: 16px;
}

.momentum-auth-field label {
  display: block;
  margin-bottom: 7px;
  color: #1f3a5f;
  font-size: 12.5px;
  font-weight: 700;
}

.momentum-auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.momentum-auth-input-icon {
  position: absolute;
  left: 14px;
  display: grid;
  place-items: center;
  color: #93a1b8;
  pointer-events: none;
}

.momentum-auth-input {
  width: 100%;
  padding: 13px 16px 13px 42px;
  border: 1px solid #d8deea;
  border-radius: 14px;
  font-size: 14px;
  color: #0b1f3a;
  background: #fff;
}

.momentum-auth-input:focus {
  outline: none;
  border-color: #1f63e9;
  box-shadow: 0 0 0 3px rgba(31, 99, 233, 0.14);
}

.momentum-auth-eye {
  position: absolute;
  right: 10px;
  border: 0;
  background: transparent;
  color: #93a1b8;
  cursor: pointer;
  padding: 6px;
  display: grid;
  place-items: center;
}

.momentum-auth-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 2px 0 16px;
}

.momentum-auth-check-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #93a1b8;
}

.momentum-auth-check-icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid #c7cedb;
  display: grid;
  place-items: center;
  color: transparent;
}

.momentum-auth-check-item.is-met {
  color: #1f8a4c;
}

.momentum-auth-check-item.is-met .momentum-auth-check-icon {
  border-color: #1f8a4c;
  background: #1f8a4c;
  color: #ffffff;
}

.momentum-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.momentum-auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #45577a;
  font-size: 13.5px;
}

.momentum-auth-link {
  border: 0;
  background: transparent;
  color: #1f63e9;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  padding: 0;
}

.momentum-auth-submit {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: #1f63e9;
  color: #ffffff;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(31, 99, 233, 0.28);
}

.momentum-auth-submit:hover {
  background: #1752d0;
}

.momentum-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.momentum-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: #93a1b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.momentum-auth-divider::before,
.momentum-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e9f2;
}

.momentum-auth-oauth-buttons {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.momentum-auth-oauth {
  flex: 1;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid #d8deea;
  border-radius: 14px;
  background: #ffffff;
  color: #1f3a5f;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.momentum-auth-oauth:hover {
  background: #f8fafc;
}

.momentum-auth-oauth--apple {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.momentum-auth-oauth--apple:hover {
  background: #1a1a1a;
}

.momentum-auth-switch-text {
  margin: 20px 0 0;
  text-align: center;
  color: #5c6b85;
  font-size: 13.5px;
}

@media (max-width: 780px) {
  .momentum-auth-card {
    grid-template-columns: 1fr;
    width: min(480px, 100%);
    max-height: min(90vh, 720px);
  }

  .momentum-auth-left {
    display: none;
  }

  .momentum-auth-right {
    padding: 30px 24px;
  }
}

/* ===== Shared app header (all pages except the landing page) ===== */
.app-header {
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 64px;
  margin: -26px -26px 26px;
  padding: 0 28px;
  background: #0a0a0f;
  color: #ffffff;
}

.app-header__logo-slot {
  flex: 1 1 auto;
  min-width: 24px;
}

.app-header__nav {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 0 0 auto;
}

.app-header__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.88;
}

.app-header__nav-link:hover,
.app-header__nav-link:focus {
  opacity: 1;
}

.app-header__nav-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
  margin-left: 32px;
}

.app-header__bell {
  position: relative;
  display: inline-flex;
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 4px;
  opacity: 0.9;
}

.app-header__bell svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-header__bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: #1f63e9;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
}

.app-header .account-menu {
  position: relative;
}

.app-header__user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 4px 2px;
}

.app-header__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.app-header__username {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.app-header__chevron {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

@media (max-width: 960px) {
  .app-header__nav-link span {
    display: none;
  }

  .app-header__nav {
    gap: 18px;
  }
}

@media (max-width: 720px) {
  .app-header {
    margin: -18px -18px 18px;
    padding: 0 16px;
    flex-wrap: wrap;
    min-height: 56px;
    gap: 10px 0;
  }

  .app-header__logo-slot {
    flex-basis: 100%;
    min-width: 0;
    order: -1;
    height: 0;
  }

  .app-header__nav {
    gap: 16px;
  }

  .app-header__username {
    display: none;
  }
}
